. set linesize 160

. set matsize 11000

.
. cd /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt1/work
/Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/H1pt1/work

. save chwide25june2012, replace
file chwide25june2012.dta saved

. save chwide25june2012bkup, replace
file chwide25june2012bkup.dta saved

.
.
. *******************************************************************************
. *----------  Hypothesis 1   part 1   male   WHPpain analysis
. *******************************************************************************
.
.
.
.
. /*
>                 Target Variable WHPPAIN
> N: 340          Minimum2.192E+004       Maximum:  2.200E+004
> Mean:   2.193E+004              Varience:   270.64647
>
>                 Variables, Terms, and Parameters
> Direct variables: 9             Total variables: 10
> Terms in model: 16              Effective parameters: 42.47
>
>                 R-Square Measures
> Naive: 0.60443          Naive adjusted: 0.58612         GCV R-square: 0.48648
>
>                 Mean-Square Measures
> Naive MSE: 112.01472            MARS GCV: 139.39244
>
>
>
> Basis Functions
>
>                 Basis Functions
>  bfmPain1 = max(0, BSISOMA - 21935)
>  bfmPain2 = max(0, 21935 - BSISOMA)
>  bfmPain3 = max(0, ILLW3 - 21918)
>  bfmPain4 = max(0, 21918 - ILLW3)
>  bfmPain5 = max(0, HAVMIL - 21962.6)
>  bfmPain6 = max(0, 21962.6 - HAVMIL)
>  bfmPain7 = (TRREPW2 !=. ) * bfmPain5
>  bfmPain9 = max(0, TRREPW2 - 21996) * bfmPain7
>  bfmPain11 = max(0, BSIPSYC - 21920) * bfmPain6
>  bfmPain12 = max(0, RADCHW3 - 21916) * bfmPain1
>  bfmPain13 = max(0, PHYSDISAGW3 - 21916) * bfmPain6
>  bfmPain14 = max(0, ILLW3 - 21918) * bfmPain2
>  bfmPain15 = max(0, 21918 - ILLW3) * bfmPain2
>  bfmPain16 = max(0, ACCDW2 - 21917) * bfmPain2
>  bfmPain18 = max(0, SUCHRW2 - 21916) * bfmPain1
>
>  Y = 21968 - 2.29387 * bfmPain1 - 3.94277 * bfmPain2 - 10.9782 * bfmPain3
>            - 16.2733 * bfmPain4 - 0.150944 * bfmPain5 + 1.09887 * bfmPain6
>            + 0.149892 * bfmPain7 + 0.00643871 * bfmPain9 - 0.312306 * bfmPain11
>            + 0.054552 * bfmPain12 + 0.0598086 * bfmPain13 + 1.45831 * bfmPain14
>            + 1.17008 * bfmPain15 - 1.87487 * bfmPain16 + 0.0213682 * bfmPain18
>
>  MODEL WHPPAIN = bfmPain1 bfmPain2 bfmPain3 bfmPain4 bfmPain5 bfmPain6 bfmPain7 bfmPain9 bfmPain11 bfmPain12 bfmPain13
>                  bfmPain14 bfmPain15 bfmPain16 bfmPain18
>
> */
.
.
.  cap gen bfmPain1 = max(0, BSIsoma - 21935)

.  cap gen bfmPain2 = max(0, 21935 - BSIsoma)

.  cap gen bfmPain3 = max(0, illw3 - 21918)

.  cap gen bfmPain4 = max(0, 21918 - illw3)

.  cap gen bfmPain5 = max(0, havmil - 21962.6)

.  cap gen bfmPain6 = max(0, 21962.6 - havmil)

.  cap gen bfmPain7 = (trrepw2 !=. ) * bfmPain5

.  cap gen bfmPain9 = max(0, trrepw2 - 21996) * bfmPain7

.  cap gen bfmPain11 = max(0, BSIpsyc - 21920) * bfmPain6

.  cap gen bfmPain12 = max(0, radchw3 - 21916) * bfmPain1

.  cap gen bfmPain13 = max(0, physdisagw3 - 21916) * bfmPain6

.  cap gen bfmPain14 = max(0, illw3 - 21918) * bfmPain2

.  cap gen bfmPain15 = max(0, 21918 - illw3) * bfmPain2

.  cap gen bfmPain16 = max(0, accdw2 - 21917) * bfmPain2

.  cap gen bfmPain18 = max(0, suchrw2 - 21916) * bfmPain1

.
.  label var bfmPain1 "max(0, BSIsoma - 21935) for males"

.  label var bfmPain2 "max(0, 21935 - BSIsoma)"

.  label var bfmPain3 "max(0, illw3 - 21918)"

.  label var bfmPain4 "max(0, 21918 - illw3)"

.  label var bfmPain5 "max(0, havmil - 21962.6)"

.  label var bfmPain6 "max(0, 21962.6 - havmil)"

.  label var bfmPain7 "(trrepw2 != . ) * bfmPain5"

.  label var bfmPain9 "max(0, trrepw2 - 21996) * bfmPain7"

.  label var bfmPain11 "max(0, BSIpsyc - 21920) * bfmPain6"

.  label var bfmPain12 "max(0, radchw3 - 21916) * bfmPain1"

.  label var bfmPain13 "max(0, physdisagw3 - 21916) * bfmPain6"

.  label var bfmPain14 "max(0, illw3 - 21918) * bfmPain2"

.  label var bfmPain15 "max(0, 21918 - illw3) * bfmPain2"

.  label var bfmPain16 "max(0, accdw2 - 21917) * bfmPain2"

.  label var bfmPain18 "max(0, suchrw2 - 21916) * bfmPain1"

.
. // comparsion of
. // Basis functions
.
. regress WHPpain bfmPain2 bfmPain4 bfmPain6 bfmPain15 if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F(  4,   335) =   37.23
       Model |  28232.4737     4  7058.11842           Prob > F      =  0.0000
    Residual |  63516.5285   335  189.601578           R-squared     =  0.3077
-------------+------------------------------           Adj R-squared =  0.2994
       Total |  91749.0022   339  270.646024           Root MSE      =   13.77

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    bfmPain2 |    3583.872    1666.341      2.15    0.032      306.0604     6861.683
    bfmPain4 |    3581.063     1666.75      2.15    0.032      302.4485     6859.677
    bfmPain6 |    .0044063    .0072515      0.61    0.544     -.0098579     .0186705
   bfmPain15 |   -.1635651    .0760251     -2.15    0.032     -.3131118    -.0140183
       _cons |   -7.85e+07    3.65e+07     -2.15    0.032     -1.50e+08     -6602957
-------------+----------------------------------------------------------------

.
. sw, pr(.1): regress WHPpain bfmPain2 bfmPain6 bfmPain15 if gender==1


  begin with full model


p = 0.6769 >= 0.1000  removing bfmPain6


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F(  2,   337) =   71.46
       Model |  27323.9096     2  13661.9548           Prob > F      =  0.0000
    Residual |  64425.0926   337  191.172382           R-squared     =  0.2978
-------------+------------------------------           Adj R-squared =  0.2936
       Total |  91749.0022   339  270.646024           Root MSE      =  13.827

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    bfmPain2 |    3.626289    .8671582      4.18    0.000      1.920564     5.332013
   bfmPain15 |   -.0002203    .0000374     -5.89    0.000     -.0002938    -.0001467
       _cons |    26349.77     3094.05      8.52    0.000      20263.69     32435.86
-------------+----------------------------------------------------------------

.
. //     to
.
. // constituent variables
.
. regress WHPpain BSIsoma illw3 havmil trrepw2 BSIpsyc radchw3 accdw2 suchrw2 ///
>     if gender==1

      Source |       SS       df       MS              Number of obs =     306
-------------+------------------------------           F(  8,   297) =   27.01
       Model |   32853.406     8  4106.67575           Prob > F      =  0.0000
    Residual |  45158.6184   297   152.04922           R-squared     =  0.4211
-------------+------------------------------           Adj R-squared =  0.4055
       Total |  78012.0245   305  255.777129           Root MSE      =  12.331

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     BSIsoma |    1.486893    .1470665     10.11    0.000      1.197469     1.776318
       illw3 |    3.080362     .870471      3.54    0.000       1.36729     4.793435
      havmil |     .004043    .0066393      0.61    0.543     -.0090231     .0171091
     trrepw2 |    .0675948    .0239548      2.82    0.005      .0204523     .1147374
     BSIpsyc |     .519233    .3518444      1.48    0.141      -.173191     1.211657
     radchw3 |    .1102079    .0229509      4.80    0.000      .0650408     .1553749
      accdw2 |    .8834201    1.922424      0.46    0.646     -2.899879     4.666719
     suchrw2 |    .0792652    .0187931      4.22    0.000      .0422807     .1162498
       _cons |   -26.03696    3.274708     -7.95    0.000     -32.48153    -19.59239
-------------+----------------------------------------------------------------

.
.
. sw, pr(.1): regress WHPpain BSIsoma illw3 havmil trrepw2 BSIpsyc radchw3 accdw2 suchrw2 ///
>     if gender==1


  begin with full model


p = 0.6462 >= 0.1000  removing accdw2


p = 0.5034 >= 0.1000  removing havmil


p = 0.1377 >= 0.1000  removing BSIpsyc


      Source |       SS       df       MS              Number of obs =     306
-------------+------------------------------           F(  5,   300) =   42.66
       Model |  32417.8429     5  6483.56857           Prob > F      =  0.0000
    Residual |  45594.1816   300  151.980605           R-squared     =  0.4155
-------------+------------------------------           Adj R-squared =  0.4058
       Total |  78012.0245   305  255.777129           Root MSE      =  12.328

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     BSIsoma |    1.547326    .1385026     11.17    0.000      1.274767     1.819886
       illw3 |    3.517895    .8146161      4.32    0.000      1.914809      5.12098
     suchrw2 |    .0794573    .0187034      4.25    0.000      .0426508     .1162638
     trrepw2 |    .0678365     .023815      2.85    0.005      .0209709     .1147022
     radchw3 |    .1142823    .0225686      5.06    0.000      .0698695     .1586951
       _cons |   -23.36797    2.859906     -8.17    0.000     -28.99599    -17.73995
-------------+----------------------------------------------------------------

.
.
. //   Combining the variables and the Basis functions
.
.
. regress WHPpain bfmPain2 bfmPain4  trrepw2 ///
>    radchw3 suchrw2 if gender==1

      Source |       SS       df       MS              Number of obs =     306
-------------+------------------------------           F(  5,   300) =   42.66
       Model |  32417.8429     5  6483.56857           Prob > F      =  0.0000
    Residual |  45594.1816   300  151.980605           R-squared     =  0.4155
-------------+------------------------------           Adj R-squared =  0.4058
       Total |  78012.0245   305  255.777129           Root MSE      =  12.328

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    bfmPain2 |   -1.547326    .1385026    -11.17    0.000     -1.819886    -1.274767
    bfmPain4 |   -3.517895    .8146161     -4.32    0.000      -5.12098    -1.914809
     trrepw2 |    .0678365     .023815      2.85    0.005      .0209709     .1147022
     radchw3 |    .1142823    .0225686      5.06    0.000      .0698695     .1586951
     suchrw2 |    .0794573    .0187034      4.25    0.000      .0426508     .1162638
       _cons |    111022.5    17202.72      6.45    0.000      77169.16     144875.7
-------------+----------------------------------------------------------------

.
.
.
. //  wave 1 possible socio-demog covariates full Male model
. regress WHPpain age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radfmw1 radtlw1 ///
>   radchw1 havmilsq avgcumdosew1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     338
                                                       F( 32,   337) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.2535
                                                       Root MSE      =  14.924

(Std. Err. adjusted for 338 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .5577522    .1680962      3.32    0.001      .2271022     .8884023
       educ2 |    13.53754    7.301204      1.85    0.065     -.8241389     27.89921
       educ3 |    20.90764    6.901825      3.03    0.003       7.33155     34.48372
       educ4 |    22.91195    7.590479      3.02    0.003      7.981261     37.84264
       educ5 |    16.23969    6.877652      2.36    0.019      2.711154     29.76822
       educ6 |    15.65082    6.783673      2.31    0.022      2.307144      28.9945
       educ7 |    8.234137    7.120114      1.16    0.248     -5.771328      22.2396
     marrw11 |    3.511152    3.129937      1.12    0.263     -2.645522     9.667827
     marrw12 |   -12.38032    6.088637     -2.03    0.043     -24.35685    -.4038031
     marrw13 |    .7789118    5.749118      0.14    0.892     -10.52977     12.08759
     marrw15 |   -10.12511     6.99535     -1.45    0.149     -23.88516     3.634942
     childw1 |   -.3610577    1.720564     -0.21    0.834     -3.745456      3.02334
     emplw12 |   -6.421212    6.406623     -1.00    0.317     -19.02322     6.180797
     emplw13 |    -8.24488    6.376402     -1.29    0.197     -20.78744     4.297683
     emplw14 |    58.37047    8.625897      6.77    0.000      41.40309     75.33785
     emplw15 |   -2.284595    13.04489     -0.18    0.861     -27.94426     23.37507
     emplw16 |   -4.878317     6.98336     -0.70    0.485     -18.61478     8.858149
      occ1w1 |    1.608066    6.020961      0.27    0.790     -10.23533     13.45147
      occ2w1 |   -5.317505    5.939357     -0.90    0.371     -17.00039     6.365379
      occ3w1 |   -3.272479    7.109173     -0.46    0.646     -17.25642     10.71146
      occ4w1 |   -.9181375    6.588523     -0.14    0.889     -13.87795     12.04167
      occ5w1 |   -5.965126    5.756447     -1.04    0.301     -17.28822     5.357967
      occ6w1 |   -9.101056    6.436824     -1.41    0.158     -21.76247     3.560359
      occ7w1 |   -5.887813    10.76742     -0.55    0.585     -27.06762       15.292
      occ8w1 |    1.940835    6.380393      0.30    0.761     -10.60958     14.49125
      inc1w1 |   -2.367859    5.972564     -0.40    0.692     -14.11606     9.380345
      inc2w1 |     .198827    5.457159      0.04    0.971     -10.53556     10.93321
      inc3w1 |   -.1945757    5.431376     -0.04    0.971     -10.87825     10.48909
      inc4w1 |   -4.526789    5.935531     -0.76    0.446     -16.20215     7.148569
     radhlw1 |    .0840558    .0427415      1.97    0.050      -.000018     .1681296
     radfmw1 |    -.037144    .0427703     -0.87    0.386     -.1212743     .0469863
     radtlw1 |    .0328294    .0355879      0.92    0.357      -.037173     .1028318
     radchw1 |   -.0065753    .0350019     -0.19    0.851      -.075425     .0622744
    havmilsq |    5.98e-06    4.33e-06      1.38    0.168     -2.53e-06     .0000145
avgcumdosew1 |    .8713809    .3358724      2.59    0.010      .2107104     1.532051
       _cons |   -32.94399    9.703011     -3.40    0.001     -52.03008    -13.85789
-------------+----------------------------------------------------------------

.
. scalar hyp = 1

. scalar pt = 1

. scalar wv = 1

.
. scalar hyp=1

. scalar pt=1

. scalar wv =1

. scalar dsigMw1 = 1

.
. // we do not count constant as a main effect
. matrix define H1p1MPnDosew1 = J(1,12,0)

. matrix  colnames H1p1MPnDosew1 = hypnum ptnum wv dsigMw1 dsigtw1 numMainEffsigMw1 numMainEffsigTw1 numModMw1 numModTw1 numbfsigMw1 numbfsigtw1 numMedw1

. matrix  rownames H1p1MPnDosew1 = wave1

. matlist H1p1MPnDosew1

   | hypnum    ptnum    wv    dsigMw1    dsigtw1    numMain~1    numMain~1    numModMw1    numModTw1    numbfsi~1    numbfsi~1    numMedw1
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave1   |         0            0            0            0            0            0            0            0            0            0            0            0

.
.
. set more off

. des WHPpain age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 ///
>   radtlw1  radhlw1 radfmw1 radtlw1 ///
>   radchw1 havmilsq bfmPain2-bfmPain18 avgcumdosew1

              storage  display     value
variable name   type   format      label      variable label
-------------


WHPpain           double   %9.0g                        Wtd Health Profile Pain Pt 1 subscale


age               byte     %8.0g                    *   Respondent's age


educ2             byte     %8.0g                        educ==2. graduated high school


educ3             byte     %8.0g                        educ==3. technical degree


educ4             byte     %8.0g                        educ==4. did not finish college/bachelor's


educ5             byte     %8.0g                        educ==5. graduated college/bachelor's


educ6             byte     %8.0g                        educ==6. finished specialist/master's degree


educ7             byte     %8.0g                        educ==7. doctor of science/phd


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw15           byte     %8.0g                        marrw1==5. divorced


childw1           byte     %8.0g                        number of children in 1986


emplw12           byte     %8.0g                        emplw1==1. full time


emplw13           byte     %8.0g                        emplw1==2. part time


emplw14           byte     %8.0g                        emplw1==3. voluntary


emplw15           byte     %8.0g                        emplw1==4. retired


emplw16           byte     %8.0g                        emplw1==5. unemployed


occ1w1            byte     %15.0g        LABJ           profess executive administration in 1986


occ2w1            byte     %15.0g        LABJ           technical sales admin support  in 1986


occ3w1            byte     %15.0g        LABJ           service occup protective services  in 1986


occ4w1            byte     %15.0g        LABJ           precision prod mechan craft construction  in 1986


occ5w1            byte     %15.0g        LABJ           factory laborer machinist transp cleaner  in 1986


occ6w1            byte     %15.0g        LABJ           farming agricul forestry fishing trapping logging  in 1986


occ7w1            byte     %15.0g        LABJ           homemaking or caregiving  in 1986


occ8w1            byte     %15.0g        LABJ           student  in 1986


inc1w1            byte     %15.0g        LABJ           Income is not sufficient for basic neccessities in 1986


inc2w1            byte     %15.0g        LABJ           Income is just sufficient for basic neccessities in 1986


inc3w1            byte     %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings in 1986


inc4w1            byte     %15.0g        LABJ           Income allows to comfortably afford luxury items in 1986


radhlw1           byte     %8.0g                        Self-perceived Chornobyl health threat in wave 1


radchw1           byte     %8.0g                        believed % of polution related to chornobyl in 1986


radtlw1           byte     %8.0g                        believed % of cumulative radiation exposed to in a lifetime in 1986


radhlw1           byte     %8.0g                        Self-perceived Chornobyl health threat in wave 1


radfmw1           byte     %8.0g                        how much believed family health is affected by radiation in 1986


radtlw1           byte     %8.0g                        believed % of cumulative radiation exposed to in a lifetime in 1986


radchw1           byte     %8.0g                        believed % of polution related to chornobyl in 1986


havmilsq          float    %9.0g


bfmPain2          float    %9.0g                        max(0, 21935 - BSIsoma)


bfmPain3          float    %9.0g                        max(0, illw3 - 21918)


bfmPain4          float    %9.0g                        max(0, 21918 - illw3)


bfmPain5          float    %9.0g                        max(0, havmil - 21962.6)


bfmPain6          float    %9.0g                        max(0, 21962.6 - havmil)


bfmPain7          float    %9.0g                        (trrepw2 != . ) * bfmPain5


bfmPain9          float    %9.0g                        max(0, trrepw2 - 21996) * bfmPain7


bfmPain11         float    %9.0g                        max(0, BSIpsyc - 21920) * bfmPain6


bfmPain12         float    %9.0g                        max(0, radchw3 - 21916) * bfmPain1


bfmPain13         float    %9.0g                        max(0, physdisagw3 - 21916) * bfmPain6


bfmPain14         float    %9.0g                        max(0, illw3 - 21918) * bfmPain2


bfmPain15         float    %9.0g                        max(0, 21918 - illw3) * bfmPain2


bfmPain16         float    %9.0g                        max(0, accdw2 - 21917) * bfmPain2


bfmPain18         float    %9.0g                        max(0, suchrw2 - 21916) * bfmPain1


avgcumdosew1      double   %8.0g                        wave 1 avg mean CS137 dose  in mGy ending 12/31/1986


.
. set more off

. regress WHPpain age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 ///
>   radtlw1 havmil bfmPain2 ///
>   avgcumdosew1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     338
                                                       F( 32,   337) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.3745
                                                       Root MSE      =  13.661

(Std. Err. adjusted for 338 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .295309    .1477169      2.00    0.046      .0047457     .5858723
       educ2 |    9.837567    9.771433      1.01    0.315     -9.383118     29.05825
       educ3 |    13.64135     9.19861      1.48    0.139     -4.452576     31.73528
       educ4 |    18.65029    9.565424      1.95    0.052      -.165166     37.46575
       educ5 |    11.27025    9.147045      1.23    0.219      -6.72225     29.26274
       educ6 |    10.32485    9.057972      1.14    0.255     -7.492436     28.14214
       educ7 |    9.945604    9.265232      1.07    0.284      -8.27937     28.17058
     marrw11 |    6.343852    3.325228      1.91    0.057     -.1969666     12.88467
     marrw12 |   -5.262689    6.040102     -0.87    0.384     -17.14374     6.618363
     marrw13 |    1.734749    5.047565      0.34    0.731     -8.193955     11.66345
     marrw15 |   -3.743091    5.787458     -0.65    0.518     -15.12718     7.641003
     childw1 |    1.191676    1.661288      0.72    0.474     -2.076125     4.459477
     emplw12 |   -3.444073    6.607328     -0.52    0.603     -16.44087     9.552727
     emplw13 |    -5.20503    6.658582     -0.78    0.435     -18.30265     7.892589
     emplw14 |    52.19996    8.416885      6.20    0.000      35.64371     68.75621
     emplw15 |    2.173072    10.29927      0.21    0.833     -18.08589     22.43203
     emplw16 |   -.9621721    7.166659     -0.13    0.893     -15.05919     13.13485
      occ1w1 |    2.110072    6.044377      0.35    0.727     -9.779389     13.99953
      occ2w1 |   -3.799666    5.985144     -0.63    0.526     -15.57261     7.973282
      occ3w1 |   -3.953959    7.008374     -0.56    0.573     -17.73963     9.831711
      occ4w1 |   -1.539101    6.493895     -0.24    0.813     -14.31278     11.23457
      occ5w1 |   -4.566975    5.921276     -0.77    0.441     -16.21429     7.080343
      occ6w1 |   -1.862545    6.660824     -0.28    0.780     -14.96457     11.23948
      occ7w1 |   -5.073696    8.022879     -0.63    0.528     -20.85493     10.70753
      occ8w1 |    1.374381    6.261957      0.22    0.826     -10.94307     13.69183
      inc1w1 |   -4.683311    5.467218     -0.86    0.392     -15.43748     6.070861
      inc2w1 |   -1.010506    5.153292     -0.20    0.845     -11.14718     9.126165
      inc3w1 |     .049647    5.232467      0.01    0.992     -10.24276     10.34206
      inc4w1 |   -6.707182    5.592817     -1.20    0.231     -17.70841     4.294048
     radhlw1 |   -.0312923    .0315641     -0.99    0.322     -.0933798     .0307951
     radchw1 |    .0350387    .0327678      1.07    0.286     -.0294164     .0994938
     radtlw1 |    .0522912    .0332817      1.57    0.117     -.0131748     .1177572
      havmil |    .0075372    .0069901      1.08    0.282     -.0062125     .0212868
    bfmPain2 |   -1.368869    .2342226     -5.84    0.000     -1.829591    -.9081465
avgcumdosew1 |    1.137044    .3257073      3.49    0.001      .4963687      1.77772
       _cons |    29989.79    5135.442      5.84    0.000      19888.23     40091.35
-------------+----------------------------------------------------------------

.
.  scalar Mw1 = e(r2_a)

.  scalar list Mw1
       Mw1 =  .30204486

.  scalar dsigMw1 = 1

.  scalar numMainEffsigMw1=7

.  scalar numbfsigMw1 = 1

.
.
. // wave 1 trimmed model of possible socio-demog covariates male model
. set more off

. sw, pr(.05):  regress WHPpain age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 if gender==1


  begin with full model


p = 0.9952 >= 0.0500  removing marrw13


p = 0.9858 >= 0.0500  removing emplw16


p = 0.9759 >= 0.0500  removing inc1w1


p = 0.9790 >= 0.0500  removing occ1w1


p = 0.9241 >= 0.0500  removing occ8w1


p = 0.8784 >= 0.0500  removing emplw15


p = 0.8714 >= 0.0500  removing childw1


p = 0.7688 >= 0.0500  removing inc3w1


p = 0.5948 >= 0.0500  removing occ4w1


p = 0.5416 >= 0.0500  removing occ7w1


p = 0.6020 >= 0.0500  removing emplw12


p = 0.5608 >= 0.0500  removing inc2w1


p = 0.5126 >= 0.0500  removing educ7


p = 0.4862 >= 0.0500  removing occ3w1


p = 0.3750 >= 0.0500  removing educ2


p = 0.3650 >= 0.0500  removing marrw15


p = 0.2677 >= 0.0500  removing emplw13


p = 0.1995 >= 0.0500  removing occ6w1


p = 0.2101 >= 0.0500  removing occ5w1


p = 0.1342 >= 0.0500  removing educ6


p = 0.3270 >= 0.0500  removing educ5


p = 0.1072 >= 0.0500  removing educ4


p = 0.1153 >= 0.0500  removing inc4w1


      Source |       SS       df       MS              Number of obs =     339
-------------+------------------------------           F(  6,   332) =   12.40
       Model |  16510.1924     6  2751.69873           Prob > F      =  0.0000
    Residual |  73696.8228   332  221.978382           R-squared     =  0.1830
-------------+------------------------------           Adj R-squared =  0.1683
       Total |  90207.0152   338   266.88466           Root MSE      =  14.899

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .5737159     .100771      5.69    0.000      .3754858     .7719461
     emplw14 |    64.21506    15.14027      4.24    0.000       34.4321     93.99801
       educ3 |    3.756037    1.726081      2.18    0.030      .3606035     7.151471
     marrw11 |     4.89355    2.418418      2.02    0.044      .1361955     9.650904
     marrw12 |   -12.56598    6.224893     -2.02    0.044     -24.81119    -.3207763
      occ2w1 |   -4.592491     2.27503     -2.02    0.044     -9.067783    -.1172001
       _cons |   -21.04869    5.923502     -3.55    0.000     -32.70102    -9.396363
-------------+----------------------------------------------------------------

. set more off

. sw, pr(.05): regress WHPpain age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 ///
>   radtlw1 illw1 havmil avgcumdosew1 if gender==1


  begin with full model


p = 0.9133 >= 0.0500  removing emplw15


p = 0.8966 >= 0.0500  removing occ4w1


p = 0.9069 >= 0.0500  removing marrw13


p = 0.8126 >= 0.0500  removing childw1


p = 0.7814 >= 0.0500  removing inc1w1


p = 0.7171 >= 0.0500  removing radchw1


p = 0.7095 >= 0.0500  removing emplw16


p = 0.6052 >= 0.0500  removing occ8w1


p = 0.6881 >= 0.0500  removing occ1w1


p = 0.5397 >= 0.0500  removing inc4w1


p = 0.5307 >= 0.0500  removing educ7


p = 0.4790 >= 0.0500  removing havmil


p = 0.4174 >= 0.0500  removing occ7w1


p = 0.4322 >= 0.0500  removing emplw12


p = 0.4081 >= 0.0500  removing radtlw1


p = 0.3947 >= 0.0500  removing emplw13


p = 0.3426 >= 0.0500  removing occ3w1


p = 0.3532 >= 0.0500  removing inc3w1


p = 0.3965 >= 0.0500  removing inc2w1


p = 0.3101 >= 0.0500  removing educ2


p = 0.2376 >= 0.0500  removing educ5


p = 0.7157 >= 0.0500  removing educ6


p = 0.2269 >= 0.0500  removing marrw15


p = 0.2344 >= 0.0500  removing occ6w1


p = 0.1756 >= 0.0500  removing occ5w1


p = 0.1388 >= 0.0500  removing educ4


p = 0.0992 >= 0.0500  removing illw1


p = 0.0850 >= 0.0500  removing marrw11


p = 0.0718 >= 0.0500  removing avgcumdosew1


p = 0.0654 >= 0.0500  removing occ2w1


      Source |       SS       df       MS              Number of obs =     338
-------------+------------------------------           F(  5,   332) =   15.31
       Model |   16883.371     5  3376.67421           Prob > F      =  0.0000
    Residual |  73222.0608   332  220.548376           R-squared     =  0.1874
-------------+------------------------------           Adj R-squared =  0.1751
       Total |  90105.4318   337  267.375169           Root MSE      =  14.851

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3195215     .070848      4.51    0.000      .1801539     .4588891
     radhlw1 |    .0723071    .0231383      3.12    0.002      .0267909     .1178233
       educ3 |    4.143932    1.731931      2.39    0.017      .7369894     7.550874
     marrw12 |    -14.0317    6.165643     -2.28    0.023     -26.16035    -1.903045
     emplw14 |    66.97441    15.06431      4.45    0.000      37.34087     96.60795
       _cons |   -10.27371    3.391766     -3.03    0.003     -16.94577    -3.601645
-------------+----------------------------------------------------------------

.
. scalar tw1nobf = e(r2_a)

.
.
. set more off

. sw, pr(.1): regress WHPpain age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 ///
>   radtlw1 havmil bfmPain2 avgcumdosew1 if gender==1, vce(cluster id)


  begin with full model


p = 0.9924 >= 0.1000  removing inc3w1


p = 0.8913 >= 0.1000  removing emplw16


p = 0.8004 >= 0.1000  removing marrw13


p = 0.7832 >= 0.1000  removing occ4w1


p = 0.8455 >= 0.1000  removing occ6w1


p = 0.5846 >= 0.1000  removing inc2w1


p = 0.6029 >= 0.1000  removing emplw15


p = 0.5314 >= 0.1000  removing occ8w1


p = 0.4662 >= 0.1000  removing childw1


p = 0.4190 >= 0.1000  removing occ1w1


p = 0.4152 >= 0.1000  removing emplw12


p = 0.3917 >= 0.1000  removing radhlw1


p = 0.3459 >= 0.1000  removing radtlw1


p = 0.3545 >= 0.1000  removing occ7w1


p = 0.3038 >= 0.1000  removing havmil


p = 0.2757 >= 0.1000  removing educ2


p = 0.7130 >= 0.1000  removing educ7


p = 0.5427 >= 0.1000  removing educ5


p = 0.8687 >= 0.1000  removing educ6


p = 0.2450 >= 0.1000  removing marrw15


p = 0.2087 >= 0.1000  removing occ3w1


p = 0.1542 >= 0.1000  removing emplw13


p = 0.1645 >= 0.1000  removing inc1w1


p = 0.1229 >= 0.1000  removing marrw11


p = 0.1034 >= 0.1000  removing educ3


Linear regression                                      Number of obs =     338
                                                       F( 10,   337) = 1781.31
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.3352
                                                       Root MSE      =  13.535

(Std. Err. adjusted for 338 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .2137241    .0759121      2.82    0.005      .0644028     .3630454
     emplw14 |    57.36412    3.004314     19.09    0.000      51.45455     63.27369
      inc4w1 |   -5.916867    1.990944     -2.97    0.003      -9.83311    -2.000623
       educ4 |    6.624702    3.224342      2.05    0.041      .2823305     12.96707
avgcumdosew1 |     1.02339    .2937807      3.48    0.001      .4455153     1.601265
    bfmPain2 |   -1.292209    .1909542     -6.77    0.000     -1.667821    -.9165968
      occ2w1 |    -3.96586    2.392116     -1.66    0.098      -8.67122     .7394994
      occ5w1 |   -5.379656    2.751939     -1.95    0.051      -10.7928     .0334864
     marrw12 |   -9.335227    2.562817     -3.64    0.000     -14.37636    -4.294094
     radchw1 |    .0623796    .0209609      2.98    0.003      .0211489     .1036102
       _cons |    28326.42     4187.98      6.76    0.000      20088.54     36564.29
-------------+----------------------------------------------------------------

.
. scalar tw1bf = e(r2_a)

. scalar list tw1bf
     tw1bf =  .31482609

. scalar NumMainEffsigTw1= 8

. scalar numbfsigtw1 = 1

. scalar dsigtw1 = 1

.
. scalar w1numbf = 1

.
.
.
. set more off

. sw, pr(.05): regress WHPpain age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 avgcumdosew1 ///
>   radtlw1 havmil if gender==1, vce(cluster id)


  begin with full model


p = 0.9980 >= 0.0500  removing inc3w1


p = 0.9184 >= 0.0500  removing inc2w1


p = 0.8818 >= 0.0500  removing childw1


p = 0.8608 >= 0.0500  removing occ4w1


p = 0.8097 >= 0.0500  removing emplw15


p = 0.7915 >= 0.0500  removing marrw13


p = 0.7400 >= 0.0500  removing radchw1


p = 0.5904 >= 0.0500  removing occ3w1


p = 0.5216 >= 0.0500  removing occ7w1


p = 0.5474 >= 0.0500  removing emplw16


p = 0.6914 >= 0.0500  removing emplw12


p = 0.4713 >= 0.0500  removing inc1w1


p = 0.3982 >= 0.0500  removing marrw11


p = 0.3889 >= 0.0500  removing havmil


p = 0.3342 >= 0.0500  removing occ1w1


p = 0.2937 >= 0.0500  removing radtlw1


p = 0.2856 >= 0.0500  removing emplw13


p = 0.3279 >= 0.0500  removing occ8w1


p = 0.2577 >= 0.0500  removing educ7


p = 0.1189 >= 0.0500  removing educ2


p = 0.1065 >= 0.0500  removing educ5


p = 0.6243 >= 0.0500  removing educ6


p = 0.0772 >= 0.0500  removing inc4w1


p = 0.0534 >= 0.0500  removing educ4


Linear regression                                      Number of obs =     338
                                                       F(  9,   337) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.2161
                                                       Root MSE      =  14.697

(Std. Err. adjusted for 338 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .370447    .0859366      4.31    0.000      .2014073     .5394867
     emplw14 |    69.49695     2.94801     23.57    0.000      63.69813     75.29576
       educ3 |    4.423629    1.893021      2.34    0.020       .700004     8.147254
     marrw15 |   -10.40288    4.451695     -2.34    0.020     -19.15949    -1.646272
      occ2w1 |   -5.126968    2.457363     -2.09    0.038      -9.96067    -.2932657
      occ6w1 |   -9.106343    2.909328     -3.13    0.002     -14.82907    -3.383612
     radhlw1 |    .0681153    .0246996      2.76    0.006      .0195304     .1167002
      occ5w1 |   -6.458561    2.513224     -2.57    0.011     -11.40215    -1.514978
     marrw12 |   -13.94486    2.600736     -5.36    0.000     -19.06059    -8.829144
avgcumdosew1 |    .8657503    .3141738      2.76    0.006      .2477616     1.483739
       _cons |   -11.75638    3.363204     -3.50    0.001      -18.3719    -5.140866
-------------+----------------------------------------------------------------

.
. xi:regress WHPpain age i.educ radhlw1
i.educ            _Ieducs1-8          (naturally coded; _Ieducs1 omitted)

      Source |       SS       df       MS              Number of obs =     702
-------------+------------------------------           F(  9,   692) =   16.79
       Model |  50684.8549     9  5631.65055           Prob > F      =  0.0000
    Residual |  232077.201   692  335.371678           R-squared     =  0.1792
-------------+------------------------------           Adj R-squared =  0.1686
       Total |  282762.056   701  403.369553           Root MSE      =  18.313

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .4955047    .0622239      7.96    0.000      .3733344      .617675
    _Ieducs2 |    18.35054    18.58397      0.99    0.324      -18.1372     54.83827
    _Ieducs3 |    13.69782     18.4053      0.74    0.457     -22.43911     49.83475
    _Ieducs4 |    14.16395    18.59427      0.76    0.446       -22.344     50.67191
    _Ieducs5 |     7.10189    18.45724      0.38    0.701     -29.13701     43.34079
    _Ieducs6 |    5.322403    18.41037      0.29    0.773     -30.82448     41.46929
    _Ieducs7 |   -4.840321    19.79789     -0.24    0.807     -43.71146     34.03082
    _Ieducs8 |   -9.883076    22.44857     -0.44    0.660     -53.95855     34.19239
     radhlw1 |     .035088    .0194962      1.80    0.072     -.0031908     .0733668
       _cons |   -21.65963     18.8139     -1.15    0.250     -58.59881     15.27954
-------------+----------------------------------------------------------------

. matrix define x1= e(b)

. local cn1 :colnames(x1)

. di "`cn1'"
age _Ieducs2 _Ieducs3 _Ieducs4 _Ieducs5 _Ieducs6 _Ieducs7 _Ieducs8 radhlw1 _cons

. local lcn1=length("`cn1'")

. di `lcn1'
80

. local lcn2 = `lcn1'-6

. di `lcn2'
74

. local nuvlist = substr("`cn1'",1,74)

. di "`nuvlist'"
age _Ieducs2 _Ieducs3 _Ieducs4 _Ieducs5 _Ieducs6 _Ieducs7 _Ieducs8 radhlw1

.
. foreach x in `nuvlist' {
  2. foreach y in `nuvlist' {
  3. cap gen `x'X`y' = `x'*`y'
  4. }
  5. }

.
. forvalues i=1/8 {
  2. cap gen ageXeduc`i' = age*educ`i'
  3. cap gen radhlw1Xeduc`i' = radhlw1*educ`i'
  4. }

.
. forvalues i=1/8 {
  2. cap gen ageXd1 = age*avgcumdosew1
  3. cap gen educ`i'Xd1 = educ`i'*avgcumdosew1
  4. }

.
.
. regress WHPpain age  educ1-educ7 radhlw1 ageXd1 educ1Xd1-educ8Xd1  ///
>  if gender==1
note: educ1 omitted because of collinearity
note: educ1Xd1 omitted because of collinearity

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 16,   323) =    4.05
       Model |  15327.7254    16  957.982835           Prob > F      =  0.0000
    Residual |  76421.2769   323   236.59838           R-squared     =  0.1671
-------------+------------------------------           Adj R-squared =  0.1258
       Total |  91749.0022   339  270.646024           Root MSE      =  15.382

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .2507746    .0989184      2.54    0.012      .0561689     .4453803
       educ1 |           0   (omitted)
       educ2 |    39.18812    42.88403      0.91    0.361     -45.17916     123.5554
       educ3 |    35.72758    34.95347      1.02    0.307     -33.03762     104.4928
       educ4 |     39.3771    36.22642      1.09    0.278     -31.89242     110.6466
       educ5 |    31.83792    34.94226      0.91    0.363     -36.90523     100.5811
       educ6 |    33.01849    34.93462      0.95    0.345     -35.70963     101.7466
       educ7 |   -11.56468    51.74847     -0.22    0.823     -113.3713     90.24194
     radhlw1 |     .057103    .0245716      2.32    0.021      .0087624     .1054436
      ageXd1 |    .4923552    .2754055      1.79    0.075     -.0494598      1.03417
    educ1Xd1 |           0   (omitted)
    educ2Xd1 |   -63.94118    85.60658     -0.75    0.456      -232.358     104.4757
    educ3Xd1 |   -27.18719    17.10738     -1.59    0.113     -60.84314     6.468764
    educ4Xd1 |       -34.7    43.20174     -0.80    0.422     -119.6923     50.29232
    educ5Xd1 |   -26.25769      15.173     -1.73    0.084     -56.10807     3.592683
    educ6Xd1 |   -31.53157    16.65799     -1.89    0.059     -64.30343     1.240283
    educ7Xd1 |    76.90242    116.3409      0.66    0.509     -151.9792     305.7841
    educ8Xd1 |    34.27628    105.7142      0.32    0.746     -173.6991     242.2516
       _cons |   -37.51661    35.42864     -1.06    0.290     -107.2166     32.18341
-------------+----------------------------------------------------------------

.
.
.
. scalar numModsigMw1 = 0

. // there are no moderators in wave 1 for males for pain in full model
. // occupation is main effect
.
.
. scalar tw1nobf = e(r2_a)

.
. scalar r2chabf = tw1bf - tw1nobf

.
. sw, pr(.1):regress WHPpain age  marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 ///
>   radtlw1 havmil educ2-educ7   ///
>    ageXd1 educ2Xd1-educ8Xd1 if gender==1


  begin with full model


p = 0.9900 >= 0.1000  removing inc3w1


p = 0.9838 >= 0.1000  removing emplw15


p = 0.8778 >= 0.1000  removing inc2w1


p = 0.8293 >= 0.1000  removing childw1


p = 0.8375 >= 0.1000  removing marrw13


p = 0.8939 >= 0.1000  removing emplw16


p = 0.8362 >= 0.1000  removing educ2Xd1


p = 0.8231 >= 0.1000  removing educ4Xd1


p = 0.8005 >= 0.1000  removing educ7


p = 0.7442 >= 0.1000  removing occ4w1


p = 0.6394 >= 0.1000  removing radchw1


p = 0.6219 >= 0.1000  removing occ7w1


p = 0.7054 >= 0.1000  removing emplw12


p = 0.5985 >= 0.1000  removing occ3w1


p = 0.5894 >= 0.1000  removing educ8Xd1


p = 0.5502 >= 0.1000  removing havmil


p = 0.4837 >= 0.1000  removing inc1w1


p = 0.4546 >= 0.1000  removing educ7Xd1


p = 0.4121 >= 0.1000  removing occ5w1


p = 0.3755 >= 0.1000  removing educ2


p = 0.3741 >= 0.1000  removing marrw11


p = 0.3522 >= 0.1000  removing emplw13


p = 0.2897 >= 0.1000  removing occ6w1


p = 0.3503 >= 0.1000  removing occ2w1


p = 0.1919 >= 0.1000  removing marrw15


p = 0.1797 >= 0.1000  removing radtlw1


p = 0.2092 >= 0.1000  removing educ3Xd1


p = 0.1616 >= 0.1000  removing educ5Xd1


p = 0.1693 >= 0.1000  removing educ5


p = 0.4813 >= 0.1000  removing educ6


p = 0.1170 >= 0.1000  removing inc4w1


      Source |       SS       df       MS              Number of obs =     338
-------------+------------------------------           F( 10,   327) =    9.51
       Model |  20302.4678    10  2030.24678           Prob > F      =  0.0000
    Residual |   69802.964   327  213.464722           R-squared     =  0.2253
-------------+------------------------------           Adj R-squared =  0.2016
       Total |  90105.4318   337  267.375169           Root MSE      =   14.61

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .4539952    .1066114      4.26    0.000      .2442645     .6637259
    educ6Xd1 |   -3.031664    1.516475     -2.00    0.046     -6.014943     -.048386
     marrw12 |   -14.34308    6.092695     -2.35    0.019      -26.3289    -2.357253
      ageXd1 |    .0214993    .0090368      2.38    0.018      .0037217     .0392768
      occ8w1 |    6.334108    2.683955      2.36    0.019      1.054111      11.6141
      occ1w1 |    4.379166    2.287349      1.91    0.056     -.1206106     8.878943
       educ3 |    5.182076    1.820846      2.85    0.005      1.600025     8.764126
       educ4 |    6.775754    4.070995      1.66    0.097     -1.232891      14.7844
     emplw14 |     67.3727    14.90799      4.52    0.000      38.04504     96.70037
     radhlw1 |    .0648561     .022986      2.82    0.005       .019637     .1100752
       _cons |   -20.48055    6.022343     -3.40    0.001     -32.32798    -8.633129
-------------+----------------------------------------------------------------

. scalar numMainEffsigTw1 = 5

. scalar numModsigTw1 = 1

.
. // in trimmed model for wave 1 age is a moderator in wave 1 for males
. // a technical degree is also a moderator for males
. matrix define maleWHPpainr2 = J(12,5,0)

. matrix colnames maleWHPpainr2 = FullBFR2a TR2aBF  TR2aNoBF  NumBF  BFR2cha

. matrix rownames maleWHPpainr2 = wave1  wave2  wave3  avg

. matlist maleWHPpainr2

   | FullBFR2a    TR2aBF    TR2aNoBF    NumBF    BFR2cha
-------------+-------------------------------------------------------
wave1   |         0            0            0            0            0
wave2   |         0            0            0            0            0
wave3   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0
avg   |         0            0            0            0            0

.
.
. matrix define maleWHPpainr2w1 = ( Mw1 , tw1bf, tw1nobf, w1numbf, r2chabf)

. matrix colnames maleWHPpainr2w1 = FullBFR2a TR2aBF  TR2aNoBF  NumBF  BFR2cha

. matrix rownames maleWHPpainr2w1 = wave1

.
.
. matlist maleWHPpainr2w1

   | FullBFR2a    TR2aBF    TR2aNoBF    NumBF    BFR2cha
-------------+-------------------------------------------------------
wave1   |  .3020449     .3148261     .1258014            1     .1890247

. cap gen whppain=WHPpain

.
. *-------Mediators for wave 1 male Pain---------------------------------------
. // age is possible mediator at wave1 for male Pain
. // technical degree is another possible mediator
. // self-perceived health threat is another mediator for male pain in wave 1
. // threat to family is not
. sem (avgcumdosew1->age)(age->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  age whppain


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

Iteration 0:   log likelihood = -3404.7244
Iteration 1:   log likelihood = -3404.7244

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3404.7244

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   age <-         |
    avgcumdosew1 |    .6719789    .3955154      1.70    0.089     -.1032171     1.447175
           _cons |    48.89394    .6805861     71.84    0.000      47.56001     50.22786
  ---------------+----------------------------------------------------------------
   whppain <-     |
             age |    .4154505     .069434      5.98    0.000      .2793624     .5515386
           _cons |   -10.25319    3.518491     -2.91    0.004      -17.1493     -3.35707
-----------------+----------------------------------------------------------------
 Variance         |
           e.age |    147.6893    11.32726                    127.0764     171.6459
       e.whppain |    244.1425    18.72488                    210.0677     283.7446
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.72, Prob > chi2 = 0.0993

. sem (avgcumdosew1-> radtlw1)(radtlw1->whppain) if gender==1, nocapslatent
(1 observations with missing values excluded;
 specify option 'method(mlmv)' to use all observations)

Endogenous variables


Observed:  radtlw1 whppain


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

Iteration 0:   log likelihood = -3781.5071
Iteration 1:   log likelihood = -3781.5071

Structural equation model                       Number of obs      =       339
 Estimation method = ml
 Log likelihood    = -3781.5071

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radtlw1 <-     |
    avgcumdosew1 |   -.0299655    1.183144     -0.03    0.980     -2.348885     2.288954
           _cons |    53.53795    2.038815     26.26    0.000      49.54194     57.53395
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radtlw1 |     .053951    .0243892      2.21    0.027      .0061491      .101753
           _cons |    7.321943     1.57806      4.64    0.000      4.229003     10.41488
-----------------+----------------------------------------------------------------
 Variance         |
       e.radtlw1 |    1321.568    101.5091                    1136.866     1536.279
       e.whppain |    266.4927    20.46918                    229.2477     309.7888
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.41, Prob > chi2 = 0.0357

. sem (avgcumdosew1-> educ6)(educ6-> whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  educ6 whppain


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

Iteration 0:   log likelihood = -2330.2857
Iteration 1:   log likelihood = -2330.2857

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -2330.2857

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   educ6 <-       |
    avgcumdosew1 |   -.0149846    .0160892     -0.93    0.352     -.0465188     .0165496
           _cons |    .4358432    .0276856     15.74    0.000      .3815804     .4901059
  ---------------+----------------------------------------------------------------
   whppain <-     |
           educ6 |    -4.21421    1.785226     -2.36    0.018     -7.713189    -.7152303
           _cons |    11.98928     1.16985     10.25    0.000      9.696414     14.28214
-----------------+----------------------------------------------------------------
 Variance         |
         e.educ6 |    .2443938    .0187441                    .2102839     .2840366
       e.whppain |    265.4986    20.36281                    228.4431     308.5648
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.95, Prob > chi2 = 0.0470

. sem (avgcumdosew1->radhlw1)(radhlw1-> whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radhlw1 whppain


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

Iteration 0:   log likelihood = -3793.2206
Iteration 1:   log likelihood = -3793.2206

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3793.2206

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radhlw1 <-     |
    avgcumdosew1 |    2.398285    1.204853      1.99    0.047      .0368169     4.759752
           _cons |    44.66477    2.073259     21.54    0.000      40.60126     48.72828
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radhlw1 |    .0901847    .0234202      3.85    0.000      .0442819     .1360875
           _cons |    6.058736    1.380495      4.39    0.000      3.353015     8.764457
-----------------+----------------------------------------------------------------
 Variance         |
       e.radhlw1 |    1370.535    105.1152                     1179.25     1592.848
       e.whppain |    258.5732    19.83166                    222.4842      300.516
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.98, Prob > chi2 = 0.0844

. sem (avgcumdosew1-> radfmw1)(radfmw1-> whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radfmw1 whppain


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

Iteration 0:   log likelihood = -3778.8323
Iteration 1:   log likelihood = -3778.8323

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3778.8323

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radfmw1 <-     |
    avgcumdosew1 |    1.273087    1.149507      1.11    0.268     -.9799062      3.52608
           _cons |    50.33594    1.978023     25.45    0.000      46.45909      54.2128
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radfmw1 |    .0839905    .0247623      3.39    0.001      .0354573     .1325237
           _cons |    5.906014    1.534668      3.85    0.000       2.89812     8.913909
-----------------+----------------------------------------------------------------
 Variance         |
       e.radfmw1 |    1247.515    95.68004                      1073.4     1449.873
       e.whppain |    261.0178    20.01915                    224.5877     303.3572
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.69, Prob > chi2 = 0.0548

.
. // we do not count constant as a main effect
. matrix define H1p1MPnDosew1 = J(1,12,0)

. matrix define H1p1MPnDosew1 = (hyp, pt, wv, dsigMw1, dsigtw1, numMainEffsigMw1, numMainEffsigTw1, numModsigMw1, numModsigTw1,numbfsigMw1,numbfsigtw1, 2)

. matrix  colnames H1p1MPnDosew1 = hypnum ptnum wv dsigMw1 dsigtw1 numMainEffsigMw1 numMainEffsigTw1 numModMw1 numModTw1 numbfsigMw1 numbfsigtw1 numMedw1

. matrix  rownames H1p1MPnDosew1 = wave1

. matlist H1p1MPnDosew1

   | hypnum    ptnum    wv    dsigMw1    dsigtw1    numMain~1    numMain~1    numModMw1    numModTw1    numbfsi~1    numbfsi~1    numMedw1
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave1   |         1            1            1            1            1            7            5            0            1            1            1            2

.
.
.  scalar FemPainW1Meds = "self-perceived Chornobyl helath threat is a mediator as is technical education and age for male pain"

. *  Wave 2 begins here------------------------------------------------------------------------------------------------------------------------------
. scalar wv = 2

.
. matrix define H1p1MPnDosew2 = J(1,12,0)

. matrix  colnames H1p1MPnDosew2 = hypnum ptnum wv dsigFw2 dsigtw2 numMainEffsigFw2 numMainEffsigTw2 numModmw2 numModTw2 numbfsigmw2 numbfsigtw2 numMedw2

. matrix  rownames H1p1MPnDosew2 = wave2

. matlist H1p1MPnDosew2

   | hypnum    ptnum    wv    dsigFw2    dsigtw2    numMain~2    numMain~2    numModmw2    numModTw2    numbfsi~2    numbfsi~2    numMedw2
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave2   |         0            0            0            0            0            0            0            0            0            0            0            0

.
.
. regress WHPpain age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw2 ///
>   radtlw2 havmil avgcumdosew2 if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 34,   305) =    3.60
       Model |  26266.6774    34  772.549336           Prob > F      =  0.0000
    Residual |  65482.3248   305  214.696147           R-squared     =  0.2863
-------------+------------------------------           Adj R-squared =  0.2067
       Total |  91749.0022   339  270.646024           Root MSE      =  14.653

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3771163    .1064814      3.54    0.000      .1675851     .5866475
       educ2 |    10.04388    11.69507      0.86    0.391     -12.96935     33.05712
       educ3 |    17.91679    10.78304      1.66    0.098     -3.301771     39.13535
       educ4 |    19.33381    11.43144      1.69    0.092     -3.160664     41.82828
       educ5 |    13.62762    10.82004      1.26    0.209     -7.663762       34.919
       educ6 |    12.19203    10.70843      1.14    0.256     -8.879734     33.26379
       educ7 |    6.055893    13.04075      0.46    0.643     -19.60533     31.71711
     marrw21 |    5.000512    5.914029      0.85    0.398     -6.636951     16.63798
     marrw22 |   -2.611637    7.152872     -0.37    0.715     -16.68686     11.46359
     marrw23 |    3.275159    5.555036      0.59    0.556     -7.655888     14.20621
     marrw25 |     -.40721    8.217966     -0.05    0.961      -16.5783     15.76388
     childw2 |    -2.36555    1.424667     -1.66    0.098     -5.168971      .437871
     emplw22 |    3.843285    17.31772      0.22    0.825     -30.23404     37.92061
     emplw23 |    4.346027    17.48811      0.25    0.804     -30.06659     38.75864
     emplw24 |    69.33913    22.99171      3.02    0.003      24.09667     114.5816
     emplw25 |    6.723168    18.83398      0.36    0.721     -30.33782     43.78416
     emplw26 |    .4839549    17.81872      0.03    0.978     -34.57923     35.54714
      occ1w2 |    2.140601    8.570228      0.25    0.803     -14.72366     19.00486
      occ2w2 |   -1.493166    8.638606     -0.17    0.863     -18.49198     15.50564
      occ3w2 |   -3.702321    9.108779     -0.41    0.685     -21.62632     14.22168
      occ4w2 |   -1.881184     8.87254     -0.21    0.832     -19.34032     15.57796
      occ5w2 |   -.6396879    8.990837     -0.07    0.943     -18.33161     17.05223
      occ6w2 |   -8.008082    10.87049     -0.74    0.462     -29.39873     13.38257
      occ7w2 |   -4.014788    11.50224     -0.35    0.727     -26.64857     18.61899
      occ8w2 |    -1.53193    9.198587     -0.17    0.868     -19.63266      16.5688
      inc1w2 |   -.9896945    8.336751     -0.12    0.906     -17.39452     15.41513
      inc2w2 |   -3.167721    7.791184     -0.41    0.685       -18.499     12.16356
      inc3w2 |    -3.17055    7.766234     -0.41    0.683     -18.45273     12.11163
      inc4w2 |   -10.75461    8.724107     -1.23    0.219     -27.92167     6.412447
     radhlw2 |    .1085807    .0278448      3.90    0.000      .0537885      .163373
     radchw2 |    .0464252    .0303581      1.53    0.127     -.0133127     .1061631
     radtlw2 |    .0188118       .0315      0.60    0.551     -.0431729     .0807966
      havmil |    .0084896     .008032      1.06    0.291     -.0073155     .0242947
avgcumdosew2 |    .4806659     .333829      1.44    0.151     -.1762336     1.137565
       _cons |   -33.33846    21.39799     -1.56    0.120     -75.44483     8.767918
-------------+----------------------------------------------------------------

.
.  local bfw2 bfmPain2  bfmPain6 bfmPain15

.
.
.  foreach var in bfmPain2 bfmPain6 bfmPain15 {
  2.  cap gen `var'Xd2 = `var'*avgcumdosew2
  3.  }

.
.
. set more off

. regress WHPpain age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw2 ///
>   radtlw2 havmil `bfw2' avgcumdosew2  if gender==1
note: havmil omitted because of collinearity

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 36,   303) =    6.20
       Model |  38916.2286    36  1081.00635           Prob > F      =  0.0000
    Residual |  52832.7736   303   174.36559           R-squared     =  0.4242
-------------+------------------------------           Adj R-squared =  0.3557
       Total |  91749.0022   339  270.646024           Root MSE      =  13.205

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1372624    .1003269      1.37    0.172     -.0601633     .3346881
       educ2 |    4.503516    10.55988      0.43    0.670     -16.27647      25.2835
       educ3 |    6.851979    9.804803      0.70    0.485     -12.44215     26.14611
       educ4 |    12.43381    10.33422      1.20    0.230     -7.902123     32.76973
       educ5 |    6.376196    9.788326      0.65    0.515     -12.88551      25.6379
       educ6 |    4.683824    9.691295      0.48    0.629     -14.38694     23.75459
       educ7 |    4.635343    11.75828      0.39    0.694     -18.50288     27.77357
     marrw21 |    4.624817    5.329981      0.87    0.386     -5.863647     15.11328
     marrw22 |   -1.701201    6.447406     -0.26    0.792     -14.38856     10.98616
     marrw23 |    .3889007     5.01959      0.08    0.938     -9.488769     10.26657
     marrw25 |   -1.739404    7.421423     -0.23    0.815     -16.34346     12.86465
     childw2 |   -1.365445    1.291656     -1.06    0.291     -3.907197     1.176306
     emplw22 |    13.69635    15.69998      0.87    0.384     -17.19845     44.59115
     emplw23 |    14.29725    15.85764      0.90    0.368      -16.9078     45.50231
     emplw24 |    76.27473    20.73735      3.68    0.000      35.46727     117.0822
     emplw25 |     20.0652    17.09714      1.17    0.241     -13.57895     53.70936
     emplw26 |    10.03578    16.17153      0.62    0.535     -21.78695     41.85851
      occ1w2 |   -2.816308    7.758874     -0.36    0.717     -18.08441     12.45179
      occ2w2 |   -6.469013    7.819234     -0.83    0.409     -21.85589     8.917864
      occ3w2 |   -7.175909    8.246931     -0.87    0.385     -23.40442     9.052601
      occ4w2 |   -6.351477     8.03541     -0.79    0.430     -22.16375     9.460798
      occ5w2 |    -4.54349    8.144124     -0.56    0.577     -20.56969     11.48271
      occ6w2 |   -9.522378    9.799094     -0.97    0.332     -28.80527     9.760515
      occ7w2 |   -9.631135    10.38815     -0.93    0.355     -30.07319     10.81092
      occ8w2 |   -8.160161    8.342018     -0.98    0.329     -24.57579     8.255463
      inc1w2 |    3.982565    7.535754      0.53    0.598     -10.84647      18.8116
      inc2w2 |    1.532259    7.043758      0.22    0.828     -12.32862     15.39313
      inc3w2 |    2.533197    7.030899      0.36    0.719     -11.30238     16.36877
      inc4w2 |    -.963368    7.947352     -0.12    0.904     -16.60236     14.67562
     radhlw2 |    .0075941    .0290469      0.26    0.794     -.0495651     .0647534
     radchw2 |    .0540667    .0280864      1.93    0.055     -.0012024     .1093357
     radtlw2 |    .0386989    .0285039      1.36    0.176     -.0173917     .0947895
      havmil |           0   (omitted)
    bfmPain2 |    3.032688    .9416585      3.22    0.001       1.17967     4.885706
    bfmPain6 |   -.0031685     .007328     -0.43    0.666     -.0175887     .0112516
   bfmPain15 |   -.0001885    .0000404     -4.67    0.000      -.000268     -.000109
avgcumdosew2 |    .5281081    .3017647      1.75    0.081     -.0657118     1.121928
       _cons |    24148.01    4037.762      5.98    0.000       16202.4     32093.61
-------------+----------------------------------------------------------------

.
. scalar mw2 = e(r2_a)

. scalar dsigFw2 = .5

. scalar numMainEffsigFw2 = 3

. scalar numbfsigFw2 = 3

. scalar numModsigFw2 = 6

.
. // wave 2 trimmed model of possible socio-demog covariates male model
. set more off

. sw, pr(.05):  regress WHPpain age educ2-educ7 marrw21-marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 avgcumdosew2 if gender==1


  begin with full model


p = 0.9388 >= 0.0500  removing marrw23


p = 0.8892 >= 0.0500  removing inc2w2


p = 0.7338 >= 0.0500  removing inc3w2


p = 0.6911 >= 0.0500  removing marrw25


p = 0.6369 >= 0.0500  removing educ7


p = 0.6116 >= 0.0500  removing marrw24


p = 0.5695 >= 0.0500  removing emplw22


p = 0.8370 >= 0.0500  removing emplw26


p = 0.5519 >= 0.0500  removing occ1w2


p = 0.4866 >= 0.0500  removing emplw23


p = 0.4877 >= 0.0500  removing educ2


p = 0.5087 >= 0.0500  removing occ5w2


p = 0.3471 >= 0.0500  removing occ3w2


p = 0.3702 >= 0.0500  removing occ4w2


p = 0.3145 >= 0.0500  removing marrw22


p = 0.2864 >= 0.0500  removing occ7w2


p = 0.6595 >= 0.0500  removing emplw25


p = 0.2554 >= 0.0500  removing occ2w2


p = 0.2243 >= 0.0500  removing educ6


p = 0.2763 >= 0.0500  removing educ5


p = 0.2185 >= 0.0500  removing childw2


p = 0.2095 >= 0.0500  removing inc1w2


p = 0.1687 >= 0.0500  removing occ6w2


p = 0.1314 >= 0.0500  removing occ8w2


p = 0.0963 >= 0.0500  removing avgcumdosew2


p = 0.0798 >= 0.0500  removing marrw21


p = 0.0680 >= 0.0500  removing educ4


p = 0.0686 >= 0.0500  removing inc4w2


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F(  3,   336) =   19.81
       Model |  13788.8846     3  4596.29485           Prob > F      =  0.0000
    Residual |  77960.1177   336   232.02416           R-squared     =  0.1503
-------------+------------------------------           Adj R-squared =  0.1427
       Total |  91749.0022   339  270.646024           Root MSE      =  15.232

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3720977    .0683284      5.45    0.000      .2376925      .506503
     emplw24 |    63.77576    15.38899      4.14    0.000      33.50485     94.04666
       educ3 |    4.082125    1.754096      2.33    0.021       .631732     7.532517
       _cons |   -9.677283    3.472557     -2.79    0.006     -16.50797    -2.846591
-------------+----------------------------------------------------------------

.
. local bfw2 bfmPain2 bfmPain4 bfmPain7 bfmPain9 bfmPain11 ///
>    bfmPain14 bfmPain15 bfmPain16 bfmPain18

.
.
. des WHPpain age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw2 ///
>   radtlw2 havmil avgcumdosew2 `bfw2'

              storage  display     value
variable name   type   format      label      variable label
-------------


WHPpain           double   %9.0g                        Wtd Health Profile Pain Pt 1 subscale


age               byte     %8.0g                    *   Respondent's age


educ2             byte     %8.0g                        educ==2. graduated high school


educ3             byte     %8.0g                        educ==3. technical degree


educ4             byte     %8.0g                        educ==4. did not finish college/bachelor's


educ5             byte     %8.0g                        educ==5. graduated college/bachelor's


educ6             byte     %8.0g                        educ==6. finished specialist/master's degree


educ7             byte     %8.0g                        educ==7. doctor of science/phd


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw25           byte     %8.0g                        marrw2==5. divorced


childw2           byte     %8.0g                        number of children in 1996


emplw22           byte     %8.0g                        emplw2==1. full time


emplw23           byte     %8.0g                        emplw2==2. part time


emplw24           byte     %8.0g                        emplw2==3. voluntary


emplw25           byte     %8.0g                        emplw2==4. retired


emplw26           byte     %8.0g                        emplw2==5. unemployed


occ1w2            byte     %15.0g        LABJ           profess executive administration in 1996


occ2w2            byte     %15.0g        LABJ           technical sales admin support in 1996


occ3w2            byte     %15.0g        LABJ           service occup protective services in 1996


occ4w2            byte     %15.0g        LABJ           precision prod mechan craft construction in 1996


occ5w2            byte     %15.0g        LABJ           factory laborer machinist transp cleaner in 1996


occ6w2            byte     %15.0g        LABJ           farming agricul forestry fishing trapping logging in 1996


occ7w2            byte     %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            byte     %15.0g        LABJ           student in 1996


inc1w2            byte     %15.0g        LABJ           Income is not sufficient for basic neccessities in 1996


inc2w2            byte     %15.0g        LABJ           Income is just sufficient for basic neccessities in 1996


inc3w2            byte     %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings in 1996


inc4w2            byte     %15.0g        LABJ           Income allows to comfortably afford luxury items in 1996


radhlw2           byte     %8.0g                        how much believed personal health is affected by radiation in 1996


radchw2           byte     %8.0g                        believed % of polution related to chornobyl in 1996


radtlw2           byte     %8.0g                        believed % of cumulative radiation exposed to in a lifetime in 1996


havmil            double   %9.0g                        Distance from Chornobyl in miles


avgcumdosew2      double   %8.0g                        Average mean dose CS1337 in mGy for wave 2


bfmPain2          float    %9.0g                        max(0, 21935 - BSIsoma)


bfmPain4          float    %9.0g                        max(0, 21918 - illw3)


bfmPain7          float    %9.0g                        (trrepw2 != . ) * bfmPain5


bfmPain9          float    %9.0g                        max(0, trrepw2 - 21996) * bfmPain7


bfmPain11         float    %9.0g                        max(0, BSIpsyc - 21920) * bfmPain6


bfmPain14         float    %9.0g                        max(0, illw3 - 21918) * bfmPain2


bfmPain15         float    %9.0g                        max(0, 21918 - illw3) * bfmPain2


bfmPain16         float    %9.0g                        max(0, accdw2 - 21917) * bfmPain2


bfmPain18         float    %9.0g                        max(0, suchrw2 - 21916) * bfmPain1


.
.  foreach var in bfmPain2 bfmPain6 bfmPain115 {
  2.  cap gen `var'Xd2 = `var'*avgcumdosew2
  3.  }

.
. local bfw2b bfmPain2 bfmPain7 bfmPain9 bfmPain11 bfmPain15

.
.
. set more off

. sw, pr(.10): regress WHPpain age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw2 ///
>   radtlw2 havmil `bfw2b' avgcumdosew2  if gender==1
note: bfmPain7 dropped because of collinearity
note: bfmPain9 dropped because of collinearity
note: bfmPain11 dropped because of collinearity


  begin with full model


p = 0.9383 >= 0.1000  removing marrw23


p = 0.9018 >= 0.1000  removing inc4w2


p = 0.8033 >= 0.1000  removing radhlw2


p = 0.7103 >= 0.1000  removing marrw25


p = 0.6917 >= 0.1000  removing educ7


p = 0.8533 >= 0.1000  removing educ2


p = 0.8726 >= 0.1000  removing educ6


p = 0.6638 >= 0.1000  removing marrw22


p = 0.6598 >= 0.1000  removing havmil


p = 0.5508 >= 0.1000  removing inc2w2


p = 0.6148 >= 0.1000  removing occ1w2


p = 0.5963 >= 0.1000  removing emplw26


p = 0.6130 >= 0.1000  removing occ5w2


p = 0.4766 >= 0.1000  removing inc3w2


p = 0.4233 >= 0.1000  removing inc1w2


p = 0.3751 >= 0.1000  removing childw2


p = 0.3677 >= 0.1000  removing educ5


p = 0.3794 >= 0.1000  removing emplw22


p = 0.6491 >= 0.1000  removing emplw23


p = 0.3535 >= 0.1000  removing educ3


p = 0.4076 >= 0.1000  removing occ4w2


p = 0.4099 >= 0.1000  removing occ6w2


p = 0.4016 >= 0.1000  removing occ3w2


p = 0.3547 >= 0.1000  removing age


p = 0.2377 >= 0.1000  removing occ7w2


p = 0.2009 >= 0.1000  removing emplw25


p = 0.1430 >= 0.1000  removing radtlw2


p = 0.1178 >= 0.1000  removing occ2w2


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F(  8,   331) =   26.77
       Model |  36042.1364     8  4505.26705           Prob > F      =  0.0000
    Residual |  55706.8658   331  168.298688           R-squared     =  0.3928
-------------+------------------------------           Adj R-squared =  0.3782
       Total |  91749.0022   339  270.646024           Root MSE      =  12.973

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
   bfmPain15 |   -.0002064    .0000364     -5.67    0.000      -.000278    -.0001349
     radchw2 |    .0710698    .0218731      3.25    0.001      .0280418     .1140977
      occ8w2 |   -4.792959    2.545899     -1.88    0.061     -9.801141     .2152237
       educ4 |    7.905244    3.553388      2.22    0.027      .9151715     14.89532
     emplw24 |    63.07084     13.1305      4.80    0.000       37.2411     88.90058
    bfmPain2 |    3.270571    .8479038      3.86    0.000      1.602611     4.938531
avgcumdosew2 |    .5036718    .2846708      1.77    0.078     -.0563202     1.063664
     marrw21 |    3.837144    1.963755      1.95    0.052     -.0258707     7.700159
       _cons |    27500.64    3099.335      8.87    0.000      21403.77     33597.52
-------------+----------------------------------------------------------------

. scalar numbfsigMw2=0

.
. scalar dsigtw2 = .5

. scalar numMainEffsigTw2 = 4

.
. scalar tw2bf = e(r2_a)

.
. foreach var in bfmPain2 bfmPain6 bfmPain15 {
  2.    replace `var'Xd2 = `var'*avgcumdosew2
  3.  }
(0 real changes made)
(0 real changes made)
(0 real changes made)

.
.
.
. local bfw2b bfmPain2 bfmPain15 bfmPain2Xd2-bfmPain6Xd2

.
. set more off

. regress WHPpain age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw2 ///
>   radtlw2 havmil avgcumdosew2 `bfw2b' if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 38,   301) =    5.87
       Model |  39045.5801    38  1027.51527           Prob > F      =  0.0000
    Residual |  52703.4221   301  175.094426           R-squared     =  0.4256
-------------+------------------------------           Adj R-squared =  0.3531
       Total |  91749.0022   339  270.646024           Root MSE      =  13.232

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .137879    .1006803      1.37    0.172     -.0602474     .3360055
       educ2 |    4.754344    10.58758      0.45    0.654     -16.08071     25.58939
       educ3 |    7.156896    9.836128      0.73    0.467     -12.19939     26.51318
       educ4 |    12.61183    10.36258      1.22    0.225      -7.78046     33.00411
       educ5 |    6.581911    9.812548      0.67    0.503     -12.72797     25.89179
       educ6 |     4.82029    9.718077      0.50    0.620     -14.30369     23.94427
       educ7 |    4.955228    11.78882      0.42    0.675     -18.24372     28.15418
     marrw21 |    4.295915    5.367577      0.80    0.424     -6.266815     14.85864
     marrw22 |   -1.923938    6.472809     -0.30    0.766     -14.66163     10.81375
     marrw23 |    .2532928    5.032987      0.05    0.960     -9.651005     10.15759
     marrw25 |   -1.357214    7.471008     -0.18    0.856     -16.05924     13.34481
     childw2 |   -1.417773    1.305689     -1.09    0.278     -3.987207      1.15166
     emplw22 |    13.75118    15.73571      0.87    0.383     -17.21475      44.7171
     emplw23 |    14.30687    15.89362      0.90    0.369     -16.96981     45.58356
     emplw24 |    76.01435    20.78299      3.66    0.000        35.116     116.9127
     emplw25 |    20.16248    17.13358      1.18    0.240     -13.55429     53.87926
     emplw26 |    9.927016    16.20917      0.61    0.541     -21.97064     41.82467
      occ1w2 |   -2.515186    7.790308     -0.32    0.747     -17.84555     12.81518
      occ2w2 |   -6.237534    7.840208     -0.80    0.427      -21.6661     9.191028
      occ3w2 |   -6.942006    8.270578     -0.84    0.402     -23.21748     9.333471
      occ4w2 |   -6.178669    8.056768     -0.77    0.444     -22.03339     9.676056
      occ5w2 |   -4.269816    8.169962     -0.52    0.602     -20.34729     11.80766
      occ6w2 |   -9.361629    9.822931     -0.95    0.341     -28.69194     9.968686
      occ7w2 |   -9.420584     10.4259     -0.90    0.367     -29.93747      11.0963
      occ8w2 |   -7.727746    8.375739     -0.92    0.357     -24.21017     8.754674
      inc1w2 |    4.119908    7.554316      0.55    0.586     -10.74605     18.98587
      inc2w2 |    1.783351    7.067061      0.25    0.801     -12.12375     15.69045
      inc3w2 |    2.621882    7.051951      0.37    0.710     -11.25549     16.49925
      inc4w2 |   -.7892289    7.968716     -0.10    0.921     -16.47068     14.89222
     radhlw2 |     .010297    .0292854      0.35    0.725     -.0473329      .067927
     radchw2 |    .0572084    .0283894      2.02    0.045      .0013416     .1130753
     radtlw2 |    .0376026    .0285947      1.32    0.190     -.0186683     .0938735
      havmil |    .0072902    .0093452      0.78    0.436     -.0110999     .0256804
avgcumdosew2 |   -359.9562    2141.987     -0.17    0.867     -4575.123     3855.211
    bfmPain2 |    3.018082    .9472812      3.19    0.002       1.15395     4.882215
   bfmPain15 |   -.0001881    .0000412     -4.57    0.000     -.0002692    -.0001071
 bfmPain2Xd2 |    .0016285    .1072546      0.02    0.988     -.2094354     .2126924
 bfmPain6Xd2 |    .0148063    .0206692      0.72    0.474      -.025868     .0554807
       _cons |    24213.37    4446.108      5.45    0.000      15463.98     32962.76
-------------+----------------------------------------------------------------

.
.
. local bfw2b bfmPain2 bfmPain15 bfmPain6Xd2

.
. set more off

. regress WHPpain age childw2 ///
>   emplw22-emplw26  radchw2 ///
>   avgcumdosew2 `bfw2b' if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 12,   327) =   17.40
       Model |  35752.4899    12  2979.37416           Prob > F      =  0.0000
    Residual |  55996.5123   327  171.243157           R-squared     =  0.3897
-------------+------------------------------           Adj R-squared =  0.3673
       Total |  91749.0022   339  270.646024           Root MSE      =  13.086

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1340205    .0890952      1.50    0.133     -.0412515     .3092925
     childw2 |   -1.831488    1.095187     -1.67    0.095     -3.985989     .3230129
     emplw22 |    6.563575    13.22508      0.50    0.620     -19.45339     32.58055
     emplw23 |    6.901782    13.34261      0.52    0.605      -19.3464     33.14997
     emplw24 |    64.70323    18.81619      3.44    0.001      27.68718     101.7193
     emplw25 |    10.61651    13.76271      0.77    0.441     -16.45811     37.69114
     emplw26 |    3.353471    13.52481      0.25    0.804     -23.25315     29.96009
     radchw2 |    .0808488    .0225258      3.59    0.000      .0365351     .1251625
avgcumdosew2 |   -243.6582    302.5147     -0.81    0.421     -838.7787     351.4623
    bfmPain2 |    3.060177    .8707754      3.51    0.001      1.347148     4.773205
   bfmPain15 |   -.0001939    .0000375     -5.17    0.000     -.0002676    -.0001202
 bfmPain6Xd2 |      .01113    .0137909      0.81    0.420         -.016       .03826
       _cons |    26085.47    3297.991      7.91    0.000      19597.51     32573.42
-------------+----------------------------------------------------------------

.
.
. * Moderator  Wave 2 male analysis
.
. foreach num in 2 5 6 7 9 16 18   {
  2. cap gen childw2*d2 = childw2*
  3. cap gen bfpn`num'Xd2 = bfmPain`num'*avgcumdosew2
  4.  }

.
.
. local bfw2b bfmPain2 bfmPain7 bfmPain9 bfmPain11 ///
>    bfmPain14 bfmPain16 bfmPain18

.
.
.
.
. // Full model
. set more off

. regress WHPpain age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw2 ///
>   radtlw2 havmil avgcumdosew2 bfmPain2 bfmPain15 if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 36,   303) =    6.20
       Model |  38916.2273    36  1081.00631           Prob > F      =  0.0000
    Residual |  52832.7749   303  174.365594           R-squared     =  0.4242
-------------+------------------------------           Adj R-squared =  0.3557
       Total |  91749.0022   339  270.646024           Root MSE      =  13.205

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1372623    .1003269      1.37    0.172     -.0601634     .3346881
       educ2 |    4.503514    10.55988      0.43    0.670     -16.27647      25.2835
       educ3 |    6.851979    9.804804      0.70    0.485     -12.44215     26.14611
       educ4 |    12.43381    10.33422      1.20    0.230     -7.902122     32.76973
       educ5 |    6.376195    9.788326      0.65    0.515     -12.88551      25.6379
       educ6 |    4.683825    9.691295      0.48    0.629     -14.38694     23.75459
       educ7 |    4.635341    11.75828      0.39    0.694     -18.50288     27.77357
     marrw21 |    4.624814    5.329981      0.87    0.386      -5.86365     15.11328
     marrw22 |   -1.701202    6.447406     -0.26    0.792     -14.38856     10.98616
     marrw23 |    .3888985     5.01959      0.08    0.938     -9.488771     10.26657
     marrw25 |   -1.739407    7.421423     -0.23    0.815     -16.34346     12.86465
     childw2 |   -1.365444    1.291656     -1.06    0.291     -3.907196     1.176307
     emplw22 |    13.69634    15.69998      0.87    0.384     -17.19846     44.59114
     emplw23 |    14.29724    15.85764      0.90    0.368     -16.90781      45.5023
     emplw24 |    76.27472    20.73735      3.68    0.000      35.46726     117.0822
     emplw25 |    20.06519    17.09714      1.17    0.241     -13.57896     53.70935
     emplw26 |    10.03578    16.17153      0.62    0.535     -21.78695     41.85851
      occ1w2 |   -2.816307    7.758874     -0.36    0.717     -18.08441     12.45179
      occ2w2 |   -6.469014    7.819234     -0.83    0.409     -21.85589     8.917864
      occ3w2 |   -7.175908    8.246931     -0.87    0.385     -23.40442     9.052602
      occ4w2 |   -6.351474    8.035411     -0.79    0.430     -22.16375       9.4608
      occ5w2 |   -4.543489    8.144124     -0.56    0.577     -20.56969     11.48271
      occ6w2 |   -9.522379    9.799094     -0.97    0.332     -28.80527     9.760514
      occ7w2 |   -9.631137    10.38815     -0.93    0.355     -30.07319     10.81092
      occ8w2 |   -8.160162    8.342018     -0.98    0.329     -24.57579     8.255462
      inc1w2 |    3.982565    7.535754      0.53    0.598     -10.84647      18.8116
      inc2w2 |     1.53226    7.043758      0.22    0.828     -12.32862     15.39314
      inc3w2 |    2.533196    7.030899      0.36    0.719     -11.30238     16.36877
      inc4w2 |   -.9633672    7.947352     -0.12    0.904     -16.60236     14.67562
     radhlw2 |    .0075941    .0290469      0.26    0.794     -.0495651     .0647534
     radchw2 |    .0540667    .0280864      1.93    0.055     -.0012024     .1093357
     radtlw2 |    .0386989    .0285039      1.36    0.176     -.0173917     .0947895
      havmil |    .0031685     .007328      0.43    0.666     -.0112517     .0175886
avgcumdosew2 |    .5281079    .3017647      1.75    0.081     -.0657121     1.121928
    bfmPain2 |     3.03269    .9416584      3.22    0.001      1.179672     4.885708
   bfmPain15 |   -.0001885    .0000404     -4.67    0.000      -.000268     -.000109
       _cons |    24078.42      4029.3      5.98    0.000      16149.46     32007.37
-------------+----------------------------------------------------------------

.
.
. // partly trimmed model
. set more off

. regress WHPpain age ///
>   emplw22-emplw26  radchw2 ///
>   havmil avgcumdosew2 bfmPain2 if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 10,   329) =   16.81
       Model |  31021.9056    10  3102.19056           Prob > F      =  0.0000
    Residual |  60727.0966   329  184.580841           R-squared     =  0.3381
-------------+------------------------------           Adj R-squared =  0.3180
       Total |  91749.0022   339  270.646024           Root MSE      =  13.586

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0763429    .0749503      1.02    0.309     -.0710994     .2237851
     emplw22 |    8.170922    13.74228      0.59    0.553     -18.86291     35.20475
     emplw23 |    8.669524    13.85076      0.63    0.532      -18.5777     35.91675
     emplw24 |    64.26523    19.50828      3.29    0.001      25.88852     102.6419
     emplw25 |      14.551    14.27741      1.02    0.309     -13.53553     42.63754
     emplw26 |    7.063464    14.04239      0.50    0.615     -20.56074     34.68767
     radchw2 |     .097505    .0228718      4.26    0.000      .0525115     .1424984
      havmil |    .0058924    .0071463      0.82    0.410     -.0081658     .0199506
avgcumdosew2 |    .5533492    .2993005      1.85    0.065      -.035435     1.142133
    bfmPain2 |   -1.400626    .1504473     -9.31    0.000     -1.696586    -1.104666
       _cons |    30698.42    3299.383      9.30    0.000      24207.87     37188.97
-------------+----------------------------------------------------------------

.
. cap gen bfmPain2Xd2 = bfmPain2*avgcumdosew2

.
. // fully trimmed model
. regress WHPpain age  ///
>   emplw22-emplw26 radchw2 ///
>   havmil avgcumdosew2 bfmPain2 if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 10,   329) =   16.81
       Model |  31021.9056    10  3102.19056           Prob > F      =  0.0000
    Residual |  60727.0966   329  184.580841           R-squared     =  0.3381
-------------+------------------------------           Adj R-squared =  0.3180
       Total |  91749.0022   339  270.646024           Root MSE      =  13.586

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0763429    .0749503      1.02    0.309     -.0710994     .2237851
     emplw22 |    8.170922    13.74228      0.59    0.553     -18.86291     35.20475
     emplw23 |    8.669524    13.85076      0.63    0.532      -18.5777     35.91675
     emplw24 |    64.26523    19.50828      3.29    0.001      25.88852     102.6419
     emplw25 |      14.551    14.27741      1.02    0.309     -13.53553     42.63754
     emplw26 |    7.063464    14.04239      0.50    0.615     -20.56074     34.68767
     radchw2 |     .097505    .0228718      4.26    0.000      .0525115     .1424984
      havmil |    .0058924    .0071463      0.82    0.410     -.0081658     .0199506
avgcumdosew2 |    .5533492    .2993005      1.85    0.065      -.035435     1.142133
    bfmPain2 |   -1.400626    .1504473     -9.31    0.000     -1.696586    -1.104666
       _cons |    30698.42    3299.383      9.30    0.000      24207.87     37188.97
-------------+----------------------------------------------------------------

.
.
.
. scalar numModsigTw2 = 0

.
. scalar tw2nobf = e(r2_a)

.
. scalar numbfsigTw2=1

. scalar w2numbf = 1

.
. scalar r2chabfw2 = tw2bf - tw2nobf

.
. matrix define maleWHPpainr2w2 = ( mw2 , tw2bf, tw2nobf, w2numbf, r2chabfw2)

. matrix colnames maleWHPpainr2w2 = FullBFR2a TR2aBF  TR2aNoBF  NumBF  BFR2cha

. matrix rownames maleWHPpainr2w2 = wave2

. matlist maleWHPpainr2w2

   | FullBFR2a    TR2aBF    TR2aNoBF    NumBF    BFR2cha
-------------+-------------------------------------------------------
wave2   |   .355743     .3781594     .3179991            1     .0601603

.
.
. *------------ Mediators for wave 2 male Pain analysis
.
. scalar FemPainW2Med = "age and injured onself because of Chornobyl"

. scalar numMedMw2 = 2

.
.
. cap gen ptsdw2=PTSDw2

.
. // age is possible mediator at wave1 for male Pain
. // injured oneself cause of Chornobyl is a mediator
.
. sem (avgcumdosew2->age)(age->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  age whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -3541.6862
Iteration 1:   log likelihood = -3541.6862

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3541.6862

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   age <-         |
    avgcumdosew2 |    .5832314    .2628107      2.22    0.026      .0681318     1.098331
           _cons |    48.62133    .7040762     69.06    0.000      47.24136     50.00129
  ---------------+----------------------------------------------------------------
   whppain <-     |
             age |    .4154505     .069434      5.98    0.000      .2793624     .5515386
           _cons |   -10.25319    3.518491     -2.91    0.004      -17.1493     -3.35707
-----------------+----------------------------------------------------------------
 Variance         |
           e.age |    146.8166    11.26032                    126.3255     170.6315
       e.whppain |    244.1425    18.72488                    210.0677     283.7446
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.18, Prob > chi2 = 0.1402

. sem (avgcumdosew2-> radhlw2)(radhlw2->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radhlw2 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -3902.4598
Iteration 1:   log likelihood = -3902.4598

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3902.4598

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radhlw2 <-     |
    avgcumdosew2 |    1.220373    .7639591      1.60    0.110     -.2769597     2.717705
           _cons |    45.63198    2.046665     22.30    0.000      41.62059     49.64337
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radhlw2 |    .1512954    .0238257      6.35    0.000      .1045978      .197993
           _cons |    3.098133    1.397557      2.22    0.027      .3589722     5.837293
-----------------+----------------------------------------------------------------
 Variance         |
       e.radhlw2 |    1240.593     95.1491                    1067.444     1441.828
       e.whppain |    241.2393    18.50221                    207.5697     280.3705
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.73, Prob > chi2 = 0.0986

. sem (avgcumdosew2-> educ6)(educ6-> whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  educ6 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -2468.4269
Iteration 1:   log likelihood = -2468.4269

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -2468.4269

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   educ6 <-       |
    avgcumdosew2 |   -.0077585     .010728     -0.72    0.470     -.0287851      .013268
           _cons |    .4368749    .0287407     15.20    0.000      .3805442     .4932055
  ---------------+----------------------------------------------------------------
   whppain <-     |
           educ6 |    -4.21421    1.785226     -2.36    0.018     -7.713189    -.7152303
           _cons |    11.98928     1.16985     10.25    0.000      9.696414     14.28214
-----------------+----------------------------------------------------------------
 Variance         |
         e.educ6 |     .244641    .0187631                    .2104966     .2843239
       e.whppain |    265.4986    20.36281                    228.4431     308.5648
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.01, Prob > chi2 = 0.0452

. sem (avgcumdosew2-> illw2)(illw2-> whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  illw2 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -2521.8627
Iteration 1:   log likelihood = -2521.8627

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -2521.8627

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   illw2 <-       |
    avgcumdosew2 |    .0085423    .0128178      0.67    0.505     -.0165801     .0336647
           _cons |    .2741359    .0343391      7.98    0.000      .2068324     .3414394
  ---------------+----------------------------------------------------------------
   whppain <-     |
           illw2 |    6.587322    1.463571      4.50    0.000      3.718775     9.455869
           _cons |    8.319697    .9590711      8.67    0.000      6.439952     10.19944
-----------------+----------------------------------------------------------------
 Variance         |
         e.illw2 |    .3492324    .0267849                    .3004902      .405881
       e.whppain |     254.676    19.53276                     219.131     295.9867
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.90, Prob > chi2 = 0.0482

. sem (avgcumdosew2-> phlthw2)(phlthw2-> whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  phlthw2 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -3678.9219
Iteration 1:   log likelihood = -3678.9219

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3678.9219

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   phlthw2 <-     |
    avgcumdosew2 |    -.370586    .3856959     -0.96    0.337     -1.126536      .385364
           _cons |    84.80648    1.033288     82.07    0.000      82.78127     86.83168
  ---------------+----------------------------------------------------------------
   whppain <-     |
         phlthw2 |    -.222762     .048551     -4.59    0.000     -.3179202    -.1276037
           _cons |     28.9919    4.190285      6.92    0.000      20.77909      37.2047
-----------------+----------------------------------------------------------------
 Variance         |
       e.phlthw2 |    316.2124    24.25239                    272.0788     367.5049
       e.whppain |     254.116    19.48981                    218.6492     295.3359
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.62, Prob > chi2 = 0.0571

. sem (avgcumdosew2-> ptsdw2)(ptsdw2->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  ptsdw2 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -3567.4181
Iteration 1:   log likelihood = -3567.4181

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3567.4181

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   ptsdw2 <-      |
    avgcumdosew2 |   -.0429879    .2746329     -0.16    0.876     -.5812585     .4952828
           _cons |    5.196645    .7357482      7.06    0.000      3.754605     6.638685
  ---------------+----------------------------------------------------------------
   whppain <-     |
          ptsdw2 |    .2464422    .0690762      3.57    0.000      .1110554      .381829
           _cons |    8.909165    .9443776      9.43    0.000      7.058219     10.76011
-----------------+----------------------------------------------------------------
 Variance         |
        e.ptsdw2 |    160.3224    12.29617                    137.9463     186.3281
       e.whppain |    260.1123     19.9497                    223.8086     302.3048
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.61, Prob > chi2 = 0.0318

. sem (avgcumdosew2-> radtlw2)(radtlw2->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radtlw2 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood =   -3910.62
Iteration 1:   log likelihood =   -3910.62

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    =   -3910.62

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radtlw2 <-     |
    avgcumdosew2 |    .3299338    .7547777      0.44    0.662     -1.149403     1.809271
           _cons |    51.63557    2.022068     25.54    0.000      47.67239     55.59875
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radtlw2 |    .0933275    .0250884      3.72    0.000      .0441551     .1424999
           _cons |    5.331007    1.568928      3.40    0.001      2.255965      8.40605
-----------------+----------------------------------------------------------------
 Variance         |
       e.radtlw2 |    1210.953    92.87582                    1041.941      1407.38
       e.whppain |    259.2966    19.88715                    223.1068     301.3569
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.13, Prob > chi2 = 0.0422

. sem (avgcumdosew2-> radchw2)(radchw2->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radchw2 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -3904.4518
Iteration 1:   log likelihood = -3904.4518

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3904.4518

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radchw2 <-     |
    avgcumdosew2 |    1.121598    .7344428      1.53    0.127     -.3178833      2.56108
           _cons |    47.60346     1.96759     24.19    0.000      43.74706     51.45987
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radchw2 |    .0706012    .0259391      2.72    0.006      .0197615     .1214408
           _cons |    6.742616    1.539919      4.38    0.000       3.72443     9.760803
-----------------+----------------------------------------------------------------
 Variance         |
       e.radchw2 |    1146.581    87.93878                    986.5537     1332.567
       e.whppain |    264.0956    20.25521                     227.236     306.9343
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.53, Prob > chi2 = 0.0601

. sem (avgcumdosew2-> kzchorn)(kzchorn->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  kzchorn whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood =  -3809.818
Iteration 1:   log likelihood =  -3809.818

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    =  -3809.818

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   kzchorn <-     |
    avgcumdosew2 |   -.1996497    .5747286     -0.35    0.728     -1.326097     .9267977
           _cons |    70.37734    1.539712     45.71    0.000      67.35956     73.39512
  ---------------+----------------------------------------------------------------
   whppain <-     |
         kzchorn |    .1797017    .0321716      5.59    0.000      .1166466     .2427569
           _cons |   -2.432772    2.413588     -1.01    0.313     -7.163319     2.297774
-----------------+----------------------------------------------------------------
 Variance         |
       e.kzchorn |    702.1253    53.85055                      604.13     816.0162
       e.whppain |    247.1684    18.95695                    212.6713     287.2613
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      5.19, Prob > chi2 = 0.0227

. sem (avgcumdosew2-> radw1)(radw1-> whppain ) if gender==1, nocapslatent
(8 observations with missing values excluded;
 specify option 'method(mlmv)' to use all observations)

Endogenous variables


Observed:  radw1 whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -3771.2281
Iteration 1:   log likelihood = -3771.2281

Structural equation model                       Number of obs      =       332
 Estimation method = ml
 Log likelihood    = -3771.2281

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radw1 <-       |
    avgcumdosew2 |   -.4640231    1.049126     -0.44    0.658     -2.520271     1.592225
           _cons |    50.10775    2.257385     22.20    0.000      45.68336     54.53214
  ---------------+----------------------------------------------------------------
   whppain <-     |
           radw1 |    .0246323    .0241159      1.02    0.307      -.022634     .0718986
           _cons |    8.839991    1.501933      5.89    0.000      5.896257     11.78372
-----------------+----------------------------------------------------------------
 Variance         |
         e.radw1 |    1407.965    109.2793                    1209.277     1639.298
       e.whppain |    272.0152    21.11247                    233.6292     316.7082
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =     10.43, Prob > chi2 = 0.0012

. sem (avgcumdosew2-> injselfr)(injselfr-> whppain ) if gender==1, nocapslatent

Endogenous variables


Observed:  injselfr whppain


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -2458.7902
Iteration 1:   log likelihood = -2458.7902

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -2458.7902

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   injselfr <-    |
    avgcumdosew2 |    .0282915    .0107341      2.64    0.008      .0072531       .04933
           _cons |    .4816092    .0287569     16.75    0.000      .4252467     .5379718
  ---------------+----------------------------------------------------------------
   whppain <-     |
        injselfr |    8.780158    1.717253      5.11    0.000      5.414405     12.14591
           _cons |    5.712096    1.224948      4.66    0.000      3.311241      8.11295
-----------------+----------------------------------------------------------------
 Variance         |
      e.injselfr |    .2449181    .0187844                     .210735      .284646
       e.whppain |    250.5832    19.21886                    215.6095       291.23
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.08, Prob > chi2 = 0.1492

.
. matrix define H1p1MPnDosew2 = (hyp, pt, wv, dsigFw2, dsigtw2, numMainEffsigFw2, numMainEffsigTw2, numModsigFw2, numModsigTw2,numbfsigFw2,numbfsigtw2, numMedFw2)

. matrix  colnames H1p1MPnDosew2 = hypnum ptnum wv dsigMw2 dsigtw2 numMainEffsigFw2 numMainEffsigTw2 numModFw2 numModTw2 numbfsigFw2 numbfsigtw2 numMedFw2

. matrix  rownames H1p1MPnDosew2 = wave2

. matlist H1p1MPnDosew2

   | hypnum    ptnum    wv    dsigMw2    dsigtw2    numMain~2    numMain~2    numModFw2    numModTw2    numbfsi~2    numbfsi~2    numMedFw2
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave2   |         1            1            2           .5           .5            3            4            6            0            3            9            1

.
.
.
.
. matrix define  H1p1MPnDose =  (H1p1MPnDosew1 \ H1p1MPnDosew2)

. matlist  H1p1MPnDose

   | hypnum    ptnum    wv    dsigMw1    dsigtw1    numMain~1    numMain~1    numModMw1    numModTw1    numbfsi~1    numbfsi~1    numMedw1
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave1   |         1            1            1            1            1            7            5            0            1            1            1            2
wave2   |         1            1            2           .5           .5            3            4            6            0            3            9            1

.
.
.
.
.
.
. matrix define  maleWHPpainr2 = (maleWHPpainr2w1 \ maleWHPpainr2w2)

. matlist maleWHPpainr2

   | FullBFR2a    TR2aBF    TR2aNoBF    NumBF    BFR2cha
-------------+-------------------------------------------------------
wave1   |  .3020449     .3148261     .1258014            1     .1890247
wave2   |   .355743     .3781594     .3179991            1     .0601603

.
. //  wave 3 possible socio-demog covariates full male model
. regress WHPpain age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 avgcumdosew3 if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 30,   309) =    3.01
       Model |  20752.4276    30  691.747587           Prob > F      =  0.0000
    Residual |  70996.5746   309  229.762377           R-squared     =  0.2262
-------------+------------------------------           Adj R-squared =  0.1511
       Total |  91749.0022   339  270.646024           Root MSE      =  15.158

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .4843986    .1041645      4.65    0.000      .2794372       .68936
       educ2 |    9.769495    12.08339      0.81    0.419     -14.00665     33.54564
       educ3 |    19.26546    11.13748      1.73    0.085     -2.649449     41.18036
       educ4 |    21.60593    11.80734      1.83    0.068     -1.627034     44.83889
       educ5 |    15.97115    11.16968      1.43    0.154     -6.007107      37.9494
       educ6 |     14.0984    11.05506      1.28    0.203     -7.654327     35.85112
       educ7 |    6.717414    13.46489      0.50    0.618     -19.77706     33.21189
     marrw21 |     4.73105    6.100822      0.78    0.439      -7.27336     16.73546
     marrw22 |   -3.795827    7.391336     -0.51    0.608     -18.33954     10.74789
     marrw23 |    1.467107    5.722705      0.26    0.798     -9.793293     12.72751
     marrw25 |   -1.397892    8.504073     -0.16    0.870     -18.13111     15.33533
     childw2 |   -2.547682    1.445167     -1.76    0.079     -5.391295     .2959308
     emplw22 |    7.603313    17.69844      0.43    0.668     -27.22139     42.42802
     emplw23 |    9.347371    17.80704      0.52    0.600     -25.69102     44.38576
     emplw24 |    70.48868    23.73963      2.97    0.003      23.77691     117.2005
     emplw25 |    13.27196    19.29083      0.69    0.492     -24.68606     51.22997
     emplw26 |    8.448187    18.20116      0.46    0.643      -27.3657     44.26207
      occ1w2 |   -1.310158     8.67899     -0.15    0.880     -18.38755     15.76724
      occ2w2 |   -5.007605    8.772801     -0.57    0.569     -22.26959     12.25438
      occ3w2 |   -5.686076    9.319477     -0.61    0.542     -24.02374     12.65159
      occ4w2 |   -4.677824    9.059413     -0.52    0.606     -22.50377     13.14812
      occ5w2 |   -3.976557     9.10635     -0.44    0.663     -21.89486     13.94174
      occ6w2 |    -12.5716    11.12142     -1.13    0.259     -34.45488     9.311692
      occ7w2 |   -8.344698    11.70637     -0.71    0.476     -31.37897     14.68958
      occ8w2 |   -9.099617    9.268862     -0.98    0.327     -27.33769     9.138453
      inc1w2 |    2.411834    8.508169      0.28    0.777     -14.32944     19.15311
      inc2w2 |   -1.310585    7.961695     -0.16    0.869     -16.97658     14.35541
      inc3w2 |   -1.847351    7.944005     -0.23    0.816     -17.47854     13.78384
      inc4w2 |   -9.533701    8.973372     -1.06    0.289     -27.19034     8.122941
avgcumdosew3 |    .5687085    .3217227      1.77    0.078     -.0643358     1.201753
       _cons |   -32.24578     21.7196     -1.48    0.139     -74.98279     10.49124
-------------+----------------------------------------------------------------

.
.
. local bfw3 bfmPain3 bfmPain7 bfmPain9 bfmPain12 bfmPain13 ///
>     bfmPain14 bfmPain15 bfmPain16 bfmPain18

.
.
. regress WHPpain age educ2-educ5 marrw31-marrw33 marrw35 childw3 ///
>   emplw32-emplw34 occ1w3-occ7w3  inc1w3-inc4w3 radhlw3 radchw3 ///
>   radtlw3 havmil `bfw3' avgcumdosew3 if gender==1
note: bfmPain3 omitted because of collinearity
note: bfmPain7 omitted because of collinearity
note: bfmPain9 omitted because of collinearity
note: bfmPain12 omitted because of collinearity
note: bfmPain13 omitted because of collinearity
note: bfmPain14 omitted because of collinearity
note: bfmPain16 omitted because of collinearity
note: bfmPain18 omitted because of collinearity

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 30,   309) =    6.54
       Model |  35629.4914    30  1187.64971           Prob > F      =  0.0000
    Residual |  56119.5108   309   181.61654           R-squared     =  0.3883
-------------+------------------------------           Adj R-squared =  0.3290
       Total |  91749.0022   339  270.646024           Root MSE      =  13.477

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0124938    .0899751      0.14    0.890     -.1645476     .1895353
       educ2 |   -.4679786     4.71107     -0.10    0.921     -9.737813     8.801856
       educ3 |    1.811304    1.932484      0.94    0.349     -1.991188     5.613796
       educ4 |    7.223695    3.956476      1.83    0.069     -.5613478     15.00874
       educ5 |    .9583268    2.317306      0.41    0.679     -3.601369     5.518022
     marrw31 |    3.216977    4.931768      0.65    0.515     -6.487121     12.92107
     marrw32 |   -2.128709    5.096981     -0.42    0.676     -12.15789     7.900471
     marrw33 |   -.8846927     4.18189     -0.21    0.833     -9.113276     7.343891
     marrw35 |    -.395071    5.119341     -0.08    0.939     -10.46825     9.678107
     childw3 |   -.3286734    1.039789     -0.32    0.752     -2.374636     1.717289
     emplw32 |   -1.555101    2.765328     -0.56    0.574     -6.996356     3.886154
     emplw33 |   -3.518176    4.767193     -0.74    0.461     -12.89844     5.862091
     emplw34 |   -9.085931    6.356193     -1.43    0.154     -21.59283     3.420965
      occ1w3 |   -10.02774     7.29267     -1.38    0.170     -24.37732     4.321833
      occ2w3 |     -9.0422    7.267354     -1.24    0.214     -23.34196     5.257561
      occ3w3 |    -11.2069    7.676175     -1.46    0.145     -26.31109     3.897286
      occ4w3 |   -8.878964    7.597645     -1.17    0.243     -23.82863       6.0707
      occ5w3 |   -13.47451    7.832592     -1.72    0.086     -28.88648      1.93745
      occ6w3 |   -9.779301    10.15937     -0.96    0.337     -29.76959     10.21099
      occ7w3 |   -.4719371    7.019601     -0.07    0.946      -14.2842     13.34033
      inc1w3 |   -.6021211    6.342639     -0.09    0.924     -13.08235      11.8781
      inc2w3 |    2.986647    5.901218      0.51    0.613     -8.625008      14.5983
      inc3w3 |    1.385345    5.969783      0.23    0.817     -10.36122     13.13191
      inc4w3 |   -.3774059    6.924644     -0.05    0.957     -14.00283     13.24801
     radhlw3 |    .0234577    .0280191      0.84    0.403     -.0316747       .07859
     radchw3 |    .1040244    .0280199      3.71    0.000      .0488904     .1591584
     radtlw3 |    .0060238    .0278812      0.22    0.829     -.0488372     .0608847
      havmil |    .0036704     .007264      0.51    0.614     -.0106228     .0179636
    bfmPain3 |           0   (omitted)
    bfmPain7 |           0   (omitted)
    bfmPain9 |           0   (omitted)
   bfmPain12 |           0   (omitted)
   bfmPain13 |           0   (omitted)
   bfmPain14 |           0   (omitted)
   bfmPain15 |   -.0000591    7.83e-06     -7.55    0.000     -.0000745    -.0000437
   bfmPain16 |           0   (omitted)
   bfmPain18 |           0   (omitted)
avgcumdosew3 |    .5165837    .2833387      1.82    0.069     -.0409337     1.074101
       _cons |    28402.98    3764.241      7.55    0.000      20996.19     35809.77
-------------+----------------------------------------------------------------

.
. scalar fw3 = e(r2_a)

. scalar list fw3
       fw3 =  .32895175

.
.
. *---- Wave 3 analysis of male Pain Model begins here
. scalar wv = 3

.
. matrix define H1p1MPnDosew3 = J(1,12,0)

. matrix  colnames H1p1MPnDosew3 = hypnum ptnum wv dsigfw3 dsigtw3 numMainEffsigFw3 numMainEffsigTw3 numModFw3 numModTw3 numbfsigfw3 numbfsigtw3 numMedw3

. matrix  rownames H1p1MPnDosew3 = wave3

. matlist H1p1MPnDosew3

   | hypnum    ptnum    wv    dsigfw3    dsigtw3    numMain~3    numMain~3    numModFw3    numModTw3    numbfsi~3    numbfsi~3    numMedw3
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave3   |         0            0            0            0            0            0            0            0            0            0            0            0

.
.
. matrix define  H1p1MPnDose =  (H1p1MPnDosew1 \ H1p1MPnDosew2 \ H1p1MPnDosew3 )

. matlist  H1p1MPnDose

   | hypnum    ptnum    wv    dsigMw1    dsigtw1    numMain~1    numMain~1    numModMw1    numModTw1    numbfsi~1    numbfsi~1    numMedw1
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave1   |         1            1            1            1            1            7            5            0            1            1            1            2
wave2   |         1            1            2           .5           .5            3            4            6            0            3            9            1
wave3   |         0            0            0            0            0            0            0            0            0            0            0            0

.
. cap svmat H1p1MPnDose

.
. // wave 3 trimmed model of possible socio-demog covariates male model
.
. sw, pr(.05):  regress WHPpain age educ2-educ6 marrw31-marrw33   ///
>   emplw31-emplw33 occ2w3-occ7w3 inc1w3-inc4w3 if gender==1


  begin with full model


p = 0.8242 >= 0.0500  removing occ2w3


p = 0.6641 >= 0.0500  removing occ3w3


p = 0.6285 >= 0.0500  removing marrw33


p = 0.6252 >= 0.0500  removing occ4w3


p = 0.5629 >= 0.0500  removing educ2


p = 0.2837 >= 0.0500  removing inc2w3


p = 0.6547 >= 0.0500  removing inc1w3


p = 0.3688 >= 0.0500  removing emplw32


p = 0.7656 >= 0.0500  removing emplw31


p = 0.4840 >= 0.0500  removing occ7w3


p = 0.2530 >= 0.0500  removing inc4w3


p = 0.2772 >= 0.0500  removing inc3w3


p = 0.2321 >= 0.0500  removing educ6


p = 0.4269 >= 0.0500  removing educ5


p = 0.2304 >= 0.0500  removing occ6w3


p = 0.1509 >= 0.0500  removing marrw32


p = 0.0977 >= 0.0500  removing educ4


p = 0.1312 >= 0.0500  removing occ5w3


p = 0.0667 >= 0.0500  removing educ3


p = 0.0698 >= 0.0500  removing marrw31


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F(  2,   337) =   23.98
       Model |  11432.2092     2  5716.10462           Prob > F      =  0.0000
    Residual |   80316.793   337  238.328763           R-squared     =  0.1246
-------------+------------------------------           Adj R-squared =  0.1194
       Total |  91749.0022   339  270.646024           Root MSE      =  15.438

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .2321752     .087638      2.65    0.008      .0597888     .4045616
     emplw33 |    8.710592     2.59194      3.36    0.001      3.612172     13.80901
       _cons |   -3.135112    4.070773     -0.77    0.442     -11.14244     4.872214
-------------+----------------------------------------------------------------

.
. regress  WHPpain age educ2-educ6 marrw31-marrw33 childw3 emplw31-emplw33 ///
>     occ2w3-occ7w3 inc1w3-inc4w3 if gender==1

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 23,   316) =    3.11
       Model |   16949.487    23  736.934218           Prob > F      =  0.0000
    Residual |  74799.5152   316  236.707327           R-squared     =  0.1847
-------------+------------------------------           Adj R-squared =  0.1254
       Total |  91749.0022   339  270.646024           Root MSE      =  15.385

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .2801671    .0962734      2.91    0.004      .0907493     .4695849
       educ2 |    4.826882    8.237371      0.59    0.558     -11.38014     21.03391
       educ3 |    12.12985    6.779167      1.79    0.075     -1.208161     25.46785
       educ4 |    15.54282     7.76534      2.00    0.046      .2645207     30.82113
       educ5 |    9.671127    6.886858      1.40    0.161     -3.878763     23.22102
       educ6 |    8.507424    6.616197      1.29    0.199     -4.509941     21.52479
     marrw31 |    6.901707    3.968448      1.74    0.083     -.9062129     14.70963
     marrw32 |   -2.437305    4.234248     -0.58    0.565     -10.76819     5.893575
     marrw33 |    1.414465    2.927038      0.48    0.629      -4.34448      7.17341
     childw3 |    .1318276    1.174024      0.11    0.911     -2.178064     2.441719
     emplw31 |    8.927626    7.135167      1.25    0.212     -5.110811     22.96606
     emplw32 |    9.557291    7.580651      1.26    0.208     -5.357637     24.47222
     emplw33 |    8.946737    6.072846      1.47    0.142     -3.001583     20.89506
      occ2w3 |     .525454    2.385968      0.22    0.826     -4.168937     5.219845
      occ3w3 |   -1.184993     3.57894     -0.33    0.741     -8.226557      5.85657
      occ4w3 |   -1.550273    3.291882     -0.47    0.638      -8.02705     4.926504
      occ5w3 |   -6.806926    4.203229     -1.62    0.106     -15.07678     1.462925
      occ6w3 |   -9.654343    8.211152     -1.18    0.241     -25.80978     6.501095
      occ7w3 |      7.2185    5.182213      1.39    0.165     -2.977501      17.4145
      inc1w3 |   -4.601938    4.870356     -0.94    0.345     -14.18436     4.980485
      inc2w3 |   -3.977896    4.241396     -0.94    0.349     -12.32284     4.367049
      inc3w3 |   -6.132378    4.381632     -1.40    0.163     -14.75324      2.48848
      inc4w3 |    -8.29865    5.927439     -1.40    0.162     -19.96088     3.363583
       _cons |   -20.30011    11.09351     -1.83    0.068     -42.12659     1.526363
-------------+----------------------------------------------------------------

.
.
.  local bfw3 bfmPain1 bfmPain2 bfmPain3 bfmPain4 bfmPain5 ///
>     bfmPain6 bfmPain12 bfmPain13 bfmPain14 ///
>     bfmPain15 bfmPain16

.
.
.
. regress WHPpain age educ2-educ5 marrw31-marrw33 marrw35 childw3 ///
>   emplw32-emplw34 occ1w3-occ7w3  inc1w3-inc4w3 radhlw3 radchw3 ///
>   radtlw3 havmil `bfw3' avgcumdosew3 if gender==1
note: havmil omitted because of collinearity
note: bfmPain1 omitted because of collinearity
note: bfmPain3 omitted because of collinearity
note: bfmPain5 omitted because of collinearity
note: bfmPain12 omitted because of collinearity
note: bfmPain13 omitted because of collinearity
note: bfmPain14 omitted because of collinearity
note: bfmPain16 omitted because of collinearity

      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 32,   307) =    6.54
       Model |  37207.6478    32  1162.73899           Prob > F      =  0.0000
    Residual |  54541.3544   307  177.659135           R-squared     =  0.4055
-------------+------------------------------           Adj R-squared =  0.3436
       Total |  91749.0022   339  270.646024           Root MSE      =  13.329

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0202763    .0891562      0.23    0.820     -.1551582     .1957108
       educ2 |    .7846495    4.678703      0.17    0.867     -8.421733     9.991032
       educ3 |    1.029243    1.947302      0.53    0.598     -2.802506     4.860991
       educ4 |     7.26787    3.913918      1.86    0.064     -.4336287     14.96937
       educ5 |    .9884003    2.293272      0.43    0.667     -3.524119      5.50092
     marrw31 |    2.634536    4.881708      0.54    0.590     -6.971305     12.24038
     marrw32 |    -2.63047    5.044288     -0.52    0.602     -12.55622     7.295284
     marrw33 |    -1.76995     4.14674     -0.43    0.670      -9.92958     6.389679
     marrw35 |   -1.805367    5.090022     -0.35    0.723     -11.82111     8.210378
     childw3 |   -.4723235    1.031232     -0.46    0.647     -2.501501     1.556854
     emplw32 |   -1.735625    2.746043     -0.63    0.528     -7.139072     3.667822
     emplw33 |   -5.472301    4.762203     -1.15    0.251     -14.84299     3.898388
     emplw34 |   -8.647472    6.292498     -1.37    0.170     -21.02935     3.734411
      occ1w3 |   -10.89672    7.219048     -1.51    0.132      -25.1018      3.30835
      occ2w3 |    -10.3185    7.204052     -1.43    0.153     -24.49407     3.857064
      occ3w3 |   -12.99569     7.62611     -1.70    0.089     -28.00175     2.010366
      occ4w3 |    -8.98865    7.517185     -1.20    0.233     -23.78037     5.803075
      occ5w3 |   -14.25265    7.758859     -1.84    0.067     -29.51992     1.014627
      occ6w3 |   -10.64702    10.06377     -1.06    0.291     -30.44971     9.155681
      occ7w3 |   -.4218697    6.942735     -0.06    0.952     -14.08324      13.2395
      inc1w3 |     .548895     6.28505      0.09    0.930     -11.81833     12.91612
      inc2w3 |    4.065503     5.84781      0.70    0.487     -7.441358     15.57236
      inc3w3 |    2.933517    5.928126      0.49    0.621     -8.731383     14.59842
      inc4w3 |    1.848318    6.890201      0.27    0.789     -11.70968     15.40631
     radhlw3 |    .0187808    .0278477      0.67    0.501     -.0360158     .0735774
     radchw3 |    .0924767    .0283019      3.27    0.001      .0367866     .1481669
     radtlw3 |    .0021782    .0276683      0.08    0.937     -.0522652     .0566216
      havmil |           0   (omitted)
    bfmPain1 |           0   (omitted)
    bfmPain2 |    3461.188    1707.269      2.03    0.043      101.7573     6820.618
    bfmPain3 |           0   (omitted)
    bfmPain4 |    3459.864    1707.651      2.03    0.044      99.68134     6820.046
    bfmPain5 |           0   (omitted)
    bfmPain6 |    .0008914    .0073532      0.12    0.904     -.0135778     .0153605
   bfmPain12 |           0   (omitted)
   bfmPain13 |           0   (omitted)
   bfmPain14 |           0   (omitted)
   bfmPain15 |   -.1579678    .0778929     -2.03    0.043     -.3112393    -.0046962
   bfmPain16 |           0   (omitted)
avgcumdosew3 |    .5135961    .2825211      1.82    0.070     -.0423266     1.069519
       _cons |   -7.58e+07    3.74e+07     -2.03    0.044     -1.49e+08     -2159044
-------------+----------------------------------------------------------------

.
.
. loc bfw3b bfmPain2 bfmPain4 bfmPain6 bfmPain15

.
. scalar numMainEffsigFw3 = 15

.
.  local bfw3 bfmPain3 bfmPain7 bfmPain9 bfmPain12 bfmPain13 ///
>     bfmPain14 bfmPain15 bfmPain16

.
.
. sw, pr(.1): regress WHPpain age educ2-educ5 marrw31-marrw33 marrw35 childw3 ///
>   emplw32-emplw34 occ1w3-occ7w3  inc1w3-inc4w3 radhlw3 radchw3 ///
>   radtlw3 havmil `bfw3' avgcumdosew3 if gender==1
note: bfmPain3 dropped because of collinearity
note: bfmPain7 dropped because of collinearity
note: bfmPain9 dropped because of collinearity
note: bfmPain12 dropped because of collinearity
note: bfmPain13 dropped because of collinearity
note: bfmPain14 dropped because of collinearity
note: bfmPain16 dropped because of collinearity


  begin with full model


p = 0.9566 >= 0.1000  removing inc4w3


p = 0.9360 >= 0.1000  removing marrw35


p = 0.9346 >= 0.1000  removing inc1w3


p = 0.9327 >= 0.1000  removing educ2


p = 0.8820 >= 0.1000  removing age


p = 0.8267 >= 0.1000  removing occ7w3


p = 0.8131 >= 0.1000  removing radtlw3


p = 0.8119 >= 0.1000  removing marrw33


p = 0.7433 >= 0.1000  removing childw3


p = 0.6804 >= 0.1000  removing marrw32


p = 0.6644 >= 0.1000  removing havmil


p = 0.6717 >= 0.1000  removing educ5


p = 0.5797 >= 0.1000  removing emplw32


p = 0.4226 >= 0.1000  removing emplw33


p = 0.4270 >= 0.1000  removing inc3w3


p = 0.3722 >= 0.1000  removing educ3


p = 0.4261 >= 0.1000  removing radhlw3


p = 0.2773 >= 0.1000  removing occ6w3


p = 0.2473 >= 0.1000  removing emplw34


p = 0.1457 >= 0.1000  removing inc2w3


p = 0.1541 >= 0.1000  removing occ4w3


p = 0.1219 >= 0.1000  removing marrw31


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F(  8,   331) =   23.64
       Model |  33359.9699     8  4169.99624           Prob > F      =  0.0000
    Residual |  58389.0323   331   176.40191           R-squared     =  0.3636
-------------+------------------------------           Adj R-squared =  0.3482
       Total |  91749.0022   339  270.646024           Root MSE      =  13.282

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radchw3 |    .1225812    .0217759      5.63    0.000      .0797445     .1654179
avgcumdosew3 |     .542687    .2711052      2.00    0.046      .0093806     1.075993
      occ2w3 |    -4.10786    1.902413     -2.16    0.032     -7.850204    -.3655157
       educ4 |    7.186648    3.685602      1.95    0.052     -.0635095     14.43681
      occ5w3 |   -7.688694    3.415923     -2.25    0.025     -14.40835    -.9690379
   bfmPain15 |   -.0000648    5.89e-06    -11.00    0.000     -.0000764    -.0000533
      occ1w3 |   -4.907304    1.905146     -2.58    0.010     -8.655024    -1.159584
      occ3w3 |   -5.099104    2.905412     -1.76    0.080     -10.81451     .6162978
       _cons |    31167.15    2831.891     11.01    0.000      25596.37     36737.92
-------------+----------------------------------------------------------------

.
. loc bfw3b bfmPain2  bfmPain6 bfmPain15

. sw, pr(.1): regress WHPpain age educ2-educ5 marrw31-marrw33 marrw35 childw3 ///
>   emplw32-emplw34 occ1w3-occ7w3  inc1w3-inc4w3 radhlw3 radchw3 ///
>   radtlw3  `bfw3b' avgcumdosew3 if gender==1


  begin with full model


p = 0.9993 >= 0.1000  removing inc1w3


p = 0.9787 >= 0.1000  removing educ2


p = 0.9224 >= 0.1000  removing bfmPain6


p = 0.9199 >= 0.1000  removing occ7w3


p = 0.8960 >= 0.1000  removing inc4w3


p = 0.7951 >= 0.1000  removing radtlw3


p = 0.7850 >= 0.1000  removing marrw35


p = 0.8744 >= 0.1000  removing marrw33


p = 0.7290 >= 0.1000  removing educ5


p = 0.7284 >= 0.1000  removing age


p = 0.7572 >= 0.1000  removing childw3


p = 0.7159 >= 0.1000  removing educ3


p = 0.6980 >= 0.1000  removing marrw32


p = 0.6318 >= 0.1000  removing emplw32


p = 0.3237 >= 0.1000  removing radhlw3


p = 0.3126 >= 0.1000  removing inc3w3


p = 0.3407 >= 0.1000  removing emplw33


p = 0.3459 >= 0.1000  removing occ6w3


p = 0.3113 >= 0.1000  removing emplw34


p = 0.2517 >= 0.1000  removing occ4w3


p = 0.2202 >= 0.1000  removing inc2w3


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 10,   329) =   20.27
       Model |  34975.9992    10  3497.59992           Prob > F      =  0.0000
    Residual |  56773.0031   329  172.562319           R-squared     =  0.3812
-------------+------------------------------           Adj R-squared =  0.3624
       Total |  91749.0022   339  270.646024           Root MSE      =  13.136

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      occ5w3 |   -7.394399    3.389323     -2.18    0.030     -14.06188    -.7269202
   bfmPain15 |   -.0001631    .0000375     -4.35    0.000     -.0002368    -.0000894
    bfmPain2 |    2.280111    .8669677      2.63    0.009      .5746118     3.985611
       educ4 |    7.575346    3.648584      2.08    0.039      .3978482     14.75284
      occ3w3 |   -5.510228    2.914644     -1.89    0.060     -11.24392     .2234611
     marrw31 |    4.284431    2.404142      1.78    0.076     -.4449989     9.013861
      occ1w3 |   -4.418587    1.895332     -2.33    0.020     -8.147086    -.6900877
     radchw3 |    .1038663    .0224125      4.63    0.000      .0597764     .1479561
      occ2w3 |   -3.562958    1.890549     -1.88    0.060     -7.282047     .1561304
avgcumdosew3 |     .498334    .2694488      1.85    0.065     -.0317258     1.028394
       _cons |    28380.32     3073.49      9.23    0.000      22334.15     34426.49
-------------+----------------------------------------------------------------

.
.
. scalar tw3bf = e(r2_a)

. scalar list tw3bf
     tw3bf =  .36240586

. scalar dsigfw3 = .5

. scalar numMainEffsigFw3 =7

.
.
.  loc bfw3b bfmPain2 bfmPain6 bfmPain15

.
.
.  sw, pr(.1): regress WHPpain age educ2-educ5 marrw31-marrw33 marrw35 childw3 ///
>   emplw32-emplw34 occ1w3-occ7w3  inc1w3-inc4w3 radhlw3 radchw3 ///
>   radtlw3  avgcumdosew3 if gender==1


  begin with full model


p = 0.9508 >= 0.1000  removing radtlw3


p = 0.9485 >= 0.1000  removing childw3


p = 0.9378 >= 0.1000  removing inc1w3


p = 0.9267 >= 0.1000  removing educ5


p = 0.7323 >= 0.1000  removing marrw33


p = 0.7320 >= 0.1000  removing inc3w3


p = 0.7016 >= 0.1000  removing marrw35


p = 0.7037 >= 0.1000  removing educ2


p = 0.6010 >= 0.1000  removing inc4w3


p = 0.5539 >= 0.1000  removing emplw33


p = 0.6619 >= 0.1000  removing occ7w3


p = 0.5264 >= 0.1000  removing emplw32


p = 0.4072 >= 0.1000  removing marrw32


p = 0.1933 >= 0.1000  removing age


p = 0.2177 >= 0.1000  removing marrw31


p = 0.1655 >= 0.1000  removing inc2w3


p = 0.1168 >= 0.1000  removing avgcumdosew3


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F( 11,   328) =   10.03
       Model |  23090.7679    11  2099.16072           Prob > F      =  0.0000
    Residual |  68658.2343   328  209.323885           R-squared     =  0.2517
-------------+------------------------------           Adj R-squared =  0.2266
       Total |  91749.0022   339  270.646024           Root MSE      =  14.468

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      occ2w3 |   -8.481612    2.335016     -3.63    0.000     -13.07511    -3.888114
     radchw3 |    .0668123    .0237746      2.81    0.005      .0200423     .1135822
       educ3 |    4.086965    1.839252      2.22    0.027      .4687467     7.705184
       educ4 |    6.793807    4.097871      1.66    0.098     -1.267619     14.85523
     radhlw3 |    .1358926     .023218      5.85    0.000      .0902175     .1815677
      occ1w3 |   -9.201475     2.37964     -3.87    0.000     -13.88276    -4.520193
      occ3w3 |   -11.72567    3.264193     -3.59    0.000     -18.14706    -5.304274
      occ5w3 |   -13.34721    3.893205     -3.43    0.001     -21.00601     -5.68841
     emplw34 |   -8.930733    5.382424     -1.66    0.098     -19.51916     1.657695
      occ6w3 |   -15.20404    7.449155     -2.04    0.042     -29.85819    -.5498913
      occ4w3 |   -9.701597    2.982772     -3.25    0.001     -15.56937    -3.833819
       _cons |    6.408453    2.549656      2.51    0.012      1.392711     11.42419
-------------+----------------------------------------------------------------

.
. scalar numMainEffsigTw3 = 9

. scalar numMedFw3 = 15

.
. scalar dsigtw3 = 0

.
. scalar tw3nobf = e(r2_a)

. scalar list tw3nobf
   tw3nobf =  .22657691

.
. scalar r2chabfw3 = tw3bf - tw3nobf

. scalar list r2chabfw3
 r2chabfw3 =  .13582895

.
.
.  // on earlier model
. scalar w3numbf = 2

. scalar numbfsigfw3 = 2

.
.  ********  Moderator search only if avgcumdosew3 is signifi which it is not as a main effect
.
.  scalar numModsigFw3 =0

.  scalar numModsigTw3=0

.
.  *---      Mediator Search from trimmed main effects model
.   local bfw3 bfmPain3 bfmPain7 bfmPain9 bfmPain12 bfmPain13 ///
>     bfmPain14 bfmPain15 bfmPain16

.
.
. sw, pr(.1): regress WHPpain age educ2-educ5 marrw31-marrw33 marrw35 childw3 ///
>   emplw32-emplw34 occ1w3-occ7w3  inc1w3-inc4w3 radhlw3 radchw3 ///
>   radtlw3 havmil `bfw3' avgcumdosew3 if gender==1
note: bfmPain3 dropped because of collinearity
note: bfmPain7 dropped because of collinearity
note: bfmPain9 dropped because of collinearity
note: bfmPain12 dropped because of collinearity
note: bfmPain13 dropped because of collinearity
note: bfmPain14 dropped because of collinearity
note: bfmPain16 dropped because of collinearity


  begin with full model


p = 0.9566 >= 0.1000  removing inc4w3


p = 0.9360 >= 0.1000  removing marrw35


p = 0.9346 >= 0.1000  removing inc1w3


p = 0.9327 >= 0.1000  removing educ2


p = 0.8820 >= 0.1000  removing age


p = 0.8267 >= 0.1000  removing occ7w3


p = 0.8131 >= 0.1000  removing radtlw3


p = 0.8119 >= 0.1000  removing marrw33


p = 0.7433 >= 0.1000  removing childw3


p = 0.6804 >= 0.1000  removing marrw32


p = 0.6644 >= 0.1000  removing havmil


p = 0.6717 >= 0.1000  removing educ5


p = 0.5797 >= 0.1000  removing emplw32


p = 0.4226 >= 0.1000  removing emplw33


p = 0.4270 >= 0.1000  removing inc3w3


p = 0.3722 >= 0.1000  removing educ3


p = 0.4261 >= 0.1000  removing radhlw3


p = 0.2773 >= 0.1000  removing occ6w3


p = 0.2473 >= 0.1000  removing emplw34


p = 0.1457 >= 0.1000  removing inc2w3


p = 0.1541 >= 0.1000  removing occ4w3


p = 0.1219 >= 0.1000  removing marrw31


      Source |       SS       df       MS              Number of obs =     340
-------------+------------------------------           F(  8,   331) =   23.64
       Model |  33359.9699     8  4169.99624           Prob > F      =  0.0000
    Residual |  58389.0323   331   176.40191           R-squared     =  0.3636
-------------+------------------------------           Adj R-squared =  0.3482
       Total |  91749.0022   339  270.646024           Root MSE      =  13.282

-------------+----------------------------------------------------------------
      WHPpain |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radchw3 |    .1225812    .0217759      5.63    0.000      .0797445     .1654179
avgcumdosew3 |     .542687    .2711052      2.00    0.046      .0093806     1.075993
      occ2w3 |    -4.10786    1.902413     -2.16    0.032     -7.850204    -.3655157
       educ4 |    7.186648    3.685602      1.95    0.052     -.0635095     14.43681
      occ5w3 |   -7.688694    3.415923     -2.25    0.025     -14.40835    -.9690379
   bfmPain15 |   -.0000648    5.89e-06    -11.00    0.000     -.0000764    -.0000533
      occ1w3 |   -4.907304    1.905146     -2.58    0.010     -8.655024    -1.159584
      occ3w3 |   -5.099104    2.905412     -1.76    0.080     -10.81451     .6162978
       _cons |    31167.15    2831.891     11.01    0.000      25596.37     36737.92
-------------+----------------------------------------------------------------

.
.  scalar FemPainDoseMedsw3 = "age illw3 phlthw3 radfmw3 are possible mediators"

.  scalar numbfsigTw3 = 15

.
.  // age  and illw3 and physical health radhlw3 radfmw3 are  possible mediators
.
. sem(avgcumdosew3->age)(age -> whppain) if gender==1,  nocapslatent

Endogenous variables


Observed:  age whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood = -3563.4856
Iteration 1:   log likelihood = -3563.4856

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3563.4856

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   age <-         |
    avgcumdosew3 |    .5433648    .2465374      2.20    0.028      .0601605     1.026569
           _cons |    48.52021    .7226029     67.15    0.000      47.10394     49.93649
  ---------------+----------------------------------------------------------------
   whppain <-     |
             age |    .4154505     .069434      5.98    0.000      .2793624     .5515386
           _cons |   -10.25319    3.518491     -2.91    0.004      -17.1493     -3.35707
-----------------+----------------------------------------------------------------
 Variance         |
           e.age |    146.8453    11.26252                    126.3501     170.6649
       e.whppain |    244.1425    18.72488                    210.0677     283.7446
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.40, Prob > chi2 = 0.1213

. sem(avgcumdosew3->inc4w3)(inc4w3->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  inc4w3 whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood = -2181.9175
Iteration 1:   log likelihood = -2181.9175

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -2181.9175

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   inc4w3 <-      |
    avgcumdosew3 |   -.0015041    .0040416     -0.37    0.710     -.0094256     .0064174
           _cons |    .0430093    .0118461      3.63    0.000      .0197914     .0662273
  ---------------+----------------------------------------------------------------
   whppain <-     |
          inc4w3 |   -5.989115     4.47183     -1.34    0.180     -14.75374     2.775511
           _cons |    10.42626    .9074231     11.49    0.000      8.647741     12.20477
-----------------+----------------------------------------------------------------
 Variance         |
        e.inc4w3 |    .0394649    .0030268                    .0339568     .0458664
       e.whppain |    268.4338    20.58794                    230.9687     311.9762
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.50, Prob > chi2 = 0.0338

. sem(avgcumdosew3->illw3)(illw3->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  illw3 whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood = -2684.8914
Iteration 1:   log likelihood = -2684.8914

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -2684.8914

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   illw3 <-       |
    avgcumdosew3 |     .038211    .0191573      1.99    0.046      .0006633     .0757587
           _cons |    .4504952    .0561503      8.02    0.000      .3404427     .5605478
  ---------------+----------------------------------------------------------------
   whppain <-     |
           illw3 |    6.643341    .8688825      7.65    0.000      4.940363      8.34632
           _cons |    6.877515    .9293866      7.40    0.000      5.055951      8.69908
-----------------+----------------------------------------------------------------
 Variance         |
         e.illw3 |    .8866751    .0680049                    .7629223     1.030502
       e.whppain |    230.2596    17.66011                    198.1224     267.6098
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.25, Prob > chi2 = 0.1332

. sem(avgcumdosew3->phlthw3)(phlthw3->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  phlthw3 whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood = -3744.7524
Iteration 1:   log likelihood = -3744.7524

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3744.7524

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   phlthw3 <-     |
    avgcumdosew3 |   -1.241883    .4440577     -2.80    0.005      -2.11222    -.3715461
           _cons |     73.2457    1.301536     56.28    0.000      70.69474     75.79667
  ---------------+----------------------------------------------------------------
   whppain <-     |
         phlthw3 |   -.3243486    .0363194     -8.93    0.000     -.3955334    -.2531638
           _cons |    33.44594    2.725868     12.27    0.000      28.10333     38.78854
-----------------+----------------------------------------------------------------
 Variance         |
       e.phlthw3 |    476.4016    36.53833                    409.9105     553.6781
       e.whppain |    218.5787    16.76422                    188.0718     254.0341
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      1.10, Prob > chi2 = 0.2951

. sem(avgcumdosew3->radhlw3)(radhlw3->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radhlw3 whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood = -3918.8565
Iteration 1:   log likelihood = -3918.8565

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3918.8565

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radhlw3 <-     |
    avgcumdosew3 |    .9606492    .7203412      1.33    0.182     -.4511936     2.372492
           _cons |    46.19995    2.111326     21.88    0.000      42.06183     50.33807
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radhlw3 |    .1748854    .0232347      7.53    0.000      .1293463     .2204245
           _cons |    1.895223      1.3754      1.38    0.168     -.8005111     4.590957
-----------------+----------------------------------------------------------------
 Variance         |
       e.radhlw3 |    1253.634    96.14937                    1078.665     1456.985
       e.whppain |    231.3072    17.74045                    199.0237     268.8272
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.14, Prob > chi2 = 0.0762

. sem(avgcumdosew3-> radfmw3)(radfmw3->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radfmw3 whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood = -3916.5063
Iteration 1:   log likelihood = -3916.5063

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3916.5063

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radfmw3 <-     |
    avgcumdosew3 |    1.581248    .7074787      2.24    0.025      .1946154     2.967881
           _cons |    54.80546    2.073626     26.43    0.000      50.74123     58.86969
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radfmw3 |     .164857    .0238095      6.92    0.000      .1181912     .2115227
           _cons |    .8269229    1.587504      0.52    0.602     -2.284528     3.938374
-----------------+----------------------------------------------------------------
 Variance         |
       e.radfmw3 |    1209.264    92.74633                    1040.488     1405.418
       e.whppain |     236.502    18.13887                    203.4935     274.8647
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.14, Prob > chi2 = 0.1439

. sem(avgcumdosew3-> radchw3)(radchw3->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radchw3 whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood =  -3920.313
Iteration 1:   log likelihood =  -3920.313

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    =  -3920.313

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radchw3 <-     |
    avgcumdosew3 |    .6454152    .6824406      0.95    0.344     -.6921437     1.982974
           _cons |    45.17233    2.000238     22.58    0.000      41.25193     49.09272
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radchw3 |    .0937706    .0260319      3.60    0.000      .0427489     .1447923
           _cons |     5.87006    1.481846      3.96    0.000      2.965696     8.774425
-----------------+----------------------------------------------------------------
 Variance         |
       e.radchw3 |    1125.185    86.29778                    968.1438       1307.7
       e.whppain |    259.9303    19.93574                     223.652     302.0933
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.00, Prob > chi2 = 0.0454

. sem(avgcumdosew3-> radtlw3)(radtlw3->whppain) if gender==1, nocapslatent

Endogenous variables


Observed:  radtlw3 whppain


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

Iteration 0:   log likelihood = -3932.9258
Iteration 1:   log likelihood = -3932.9258

Structural equation model                       Number of obs      =       340
 Estimation method = ml
 Log likelihood    = -3932.9258

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radtlw3 <-     |
    avgcumdosew3 |    .6410208    .7122484      0.90    0.368     -.7549604     2.037002
           _cons |    50.51592    2.087605     24.20    0.000      46.42429     54.60755
  ---------------+----------------------------------------------------------------
   whppain <-     |
         radtlw3 |    .1022438    .0248049      4.12    0.000       .053627     .1508605
           _cons |    4.934843    1.541088      3.20    0.001      1.914366     7.955321
-----------------+----------------------------------------------------------------
 Variance         |
       e.radtlw3 |    1225.624    94.00109                    1054.565     1424.431
       e.whppain |    257.0071    19.71154                    221.1367     298.6959
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.98, Prob > chi2 = 0.0459

.
. scalar numMedPainDoseFsigw3 =4

.
. matrix define maleWHPpainr2w3 = ( fw3 , tw3bf, tw3nobf, w3numbf, r2chabfw3)

. matrix colnames maleWHPpainr2w3 = FullBFR2a TR2aBF  TR2aNoBF  NumBF  BFR2cha

. matrix rownames maleWHPpainr2w3 = wave2

. matlist maleWHPpainr2w3

   | FullBFR2a    TR2aBF    TR2aNoBF    NumBF    BFR2cha
-------------+-------------------------------------------------------
wave2   |  .3289518     .3624059     .2265769            2      .135829

.
. matrix define  maleWHPpainr2 = (maleWHPpainr2w1 \ maleWHPpainr2w2 \ maleWHPpainr2w3 )

. matlist maleWHPpainr2

   | FullBFR2a    TR2aBF    TR2aNoBF    NumBF    BFR2cha
-------------+-------------------------------------------------------
wave1   |  .3020449     .3148261     .1258014            1     .1890247
wave2   |   .355743     .3781594     .3179991            1     .0601603
wave2   |  .3289518     .3624059     .2265769            2      .135829

.
.
.
.
.
.
.
. matrix define H1p1MPnDosew3 = J(1,12,0)

. matrix  colnames H1p1MPnDosew3 = hypnum ptnum wv dsigfw3 dsigtw3 numMainEffsigFw3 numMainEffsigTw3 numModFw3 numModTw3 numbfsigfw3 numbfsigtw3 numMedw3

. matrix  rownames H1p1MPnDosew3 = wave3

. matlist H1p1MPnDosew3

   | hypnum    ptnum    wv    dsigfw3    dsigtw3    numMain~3    numMain~3    numModFw3    numModTw3    numbfsi~3    numbfsi~3    numMedw3
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave3   |         0            0            0            0            0            0            0            0            0            0            0            0

.
.
. *----- Legend-----------------------------------------------------------------------------------
. * legend: hyp =  hypothesis
. *         pt = part of hypothesis
. *         wv = wave
. *         dsigfw3  =  is dose signififcant in full main effects model = 1 if yes, 0 otherwise
. *         dsigtw3 =   is dose signif in trimmed main effects model = 1 if yes, 0 otherwise
. *         numMainEffsigFwx  =  number of sig main effects in full model in wave x
. *         numMainEffsigTw3  =      "                    "     trimmed "    "    3
. *         numModFw3 =   number of moderating effects in full wave 3 model
. *         numMOdTw3 =   number of moderating effects in trimmed model in wave 3
. *         numbfsigfw3 = number of basis functions significant in full wave 3 model
. *         numbfsigtw3 = number of basis functions significant in trimmedl wave 3 model
. *         numMedw3 = number of possible mediators in wave3
.
.
. matrix define H1p1MPnDosew3 = (hyp, pt, wv, dsigfw3, dsigtw3, numMainEffsigFw3, numMainEffsigTw3, numModsigFw3, numModsigTw3,numbfsigfw3,numbfsigTw3, numMedFw3)

. matrix  colnames H1p1MPnDosew3 = hypnum ptnum wv dsigfw3 dsigtw3 numMainEffsigFw3 numMainEffsigTw3 numModFw3 numModTw3 numbfsigfw3 numbfsigtw3 numMedw3

. matrix  rownames H1p1MPnDosew3 = wave3

. matlist H1p1MPnDosew3

   | hypnum    ptnum    wv    dsigfw3    dsigtw3    numMain~3    numMain~3    numModFw3    numModTw3    numbfsi~3    numbfsi~3    numMedw3
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave3   |         1            1            3           .5            0            7            9            0            0            2           15           15

.
. matrix define H1p1MPnDose = ( H1p1MPnDosew1 \ H1p1MPnDosew2 \ H1p1MPnDosew3 )

. matlist H1p1MPnDose

   | hypnum    ptnum    wv    dsigMw1    dsigtw1    numMain~1    numMain~1    numModMw1    numModTw1    numbfsi~1    numbfsi~1    numMedw1
-------------+------------------------------------------------------------------------------------------------------------------------------------
wave1   |         1            1            1            1            1            7            5            0            1            1            1            2
wave2   |         1            1            2           .5           .5            3            4            6            0            3            9            1
wave3   |         1            1            3           .5            0            7            9            0            0            2           15           15

.
. cap svmat H1p1MPnDose