.
. set linesize 160

.
. set more off

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

. use chwide25june2012, clear
(Zero for missing on all icdx)

. title "Hypothesis 1 part 1 male sleep analysis "


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              Hypothesis 1 part 1 male sleep analysis                *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:15:41  *****
*******************************************************************************
*******************************************************************************


.
. * !Note to reader: Required: mlowess.ado installed from ssc
.
. // male sleep model
.
. // This bf model failed.  None of the bf seem to have been significant
.
. * A few words about the Nottingham sleep scale
. bysort gender: summ WHPsleep

-------------
-> gender = 1. male

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
    WHPsleep |       340    17.29688    24.82614          0        101

-------------
-> gender = 2. female

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
    WHPsleep |       363    26.24466    30.90295          0        101


. centile WHPsleep if gender==1, centile(33 67)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
    WHPsleep |      340        33             0               0           0
             |                 67         12.57           12.57        21.7

.
. cap drop bfmsleepsleep23-bfmsleepsleep20

. cap drop bfmsleepsleep1-bfmsleepsleep23

.
.
. title "Male basis functions for the Dose effect on sleep"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****         Male basis functions for the Dose effect on sleep           *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:15:41  *****
*******************************************************************************
*******************************************************************************


.
. cap gen bfmsleep1 = max(0, BSIposymp - 22020)

. cap gen bfmsleep2 = max(0, 22020 - BSIposymp)

. cap gen bfmsleep3 = max(0, BSIhos - 21930) * bfmsleep1

. cap gen bfmsleep4 = max(0, 21930 - BSIhos) * bfmsleep1

. cap gen bfmsleep5 = max(0, sufamw1 - 21926) * bfmsleep2

. cap gen bfmsleep6 = max(0, 21926 - sufamw1) * bfmsleep2

. cap gen bfmsleep7 = trgovw3  if trgovw3 !=.

. cap drop bfmsleep8

. cap gen bfmsleep8 = trgovw3 if trgovw3== .

. cap gen bfmsleep9 = max(0, trgovw3 - 21986) * bfmsleep7

. cap gen bfmsleep11 = max(0, neiw1 - 21996) * bfmsleep9

. cap gen bfmsleep12 = max(0, 21996 - neiw1) * bfmsleep9

. cap gen bfmsleep13 = max(0, shjobw1 - 21996) * bfmsleep9

. cap gen bfmsleep15 = (medcow1  !=. ) * bfmsleep9

. cap gen bfmsleep17 = max(0, medcow1 - 21916) * bfmsleep15

. cap gen bfmsleep18 = max(0, age - 30) * bfmsleep8

.
.
.  label var bfmsleep1 "max(0, BSIposymp - 22020)"

.  label var bfmsleep2 "max(0, 22020 - BSIposymp)"

.  label var bfmsleep3 "max(0, BSIhos - 21930) * bfmsleep1"

.  label var bfmsleep4 "max(0, 21930 - BSIhos) * bfmsleep1"

.  label var bfmsleep5  "max(0, sufamw1 - 21926) * bfmsleep2"

.  label var bfmsleep6 "max(0, 21926 - sufamw1) * bfmsleep2"

.  label var bfmsleep7 "(trgovw3  !=. )"

.  label var bfmsleep8 "(trgovw3 = . )"

.  label var bfmsleep9 "max(0, trgovw3 - 21986) * bfmsleep7"

.  label var bfmsleep11  " max(0, neiw1 - 21996) * bfmsleep9"

.  label var bfmsleep12  " max(0, 21996 - neiw1) * bfmsleep9"

.  label var bfmsleep13  " max(0, shjobw1 - 21996) * bfmsleep9"

.  label var bfmsleep15  " (medcow1  !=. ) * bfmsleep9"

.  label var bfmsleep17  " max(0, medcow1 - 21916) * bfmsleep15"

.  label var bfmsleep18  " max(0, age - 30) * bfmsleep8"

.
.  // Male basis functions begin with bfmsleep
.  // Female basis functions begin with bff
.
.  /*
>
>
>  y = 21947.7 + 1.63852 * bfmsleep1 - 0.25614 * bfmsleep3 - 0.453931 * bfmsleep4
>              - 0.00942695 * bfmsleep5 - 0.0611928 * bfmsleep6 + 2.4321 * bfmsleep9
>              - 0.10478 * bfmsleep11 - 0.0353925 * bfmsleep12
>              + 0.0746402 * bfmsleep13 - 0.387369 * bfmsleep17
>              + 0.554833 * bfmsleep18
>
>  model whpsleep = bfmsleep1 bfmsleep3 bfmsleep4 bfmsleep5 bfmsleep6 bfmsleep9 bfmsleep11 bfmsleep12 bfmsleep13 bfmsleep17
>                   bfmsleep18
>
>
>  */
.
.
.
. title "Wave 1 Male dose sleep response analysis"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              Wave 1 Male dose sleep response analysis               *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:15:41  *****
*******************************************************************************
*******************************************************************************


.
. // Based regresssion splines generated, we can begin to model the sleep response for males
.
. *---------------- Full male sleep regression model
. regress WHPsleep age MiPTSD kmacc radfmw1 anxagw2 efradw2 inc2w3 phlthw3 ///
>   Vodkaw3 suprtw2 dvcew3 occ7w1 illw1 BSIposymp  BSIhos sufamw1 trgovw1 neiw1 ///
>   shjobw1 medcow1 deaw1 avgcumdosew1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     306
                                                       F( 22,   305) =   13.92
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4122
                                                       Root MSE      =  19.367

(Std. Err. adjusted for 306 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |   -.0420491    .1162181     -0.36    0.718     -.2707398     .1866416
      MiPTSD |    .0675528     .206605      0.33    0.744     -.3389988     .4741045
       kmacc |   -.0003478     .006541     -0.05    0.958     -.0132191     .0125234
     radfmw1 |    .0763892    .0424303      1.80    0.073     -.0071039     .1598823
     anxagw2 |   -.0222068    .0991223     -0.22    0.823     -.2172569     .1728434
     efradw2 |    .0038428    .0452538      0.08    0.932     -.0852064      .092892
      inc2w3 |     .725691     2.41932      0.30    0.764      -4.03498     5.486362
     phlthw3 |   -.0359982    .0754291     -0.48    0.634     -.1844256     .1124291
     Vodkaw3 |    .6111294    .6203675      0.99    0.325     -.6096127     1.831872
     suprtw2 |    .0802703    .0270326      2.97    0.003      .0270762     .1334643
      dvcew3 |   -.1595528     5.60379     -0.03    0.977     -11.18653     10.86743
      occ7w1 |     8.29752    11.46717      0.72    0.470     -14.26727      30.8623
       illw1 |    10.03018    4.585592      2.19    0.029      1.006778     19.05358
   BSIposymp |    .5784968     .138684      4.17    0.000      .3055982     .8513953
      BSIhos |   -.5880088    .6235646     -0.94    0.346     -1.815042     .6390244
     sufamw1 |   -.1461893    .1102673     -1.33    0.186     -.3631703     .0707917
     trgovw1 |    -.004259    .0357062     -0.12    0.905     -.0745207     .0660027
       neiw1 |    -.006173    .0382425     -0.16    0.872     -.0814256     .0690796
     shjobw1 |    .0704245    .0467323      1.51    0.133     -.0215341      .162383
     medcow1 |   -.6475505    .8453592     -0.77    0.444     -2.311025     1.015924
       deaw1 |    .5998709     3.40273      0.18    0.860     -6.095928     7.295669
avgcumdosew1 |    .7971942    .3915236      2.04    0.043      .0267649     1.567624
       _cons |   -34.28066    11.31528     -3.03    0.003     -56.54654    -12.01477
-------------+----------------------------------------------------------------

. * only four effects are significant in this model: illw1 BSIposymp trgovw3 suprtw2
. * we need to transform and trime perhaps
. set more off

.
. * we  trim out those effects that have high p values first so we drop deaw1
. *  age and inc2w3 and trgovw1
. *   to improve the signal to noise ratio
. regress WHPsleep MiPTSD kmacc radfmw1 anxagw2  phlthw3 ///
>   Vodkaw3 suprtw2 occ7w1 illw1 BSIposymp  BSIhos sufamw1 neiw1 ///
>   shjobw1 medcow1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     339
                                                       F( 15,   338) =   19.18
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.3915
                                                       Root MSE      =  19.834

(Std. Err. adjusted for 339 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      MiPTSD |     .027059    .1948619      0.14    0.890     -.3562358     .4103538
       kmacc |    -.000712    .0063676     -0.11    0.911     -.0132371     .0118131
     radfmw1 |    .0925375    .0377892      2.45    0.015      .0182059     .1668692
     anxagw2 |    .0334677    .1013325      0.33    0.741     -.1658541     .2327896
     phlthw3 |   -.0670567    .0764928     -0.88    0.381     -.2175186     .0834052
     Vodkaw3 |    .8305362    .5502286      1.51    0.132     -.2517675      1.91284
     suprtw2 |    .0864034    .0258091      3.35    0.001      .0356367     .1371702
      occ7w1 |    7.189394    11.49954      0.63    0.532     -15.43029     29.80908
       illw1 |    5.044916    4.345801      1.16    0.247     -3.503307     13.59314
   BSIposymp |    .5369347    .1325144      4.05    0.000      .2762779     .7975916
      BSIhos |   -.3558801    .6012697     -0.59    0.554     -1.538582     .8268219
     sufamw1 |   -.0017612    .0423739     -0.04    0.967     -.0851111     .0815886
       neiw1 |   -.0205279    .0356602     -0.58    0.565     -.0906717     .0496159
     shjobw1 |    .0430662    .0436599      0.99    0.325     -.0428132     .1289455
     medcow1 |     .065328    .8303307      0.08    0.937     -1.567938     1.698594
       _cons |   -29.72287    10.24658     -2.90    0.004     -49.87797    -9.567766
-------------+----------------------------------------------------------------

.
. * next we trim out some of the less likely terms   BSIhos anxagw2 and MiPTSD
. regress WHPsleep  kmacc radfmw1   phlthw3  ///
>   Vodkaw3 suprtw2 occ7w1 illw1 BSIposymp   sufamw1  neiw1 ///
>   shjobw1 medcow1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     339
                                                       F( 12,   338) =   22.58
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.3904
                                                       Root MSE      =   19.76

(Std. Err. adjusted for 339 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       kmacc |   -.0007709    .0062757     -0.12    0.902     -.0131153     .0115735
     radfmw1 |    .0886533    .0355348      2.49    0.013      .0187559     .1585506
     phlthw3 |    -.070282    .0754017     -0.93    0.352     -.2185977     .0780337
     Vodkaw3 |    .8552279    .5461431      1.57    0.118     -.2190396     1.929495
     suprtw2 |    .0871821    .0256487      3.40    0.001      .0367308     .1376334
      occ7w1 |    6.695875    11.31347      0.59    0.554     -15.55781     28.94956
       illw1 |     5.21769    4.136391      1.26    0.208     -2.918621       13.354
   BSIposymp |     .511927    .0775674      6.60    0.000      .3593514     .6645027
     sufamw1 |     .007686    .0412529      0.19    0.852     -.0734587     .0888307
       neiw1 |   -.0236104    .0356348     -0.66    0.508     -.0937044     .0464836
     shjobw1 |    .0474468    .0417983      1.14    0.257     -.0347707     .1296643
     medcow1 |    .0878058    .8285458      0.11    0.916      -1.54195     1.717561
       _cons |   -28.81079    10.01914     -2.88    0.004     -48.51851    -9.103081
-------------+----------------------------------------------------------------

.
. * next we add the usual covariates and resume sequential trimming
.
. regress WHPsleep  age educ2-educ7 marrw11-marrw13 marrw15 childw1 ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 ///
>   radtlw1 havmil bfmPain2 avgcumdosew1 kmacc radfmw1   phlthw3  ///
>   Vodkaw3 suprtw2 occ7w1 illw1 BSIposymp   sufamw1  neiw1 ///
>   shjobw1 medcow1 if gender==1, vce(cluster id)
note: occ7w1 omitted because of collinearity

Linear regression                                      Number of obs =     337
                                                       F( 44,   336) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4675
                                                       Root MSE      =  19.516

(Std. Err. adjusted for 337 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .436302     .186644      2.34    0.020       .069164     .8034399
       educ2 |     21.0392    9.740301      2.16    0.031      1.879542     40.19885
       educ3 |    16.67743    6.312611      2.64    0.009      4.260215     29.09465
       educ4 |    19.84957    8.992094      2.21    0.028      2.161675     37.53746
       educ5 |       20.03    7.742172      2.59    0.010      4.800762     35.25923
       educ6 |    17.63174    5.758288      3.06    0.002      6.304897     28.95857
       educ7 |    19.32101     14.1787      1.36    0.174     -8.569193     47.21122
     marrw11 |    6.318363    5.366824      1.18    0.240     -4.238446     16.87517
     marrw12 |    1.658826    9.023368      0.18    0.854     -16.09059     19.40824
     marrw13 |    4.255142    7.497041      0.57    0.571     -10.49191     19.00219
     marrw15 |    10.90317    13.36515      0.82    0.415     -15.38674     37.19308
     childw1 |   -2.339697    2.473492     -0.95    0.345     -7.205177     2.525783
     emplw12 |    18.74911    10.45852      1.79    0.074     -1.823313     39.32154
     emplw13 |    23.22761    9.889264      2.35    0.019      3.774935     42.68028
     emplw14 |    53.92715    13.29312      4.06    0.000      27.77893     80.07537
     emplw15 |   -4.492627    21.65022     -0.21    0.836     -47.07968     38.09442
     emplw16 |    20.57893    11.58487      1.78    0.077     -2.209078     43.36694
      occ1w1 |   -22.41027    6.726673     -3.33    0.001     -35.64197    -9.178572
      occ2w1 |   -26.43891    6.448794     -4.10    0.000       -39.124    -13.75381
      occ3w1 |   -26.44991    8.079471     -3.27    0.001     -42.34263    -10.55719
      occ4w1 |   -22.40456    7.521695     -2.98    0.003     -37.20011    -7.609016
      occ5w1 |   -20.89502    8.376407     -2.49    0.013     -37.37183    -4.418213
      occ6w1 |   -27.37478    7.686398     -3.56    0.000     -42.49431    -12.25526
      occ7w1 |   -10.96356    15.88765     -0.69    0.491     -42.21535     20.28823
      occ8w1 |   -19.35041    7.459793     -2.59    0.010     -34.02419    -4.676627
      inc1w1 |    1.794263     7.10796      0.25    0.801     -12.18745     15.77597
      inc2w1 |    2.899025    6.027739      0.48    0.631     -8.957835     14.75588
      inc3w1 |     1.31525    5.861013      0.22    0.823     -10.21365     12.84415
      inc4w1 |     7.32119    6.950761      1.05    0.293       -6.3513     20.99368
     radhlw1 |    -.086583    .0683692     -1.27    0.206     -.2210686     .0479027
     radchw1 |   -.0278923     .042611     -0.65    0.513     -.1117103     .0559257
     radtlw1 |    .0912601    .0430772      2.12    0.035      .0065251     .1759952
      havmil |    .0038229    .0223413      0.17    0.864     -.0401235     .0477694
    bfmPain2 |   -.2238272    .4723148     -0.47    0.636     -1.152894     .7052394
avgcumdosew1 |    1.177103    .4002299      2.94    0.003      .3898312     1.964375
       kmacc |    .0043304    .0159334      0.27    0.786     -.0270114     .0356722
     radfmw1 |    .1119239    .0658419      1.70    0.090     -.0175903     .2414382
     phlthw3 |   -.0318428     .078922     -0.40    0.687     -.1870862     .1234007
     Vodkaw3 |    .8046051    .5575266      1.44    0.150     -.2920772     1.901287
     suprtw2 |    .0866393    .0296928      2.92    0.004      .0282321     .1450466
      occ7w1 |           0   (omitted)
       illw1 |    3.523355    3.765438      0.94    0.350     -3.883448     10.93016
   BSIposymp |    .4807479    .1188394      4.05    0.000      .2469849     .7145109
     sufamw1 |   -.0413921    .0483019     -0.86    0.392     -.1364043     .0536201
       neiw1 |   -.0440133    .0368418     -1.19    0.233     -.1164829     .0284563
     shjobw1 |    .0774946     .041577      1.86    0.063     -.0042893     .1592785
     medcow1 |   -.2318765    .7243092     -0.32    0.749     -1.656629     1.192876
       _cons |    4832.412    10362.57      0.47    0.641     -15551.28      25216.1
-------------+----------------------------------------------------------------

.
.
.
.
. * we begin dropping categorical dummies where none of the components is
. * significant
.
. *   we drop marital status and childw1
. *  This is a wave one analysis so any variable from another wave that is
. *  not significant gets dropped: Vodkaw3 and phlthw3 and kmacc
. *  If the variable is significant from another wave, it may signify persistence
. *  so we keep those.
.
.
. regress WHPsleep  age educ2-educ7  ///
>   emplw12-emplw16 occ1w1-occ8w1 inc1w1-inc4w1 radhlw1 radchw1 ///
>   radtlw1 havmil bfmPain2 avgcumdosew1 radfmw1   ///
>   suprtw2 illw1 BSIposymp   sufamw1  neiw1 ///
>   shjobw1 medcow1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     338
                                                       F( 37,   337) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4607
                                                       Root MSE      =  19.393

(Std. Err. adjusted for 338 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3096656    .1553667      1.99    0.047      .0040549     .6152762
       educ2 |    21.19249     8.77259      2.42    0.016      3.936555     38.44842
       educ3 |    16.92812    5.365735      3.15    0.002      6.373565     27.48267
       educ4 |    20.67932    8.079178      2.56    0.011      4.787343     36.57129
       educ5 |    19.50642    6.842085      2.85    0.005      6.047848       32.965
       educ6 |    17.08078    4.561705      3.74    0.000       8.10778     26.05379
       educ7 |    19.39104    13.83091      1.40    0.162     -7.814758     46.59684
     emplw12 |    23.52903    8.127286      2.90    0.004      7.542426     39.51563
     emplw13 |    27.64112    8.380499      3.30    0.001      11.15644      44.1258
     emplw14 |    63.57848    12.03318      5.28    0.000      39.90889     87.24808
     emplw15 |   -3.694837    19.50619     -0.19    0.850     -42.06406     34.67439
     emplw16 |    25.25117    9.269235      2.72    0.007      7.018327     43.48402
      occ1w1 |   -20.95342    6.307967     -3.32    0.001     -33.36136    -8.545468
      occ2w1 |   -24.67727    6.123088     -4.03    0.000     -36.72155    -12.63298
      occ3w1 |   -25.12471    7.765108     -3.24    0.001      -40.3989    -9.850527
      occ4w1 |   -21.94718    7.366721     -2.98    0.003     -36.43773    -7.456634
      occ5w1 |   -20.19681    8.324572     -2.43    0.016     -36.57148    -3.822141
      occ6w1 |   -28.12022    6.943574     -4.05    0.000     -41.77843    -14.46202
      occ7w1 |   -9.234427    15.41946     -0.60    0.550     -39.56495      21.0961
      occ8w1 |   -16.85421    6.874051     -2.45    0.015     -30.37567    -3.332761
      inc1w1 |    1.711962    6.879178      0.25    0.804     -11.81958      15.2435
      inc2w1 |    2.528623    5.502892      0.46    0.646     -8.295721     13.35297
      inc3w1 |    .9226474    5.342439      0.17    0.863     -9.586082     11.43138
      inc4w1 |    6.853542    6.527703      1.05    0.295     -5.986634     19.69372
     radhlw1 |   -.0899114    .0647929     -1.39    0.166     -.2173609      .037538
     radchw1 |   -.0326714    .0413581     -0.79    0.430     -.1140238     .0486811
     radtlw1 |    .0928448    .0405055      2.29    0.023      .0131693     .1725203
      havmil |    .0088031    .0090566      0.97    0.332     -.0090115     .0266178
    bfmPain2 |   -.2431346    .4408494     -0.55    0.582     -1.110298     .6240285
avgcumdosew1 |    1.194054     .373815      3.19    0.002      .4587491     1.929358
     radfmw1 |    .1128829    .0601871      1.88    0.062     -.0055069     .2312726
     suprtw2 |    .0799035    .0286313      2.79    0.006       .023585      .136222
       illw1 |    3.805273    3.576739      1.06    0.288     -3.230274     10.84082
   BSIposymp |    .4998532    .1178269      4.24    0.000      .2680843     .7316221
     sufamw1 |   -.0466686    .0481351     -0.97    0.333     -.1413517     .0480145
       neiw1 |   -.0386272    .0369161     -1.05    0.296     -.1112422     .0339878
     shjobw1 |    .0733718    .0383269      1.91    0.056     -.0020182     .1487619
     medcow1 |   -.1766918    .7162577     -0.25    0.805     -1.585591     1.232207
       _cons |    5258.223    9675.134      0.54    0.587     -13773.04     24289.49
-------------+----------------------------------------------------------------

.
.
. * we drop radhlw1 and radchw1
.
.
. regress WHPsleep  age educ2-educ7  ///
>   emplw12-emplw16 occ1w1-occ8w1   ///
>   radtlw1 havmil bfmPain2 avgcumdosew1 radfmw1   ///
>   suprtw2 illw1 BSIposymp   sufamw1  neiw1 ///
>   shjobw1 medcow1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     338
                                                       F( 31,   337) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4532
                                                       Root MSE      =  19.334

(Std. Err. adjusted for 338 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .2928191    .1526158      1.92    0.056     -.0073805     .5930187
       educ2 |    23.13027    8.596229      2.69    0.007      6.221245     40.03929
       educ3 |    18.46199    5.446123      3.39    0.001      7.749313     29.17467
       educ4 |    23.11353    7.586518      3.05    0.002       8.19064     38.03643
       educ5 |    21.08173    6.864262      3.07    0.002      7.579531     34.58393
       educ6 |    18.63846    4.748198      3.93    0.000      9.298617      27.9783
       educ7 |    20.92573    13.08576      1.60    0.111     -4.814329      46.6658
     emplw12 |    19.42401    10.20145      1.90    0.058      -.642525     39.49055
     emplw13 |    22.81259    10.60772      2.15    0.032      1.946904     43.67829
     emplw14 |    58.77309    13.19227      4.46    0.000      32.82352     84.72266
     emplw15 |    -10.0504    18.92998     -0.53    0.596      -47.2862      27.1854
     emplw16 |    20.20079    10.69915      1.89    0.060     -.8447351     41.24631
      occ1w1 |   -19.18758    6.746552     -2.84    0.005     -32.45824    -5.916922
      occ2w1 |    -23.2058    6.547187     -3.54    0.000      -36.0843     -10.3273
      occ3w1 |    -23.9533    7.988528     -3.00    0.003     -39.66696    -8.239637
      occ4w1 |   -19.85251    7.507495     -2.64    0.009     -34.61996    -5.085051
      occ5w1 |   -19.11174    8.725783     -2.19    0.029      -36.2756    -1.947874
      occ6w1 |   -27.37151    7.393351     -3.70    0.000     -41.91444    -12.82858
      occ7w1 |   -7.540843    15.15799     -0.50    0.619     -37.35704     22.27536
      occ8w1 |    -15.0746    7.296963     -2.07    0.040     -29.42793    -.7212634
     radtlw1 |    .0667301    .0346578      1.93    0.055     -.0014427     .1349029
      havmil |    .0100517    .0089684      1.12    0.263     -.0075894     .0276927
    bfmPain2 |   -.3038223    .4141066     -0.73    0.464     -1.118382     .5107371
avgcumdosew1 |    1.116318    .3807649      2.93    0.004      .3673428     1.865293
     radfmw1 |    .0408376    .0395462      1.03    0.303     -.0369509     .1186261
     suprtw2 |    .0807943    .0275534      2.93    0.004      .0265959     .1349927
       illw1 |    3.780623    3.645357      1.04    0.300     -3.389898     10.95114
   BSIposymp |     .490961    .1169995      4.20    0.000      .2608198     .7211023
     sufamw1 |   -.0481155    .0441136     -1.09    0.276     -.1348881     .0386572
       neiw1 |   -.0344954    .0365776     -0.94    0.346     -.1064446     .0374538
     shjobw1 |    .0588469    .0381326      1.54    0.124     -.0161611     .1338549
     medcow1 |   -.2404245    .7113907     -0.34    0.736      -1.63975     1.158901
       _cons |    6593.143    9088.595      0.73    0.469     -11284.38     24470.67
-------------+----------------------------------------------------------------

.
.
. * we drop income, havmil,  neiw1, sjobw1, medcow1 and radfmw1
. des emplw14  // this is volunteer work

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


emplw14           byte     %8.0g                        emplw1==3. voluntary


. des emplw15 // this is a retired category and it is getting thrown out by Stata

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


emplw15           byte     %8.0g                        emplw1==4. retired


. * so we drop employment and bfmPain2
.
. *------  We now have a trimmed model and we can examine its adjusted r2
.
. regress WHPsleep  age educ2-educ7  ///
>    occ1w1-occ8w1   ///  radtlw1 avgcumdosew1   bfmsleep1-bfmsleep18 ///
>   suprtw2 illw1 BSIposymp   sufamw1  ///
>    if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     340
                                                       F( 19,   339) =   12.47
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4111
                                                       Root MSE      =  19.609

(Std. Err. adjusted for 340 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .4226786    .1466677      2.88    0.004      .1341852     .7111719
       educ2 |    27.69178    7.245294      3.82    0.000      13.44039     41.94318
       educ3 |    22.54738    4.059814      5.55    0.000      14.56178     30.53298
       educ4 |    26.20316    6.799984      3.85    0.000      12.82768     39.57863
       educ5 |     28.2073    5.265659      5.36    0.000      17.84982     38.56478
       educ6 |    23.28726    3.294018      7.07    0.000      16.80797     29.76655
       educ7 |    24.63834    11.87852      2.07    0.039       1.27344     48.00324
      occ1w1 |   -14.83041     6.53734     -2.27    0.024     -27.68927     -1.97155
      occ2w1 |   -17.51628    6.542385     -2.68    0.008     -30.38506    -4.647493
      occ3w1 |    -17.8286    7.495601     -2.38    0.018     -32.57235    -3.084859
      occ4w1 |   -13.63056    7.482554     -1.82    0.069     -28.34864     1.087522
      occ5w1 |   -14.21308    9.300165     -1.53    0.127     -32.50638     4.080219
      occ6w1 |   -21.74591    7.070516     -3.08    0.002     -35.65352      -7.8383
      occ7w1 |   -6.184849    12.03448     -0.51    0.608      -29.8565      17.4868
      occ8w1 |   -7.872667    6.723547     -1.17    0.242     -21.09779     5.352459
     suprtw2 |    .0877311    .0262699      3.34    0.001      .0360586     .1394035
       illw1 |    5.654228    3.720415      1.52    0.129     -1.663778     12.97223
   BSIposymp |    .5885827    .0619276      9.50    0.000       .466772     .7103934
     sufamw1 |    -.053379    .0402325     -1.33    0.185     -.1325157     .0257577
       _cons |   -65.28972    10.55474     -6.19    0.000     -86.05076    -44.52868
-------------+----------------------------------------------------------------

.
.  scalar tw1nobf = e(r2_a)

.  scalar list tw1nobf
   tw1nobf =  .37614565

.
.
. * We will add basis functions to this model now
.
.
. regress  WHPsleep  age educ2-educ7  ///
>    occ1w1-occ8w1   ///
>   radtlw1 avgcumdosew1 bfmsleep1-bfmsleep18 ///
>   suprtw2 illw1 BSIposymp   sufamw1 ///
>   if gender==1, vce(cluster id)
note: bfmsleep4 omitted because of collinearity
note: bfmsleep6 omitted because of collinearity
note: bfmsleep9 omitted because of collinearity
note: bfmsleep10 omitted because of collinearity
note: bfmsleep11 omitted because of collinearity
note: bfmsleep13 omitted because of collinearity
note: bfmsleep14 omitted because of collinearity
note: bfmsleep16 omitted because of collinearity
note: bfmsleep17 omitted because of collinearity
note: bfmsleep18 omitted because of collinearity

Linear regression                                      Number of obs =     339
                                                       F( 25,   338) =   13.48
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4299
                                                       Root MSE      =  19.494

(Std. Err. adjusted for 339 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3684856    .1450904      2.54    0.012      .0830917     .6538795
       educ2 |    25.37341    7.605113      3.34    0.001       10.4141     40.33273
       educ3 |     20.4579    4.332711      4.72    0.000      11.93542     28.98037
       educ4 |    24.64247    7.676789      3.21    0.001      9.542166     39.74276
       educ5 |    24.82539    5.346409      4.64    0.000      14.30897     35.34182
       educ6 |    20.79066    3.644632      5.70    0.000      13.62164     27.95967
       educ7 |    24.66238    11.56359      2.13    0.034      1.916718     47.40804
      occ1w1 |   -15.21095     6.49998     -2.34    0.020     -27.99645    -2.425437
      occ2w1 |   -18.49347    6.538992     -2.83    0.005     -31.35572    -5.631224
      occ3w1 |   -20.42052    7.763999     -2.63    0.009     -35.69236    -5.148674
      occ4w1 |   -15.20596    7.520156     -2.02    0.044     -29.99816    -.4137606
      occ5w1 |   -15.36181    9.308014     -1.65    0.100     -33.67074     2.947119
      occ6w1 |   -22.46103    7.711804     -2.91    0.004     -37.63021    -7.291859
      occ7w1 |    -8.40893    12.18393     -0.69    0.491     -32.37481     15.55695
      occ8w1 |   -8.775108    6.694174     -1.31    0.191      -21.9426     4.392381
     radtlw1 |    .0662756     .030627      2.16    0.031      .0060321     .1265192
avgcumdosew1 |    1.065453     .394811      2.70    0.007      .2888567     1.842049
   bfmsleep1 |   -73.16277    77.67271     -0.94    0.347     -225.9456     79.62002
   bfmsleep3 |    .0007591    .0010073      0.75    0.452     -.0012223     .0027405
   bfmsleep4 |           0   (omitted)
   bfmsleep5 |   -.0019356    .0028535     -0.68    0.498     -.0075486     .0036773
   bfmsleep6 |           0   (omitted)
   bfmsleep7 |    .0045214    .0032983      1.37    0.171     -.0019664     .0110092
   bfmsleep9 |           0   (omitted)
  bfmsleep10 |           0   (omitted)
  bfmsleep11 |           0   (omitted)
  bfmsleep13 |           0   (omitted)
  bfmsleep14 |           0   (omitted)
  bfmsleep16 |           0   (omitted)
  bfmsleep17 |           0   (omitted)
  bfmsleep18 |           0   (omitted)
     suprtw2 |    .0840418    .0258337      3.25    0.001      .0332266      .134857
       illw1 |    5.276675    3.782544      1.40    0.164     -2.163616     12.71697
   BSIposymp |    .5286093    .1008204      5.24    0.000      .3302949     .7269237
     sufamw1 |   -.0412932     .042824     -0.96    0.336     -.1255282     .0429419
       _cons |   -58.24096    13.64346     -4.27    0.000     -85.07775    -31.40418
-------------+----------------------------------------------------------------

.
.
. * None of the basis functions is statistically significant so we drop them
. * but we try trimming them down first.  They still wash out so we drop them.
. * THe basis functions were heuristic but not conclusive in this case.
.
.
. regress  WHPsleep  age educ2-educ7  ///
>    occ1w1-occ8w1   ///
>   radtlw1 avgcumdosew1 bfmsleep5  ///
>   suprtw2 illw1 BSIposymp  sufamw1  ///
>   if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     339
                                                       F( 22,   338) =   14.06
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4259
                                                       Root MSE      =  19.469

(Std. Err. adjusted for 339 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3585237    .1447464      2.48    0.014      .0738066     .6432409
       educ2 |    25.29301    7.616819      3.32    0.001      10.31067     40.27535
       educ3 |    20.38654    4.395803      4.64    0.000      11.73996     29.03312
       educ4 |    23.34755    7.586079      3.08    0.002      8.425681     38.26943
       educ5 |     24.5771    5.378261      4.57    0.000      13.99803     35.15618
       educ6 |    20.55439    3.666575      5.61    0.000      13.34221     27.76657
       educ7 |    23.66986    11.73495      2.02    0.044       .587118      46.7526
      occ1w1 |   -15.02391    6.505913     -2.31    0.022     -27.82109    -2.226737
      occ2w1 |   -18.10725    6.515298     -2.78    0.006     -30.92289    -5.291613
      occ3w1 |    -19.5118    7.734489     -2.52    0.012     -34.72559    -4.297999
      occ4w1 |   -14.81325    7.601483     -1.95    0.052     -29.76543      .138917
      occ5w1 |   -14.93563    9.188662     -1.63    0.105      -33.0098     3.138534
      occ6w1 |   -22.17956    7.606654     -2.92    0.004     -37.14191    -7.217216
      occ7w1 |   -8.406328    12.22878     -0.69    0.492     -32.46043     15.64777
      occ8w1 |   -8.592208     6.65225     -1.29    0.197     -21.67723     4.492816
     radtlw1 |    .0661374    .0305799      2.16    0.031      .0059865     .1262883
avgcumdosew1 |    1.074382    .3787558      2.84    0.005      .3293661     1.819397
   bfmsleep5 |    8.47e-06    8.12e-06      1.04    0.298     -7.50e-06     .0000244
     suprtw2 |    .0840263    .0256364      3.28    0.001      .0335992     .1344533
       illw1 |    4.772715    3.705846      1.29    0.199     -2.516711     12.06214
   BSIposymp |    .5302872    .0997335      5.32    0.000      .3341107     .7264637
     sufamw1 |   -.0519208     .041494     -1.25    0.212     -.1335399     .0296982
       _cons |   -57.92095    13.43997     -4.31    0.000     -84.35746    -31.48444
-------------+----------------------------------------------------------------

.
.
.
.
. * Somatic symptoms might do this: but so does anxiety mixed with them.
. * This keeps people up at night so we test anxiety and find that it is signif.
. * PTSD is almost significant but not quite in wave 1.
.
. regress  WHPsleep  age educ2-educ7  ///
>    occ1w1-occ8w1  BSIsoma BSIanx PTSDw1 ///
>   radtlw1 avgcumdosew1  illw1 ///
>   suprtw2  sufamw1   ///
>   if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     339
                                                       F( 23,   338) =   12.75
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4185
                                                       Root MSE      =  19.626

(Std. Err. adjusted for 339 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3597373    .1408639      2.55    0.011      .0826569     .6368176
       educ2 |    20.22915    7.744179      2.61    0.009      4.996295     35.46201
       educ3 |    14.39392    4.318535      3.33    0.001      5.899331     22.88851
       educ4 |    22.68447    7.005545      3.24    0.001      8.904508     36.46442
       educ5 |    16.09167    5.356407      3.00    0.003      5.555578     26.62776
       educ6 |     15.6252     3.53185      4.42    0.000      8.678024     22.57238
       educ7 |    15.35266     11.3108      1.36    0.176     -6.895771     37.60109
      occ1w1 |   -13.15902    6.317627     -2.08    0.038     -25.58584    -.7321996
      occ2w1 |   -18.40254    6.249939     -2.94    0.003     -30.69621    -6.108862
      occ3w1 |   -16.15579    7.403127     -2.18    0.030      -30.7178    -1.593786
      occ4w1 |   -11.77467    7.032749     -1.67    0.095     -25.60814     2.058795
      occ5w1 |   -12.81537    9.327113     -1.37    0.170     -31.16187     5.531128
      occ6w1 |   -22.02549     6.68256     -3.30    0.001     -35.17014    -8.880848
      occ7w1 |   -11.89656    13.62654     -0.87    0.383     -38.70007     14.90695
      occ8w1 |   -6.931081    6.256384     -1.11    0.269     -19.23743     5.375271
     BSIsoma |    1.260558    .2906558      4.34    0.000      .6888358      1.83228
      BSIanx |    2.752795    .6179159      4.45    0.000       1.53735     3.968241
      PTSDw1 |    .0710191    .0359939      1.97    0.049      .0002189     .1418194
     radtlw1 |    .0645463    .0317985      2.03    0.043      .0019985     .1270941
avgcumdosew1 |    1.170244    .3680284      3.18    0.002      .4463289     1.894158
       illw1 |    5.730497    3.410269      1.68    0.094     -.9775279     12.43852
     suprtw2 |    .0567366    .0269247      2.11    0.036      .0037755     .1096977
     sufamw1 |   -.0368692    .0391227     -0.94    0.347     -.1138239     .0400854
       _cons |   -50.19025    10.53924     -4.76    0.000     -70.92101    -29.45949
-------------+----------------------------------------------------------------

.
. * We drop BSIposymp as it is kicked out by Stata as collinear
.
. // 13 main effects and 5 are significant   38.46% potency in natural main effects mode
.
.
. * we examine interactions among these variables.
. *  We would center all of the variables prior to computing the interaction
. * but zero is a valid score here so we do not
.
. foreach x in age BSIsoma BSIanx PTSDw1 radtlw1 illw1 sufamw1 {
  2.  cap  gen `x'Xd1 = `x'*avgcumdosew1
  3.   }

.
.
. cap gen miptsdsq = MiPTSDXMiPTSD

. cap gen vodkasq = Vodkaw3^2

. cap gen radfmw1sq = radfmw1^2

.
. *------------------------------------------------ 3  sets of moderators in wave1
. //   we have three first-order moderators
. regress  WHPsleep  age educ2-educ7  ///
>    occ1w1-occ8w1  BSIsoma BSIanx PTSDw1 ///
>   radtlw1 avgcumdosew1  illw1 ///
>   suprtw2  sufamw1 trgovw3  ageXd1 BSIsomaXd1 BSIanxXd1 radtlw1Xd1  ///
>     sufamw1Xd1 if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     305
                                                       F( 29,   304) =   30.95
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4464
                                                       Root MSE      =  19.052

(Std. Err. adjusted for 305 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .2875849    .1607204      1.79    0.075     -.0286803     .6038501
       educ2 |    14.82558     8.07513      1.84    0.067     -1.064644     30.71581
       educ3 |     14.9439    5.954474      2.51    0.013      3.226702     26.66111
       educ4 |    20.75516    8.173898      2.54    0.012      4.670578     36.83974
       educ5 |     14.2023    6.685416      2.12    0.034      1.046755     27.35785
       educ6 |    14.67756    5.288363      2.78    0.006      4.271129     25.08399
       educ7 |    21.77624    12.72105      1.71    0.088     -3.256214     46.80869
      occ1w1 |   -22.52827    6.149743     -3.66    0.000     -34.62972    -10.42682
      occ2w1 |   -24.91888    5.660421     -4.40    0.000     -36.05745    -13.78032
      occ3w1 |   -25.51924     6.96418     -3.66    0.000     -39.22334    -11.81514
      occ4w1 |   -19.75633    6.632375     -2.98    0.003     -32.80751    -6.705157
      occ5w1 |   -20.75448    7.710036     -2.69    0.007     -35.92628    -5.582688
      occ6w1 |   -28.21917    6.280863     -4.49    0.000     -40.57864    -15.85969
      occ7w1 |   -23.81232    11.30315     -2.11    0.036     -46.05462    -1.570008
      occ8w1 |   -15.55756    5.143571     -3.02    0.003     -25.67907    -5.436053
     BSIsoma |    1.679476    .3278577      5.12    0.000      1.034318     2.324634
      BSIanx |    2.279582    .7358747      3.10    0.002      .8315288     3.727635
      PTSDw1 |    .0601568     .035879      1.68    0.095     -.0104459     .1307596
     radtlw1 |    .0421723    .0421376      1.00    0.318     -.0407459     .1250905
avgcumdosew1 |   -11.35866    22.80971     -0.50    0.619     -56.24357     33.52625
       illw1 |     7.79404    4.875545      1.60    0.111     -1.800048     17.38813
     suprtw2 |    .0655184    .0305451      2.14    0.033      .0054117      .125625
     sufamw1 |   -.2490092     .148149     -1.68    0.094     -.5405366     .0425181
     trgovw3 |    .1451308    .0393386      3.69    0.000      .0677204     .2225413
      ageXd1 |    .0188776    .2459888      0.08    0.939     -.4651787     .5029339
  BSIsomaXd1 |   -.6863294    .4410526     -1.56    0.121     -1.554232     .1815732
   BSIanxXd1 |    1.284675    1.163699      1.10    0.270     -1.005251       3.5746
  radtlw1Xd1 |     .113526    .0686339      1.65    0.099     -.0215316     .2485836
  sufamw1Xd1 |     .400417    .3645816      1.10    0.273     -.3170059      1.11784
       _cons |   -42.68825     12.4828     -3.42    0.001     -67.25188    -18.12462
-------------+----------------------------------------------------------------

.  //   we have three first-order moderators and trim them down to the most signif
. regress  WHPsleep  age educ2-educ7  ///
>    occ1w1-occ8w1  BSIsoma BSIanx PTSDw1 ///
>   radtlw1 avgcumdosew1  illw1 ///
>   suprtw2  sufamw1 trgovw3  radtlw1Xd1  ///
>      if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     305
                                                       F( 25,   304) =   14.80
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4405
                                                       Root MSE      =  19.015

(Std. Err. adjusted for 305 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .2915241     .152201      1.92    0.056     -.0079768     .5910249
       educ2 |    14.57726    8.082599      1.80    0.072     -1.327661     30.48219
       educ3 |    14.08954    6.092652      2.31    0.021      2.100432     26.07865
       educ4 |    20.62839     8.30082      2.49    0.013      4.294047     36.96272
       educ5 |    13.68045    6.847029      2.00    0.047      .2068799     27.15402
       educ6 |    14.33062    5.469183      2.62    0.009      3.568372     25.09287
       educ7 |    20.88324    12.53998      1.67    0.097     -3.792912      45.5594
      occ1w1 |   -22.75346    5.855796     -3.89    0.000     -34.27649    -11.23044
      occ2w1 |   -25.51792    5.393393     -4.73    0.000     -36.13103    -14.90481
      occ3w1 |    -25.1458    6.737801     -3.73    0.000     -38.40444    -11.88717
      occ4w1 |   -19.86454    6.373342     -3.12    0.002     -32.40599    -7.323091
      occ5w1 |   -20.94019    7.698022     -2.72    0.007     -36.08834    -5.792037
      occ6w1 |   -27.70933    6.089095     -4.55    0.000     -39.69144    -15.72722
      occ7w1 |    -23.2206     11.5636     -2.01    0.046     -45.97543    -.4657666
      occ8w1 |   -15.46161    4.985639     -3.10    0.002     -25.27234    -5.650878
     BSIsoma |    1.445523    .2943827      4.91    0.000      .8662367     2.024808
      BSIanx |    2.638933    .6222741      4.24    0.000      1.414423     3.863442
      PTSDw1 |    .0644187    .0352784      1.83    0.069      -.005002     .1338395
     radtlw1 |    .0360579    .0397331      0.91    0.365     -.0421288     .1142446
avgcumdosew1 |   -3.406572    2.526735     -1.35    0.179     -8.378676     1.565532
       illw1 |    7.532186    4.770903      1.58    0.115     -1.855989     16.92036
     suprtw2 |    .0644322    .0300252      2.15    0.033      .0053487     .1235157
     sufamw1 |   -.1274604    .0961468     -1.33    0.186     -.3166578      .061737
     trgovw3 |    .1435663    .0390747      3.67    0.000      .0666752     .2204574
  radtlw1Xd1 |    .1170753    .0624614      1.87    0.062     -.0058361     .2399867
       _cons |   -43.51222    11.54117     -3.77    0.000     -66.22291    -20.80154
-------------+----------------------------------------------------------------

.
.
. // No wave 1 interaction is significatnt so we stick with our wave 1 main effects
. // model
. cap gen illw1sq = illw1^2

.
. lowess WHPsleep illw1sq if gender==1, ti("Exploratory graphical analysis of functional form")

. gr save mexpl1slpillsq.gph, replace
(file mexpl1slpillsq.gph saved)

. gr export mexpl1slpillsq.eps, replace
(file mexpl1slpillsq.eps written in EPS format)

.
. mlowess WHPsleep age BSIanx if gender==1, ti("Possible interaction explored")

340 observations, R-sq = 0.2569

. gr save mexpl2slpageanx.gph, replace
(file mexpl2slpageanx.gph saved)

. gr export mexpl2slpageanx.eps, replace
(file mexpl2slpageanx.eps written in EPS format)

.
.
.
. * testing for mediators of sleep
.
. * Chornobyl relatd health threat to oneself is a possible mediator but age is not here
.
. sem (avgcumdosew1 -> age)(age -> whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  age whpsleep


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
             age |    .5900767    .1054083      5.60    0.000      .3834803     .7966732
           _cons |   -11.72448    5.341452     -2.19    0.028     -22.19353    -1.255426
-----------------+----------------------------------------------------------------
 Variance         |
           e.age |    147.6893    11.32726                    127.0764     171.6459
      e.whpsleep |     562.664    43.15436                    484.1333     653.9331
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.86, Prob > chi2 = 0.0494

. sem (avgcumdosew1 -> illw1)(illw1-> whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  illw1 whpsleep


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   illw1 <-       |
    avgcumdosew1 |    .0087277    .0122955      0.71    0.478     -.0153711     .0328264
           _cons |    .0962541    .0211576      4.55    0.000       .054786     .1377221
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
           illw1 |    10.71412    3.508121      3.05    0.002      3.838325     17.58991
           _cons |    16.22547    1.371945     11.83    0.000      13.53651     18.91443
-----------------+----------------------------------------------------------------
 Variance         |
         e.illw1 |    .1427297    .0109469                     .122809     .1658817
      e.whpsleep |    598.1161    45.87341                    514.6373     695.1358
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      5.22, Prob > chi2 = 0.0224

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

Endogenous variables


Observed:  radhlw1 whpsleep


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radhlw1 |    .1869517    .0346524      5.40    0.000      .1190344     .2548691
           _cons |    8.754289    2.042567      4.29    0.000      4.750931     12.75765
-----------------+----------------------------------------------------------------
 Variance         |
       e.radhlw1 |    1370.535    105.1152                     1179.25     1592.848
      e.whpsleep |    566.0649     43.4152                    487.0595     657.8856
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.59, Prob > chi2 = 0.0582

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

Endogenous variables


Observed:  radfmw1 whpsleep


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radfmw1 |    .2058416    .0363179      5.67    0.000      .1346597     .2770234
           _cons |    6.823178    2.250842      3.03    0.002      2.411609     11.23475
-----------------+----------------------------------------------------------------
 Variance         |
       e.radfmw1 |    1247.515    95.68004                      1073.4     1449.873
      e.whpsleep |    561.4758    43.06323                    483.1109     652.5521
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.57, Prob > chi2 = 0.0325

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

Endogenous variables


Observed:  radtlw1 whpsleep


Exogenous variables


Observed:  avgcumdosew1


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radtlw1 |    .0535636    .0369496      1.45    0.147     -.0188564     .1259835
           _cons |    14.48091     2.39076      6.06    0.000      9.795109     19.16671
-----------------+----------------------------------------------------------------
 Variance         |
       e.radtlw1 |    1321.568    101.5091                    1136.866     1536.279
      e.whpsleep |    611.6606    46.98137                    526.1749     711.0348
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      5.63, Prob > chi2 = 0.0176

.
.
. title "Male dose => Sleep wave two analysis"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                Male dose => Sleep wave two analysis                 *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:15:51  *****
*******************************************************************************
*******************************************************************************


.
. // Full model
. regress WHPsleep  age educ2-educ7 marrw21-marrw23 marrw25 childw2 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw2 ///
>   radtlw2 havmil bfmPain2 avgcumdosew2 kmacc radfmw2   phlthw2  ///
>   Vodkaw2 suprtw2  illw2 BSIposymp   sufamw2 trgovw2 neiw2 ///
>   shjobw2 medcow2 if gender==1, vce(cluster id)
note: emplw25 omitted because of collinearity
note: occ7w2 omitted because of collinearity
note: inc4w2 omitted because of collinearity

Linear regression                                      Number of obs =     306
                                                       F( 43,   305) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4743
                                                       Root MSE      =  19.071

(Std. Err. adjusted for 306 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0293781    .1601415      0.18    0.855      -.285744     .3445001
       educ2 |    24.18103    9.793709      2.47    0.014      4.909237     43.45282
       educ3 |    20.58686     5.47194      3.76    0.000      9.819325     31.35439
       educ4 |    19.98465    7.567486      2.64    0.009      5.093562     34.87574
       educ5 |    23.48526     6.55423      3.58    0.000      10.58803      36.3825
       educ6 |    20.30841    5.066848      4.01    0.000        10.338     30.27881
       educ7 |    32.41602    12.68227      2.56    0.011      7.460201     57.37183
     marrw21 |   -13.08482    12.03888     -1.09    0.278      -36.7746     10.60496
     marrw22 |   -12.59274    12.48056     -1.01    0.314     -37.15163     11.96616
     marrw23 |   -9.223022    11.79088     -0.78    0.435     -32.42478     13.97874
     marrw25 |   -5.223215    12.73332     -0.41    0.682     -30.27949     19.83306
     childw2 |   -2.879118    2.511984     -1.15    0.253      -7.82213     2.063895
     emplw22 |    61.00911    9.585397      6.36    0.000      42.14723     79.87099
     emplw23 |    61.66285    9.987396      6.17    0.000      42.00993     81.31577
     emplw24 |    102.8707    11.96344      8.60    0.000      79.32937      126.412
     emplw25 |           0   (omitted)
     emplw26 |    63.23257    7.256082      8.71    0.000      48.95425     77.51088
      occ1w2 |   -62.02782    8.818862     -7.03    0.000     -79.38134    -44.67431
      occ2w2 |    -63.0139    8.853868     -7.12    0.000      -80.4363     -45.5915
      occ3w2 |   -67.18134    8.785012     -7.65    0.000     -84.46825    -49.89444
      occ4w2 |   -57.80373    9.366279     -6.17    0.000     -76.23443    -39.37302
      occ5w2 |   -60.98647    9.139514     -6.67    0.000     -78.97095    -43.00199
      occ6w2 |   -67.62393    10.47211     -6.46    0.000     -88.23066    -47.01721
      occ7w2 |           0   (omitted)
      occ8w2 |   -61.18809    8.879121     -6.89    0.000     -78.66018      -43.716
      inc1w2 |   -.6760501    7.254924     -0.09    0.926     -14.95209     13.59999
      inc2w2 |   -.3632563      6.3586     -0.06    0.954     -12.87553     12.14902
      inc3w2 |    .4686802     6.54761      0.07    0.943     -12.41553     13.35289
      inc4w2 |           0   (omitted)
     radhlw2 |    .0636052    .0807291      0.79    0.431     -.0952513     .2224616
     radchw2 |    .0301881    .0508238      0.59    0.553     -.0698215     .1301977
     radtlw2 |    .0316453    .0465486      0.68    0.497     -.0599518     .1232425
      havmil |    .0075451    .0243673      0.31    0.757     -.0404042     .0554943
    bfmPain2 |   -.4733186     .497765     -0.95    0.342     -1.452807     .5061695
avgcumdosew2 |     .522023    .4074609      1.28    0.201     -.2797673     1.323813
       kmacc |   -.0010745    .0154297     -0.07    0.945     -.0314367     .0292877
     radfmw2 |   -.0289752    .0699326     -0.41    0.679     -.1665866     .1086361
     phlthw2 |   -.1142422    .0813398     -1.40    0.161     -.2743003      .045816
     Vodkaw2 |    .0677924    .5034893      0.13    0.893     -.9229599     1.058545
     suprtw2 |    .0327052    .0450987      0.73    0.469     -.0560388     .1214493
       illw2 |   -.6264266    2.674067     -0.23    0.815     -5.888382     4.635529
   BSIposymp |     .495565    .1303981      3.80    0.000      .2389711     .7521588
     sufamw2 |    .0551733    .0415784      1.33    0.186     -.0266435       .13699
     trgovw2 |    .0653345    .0409379      1.60    0.112      -.015222      .145891
       neiw2 |   -.0539557    .0493714     -1.09    0.275     -.1511075     .0431961
     shjobw2 |    .0667506    .0345098      1.93    0.054     -.0011569     .1346581
     medcow2 |   -.3596097    .6031718     -0.60    0.551     -1.546515     .8272951
       _cons |    10344.42    10919.84      0.95    0.344     -11143.34     31832.17
-------------+----------------------------------------------------------------

.
.
.
. des age educ2-educ7 emplw22-emplw26 bfmPain2 avgcumdosew3 BSIposymp ///
>   sufamw3 trgovw3

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


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


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


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


avgcumdosew3      double   %8.0g                        Avg Mean dose of CS137 ending 12/31/2009


BSIposymp         int      %9.0g                        Brief Symptom inventory positive symptom total subscale


sufamw3           byte     %8.0g                        Level of support (in percent) from family in NOW


trgovw3           byte     %8.0g                        level of trust in government reports about chornobyl in time period 1997-now


. // trimmed model
. regress WHPsleep  age educ2-educ7 ///
>   emplw22-emplw26 occ1w2-occ8w2  ///
>    avgcumdosew2  ///
>    BSIposymp   sufamw2 trgovw2  ///
>    if gender==1, vce(cluster id)
note: emplw24 omitted because of collinearity
note: occ6w2 omitted because of collinearity

Linear regression                                      Number of obs =     306
                                                       F( 20,   305) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4342
                                                       Root MSE      =  19.001

(Std. Err. adjusted for 306 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0466139    .1382686      0.34    0.736     -.2254674     .3186951
       educ2 |     24.7246    8.454075      2.92    0.004      8.088903     41.36029
       educ3 |     19.5066    5.790015      3.37    0.001      8.113164     30.90003
       educ4 |    19.46632    7.783144      2.50    0.013      4.150862     34.78177
       educ5 |    23.14619    6.461519      3.58    0.000      10.43139     35.86099
       educ6 |    18.88737    5.101142      3.70    0.000      8.849482     28.92526
       educ7 |    27.77488     13.6095      2.04    0.042       .994481     54.55529
     emplw22 |   -47.31629    4.942269     -9.57    0.000     -57.04155    -37.59103
     emplw23 |   -46.70844    5.482585     -8.52    0.000     -57.49691    -35.91996
     emplw24 |           0   (omitted)
     emplw25 |    -105.716    7.929313    -13.33    0.000     -121.3191    -90.11289
     emplw26 |   -42.21319     6.91236     -6.11    0.000     -55.81514    -28.61124
      occ1w2 |    4.790677    4.975801      0.96    0.336     -5.000566     14.58192
      occ2w2 |    4.637272    4.773649      0.97    0.332     -4.756182     14.03073
      occ3w2 |    .1979835    5.569839      0.04    0.972     -10.76219     11.15816
      occ4w2 |    8.787807    5.368762      1.64    0.103     -1.776695     19.35231
      occ5w2 |    5.956873    6.189661      0.96    0.337     -6.222971     18.13672
      occ6w2 |           0   (omitted)
      occ7w2 |    63.55514    6.792042      9.36    0.000      50.18995     76.92033
      occ8w2 |    2.052761    5.563025      0.37    0.712     -8.894006     12.99953
avgcumdosew2 |    .4794198      .44744      1.07    0.285     -.4010403      1.35988
   BSIposymp |    .6057403    .0660392      9.17    0.000      .4757901     .7356905
     sufamw2 |    .0759089    .0258046      2.94    0.004      .0251314     .1266865
     trgovw2 |     .069684    .0399983      1.74    0.082     -.0090237     .1483916
       _cons |   -16.88808     15.3124     -1.10    0.271     -47.01939     13.24323
-------------+----------------------------------------------------------------

.
. *  wave 2 moderator analysis  : possible interactions
.
. foreach x in age educ2-educ7 ///
>   emplw22-emplw26 occ1w2-occ8w2  ///
>    BSIposymp  sufamw2 trgovw2 {
  2.  cap gen `x'Xd2 = `x'*avgcumdosew2
  3.   }

.
.
. *  three significant interactions in wave two
. * sufamw2Xd2 BSIposympXd2 trgovw2Xd2 because the main effect is not sign. in the
. * main effects model we do not address them.
.
.  regress WHPsleep  age educ2-educ7 ///
>   emplw22-emplw26 occ1w2-occ8w2  ///
>    avgcumdosew2  ///
>    BSIposymp sufamw2 trgovw2 ageXd2 BSIposympXd2  ///
>    sufamw2Xd2 trgovw2Xd2    ///
>    if gender==1, vce(cluster id)
note: emplw24 omitted because of collinearity
note: occ6w2 omitted because of collinearity

Linear regression                                      Number of obs =     306
                                                       F( 24,   305) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4495
                                                       Root MSE      =  18.877

(Std. Err. adjusted for 306 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0883753    .1633631      0.54    0.589     -.2330861     .4098367
       educ2 |    23.96945    8.640679      2.77    0.006      6.966561     40.97234
       educ3 |    19.21306    5.661613      3.39    0.001      8.072292     30.35382
       educ4 |    19.28938    7.747905      2.49    0.013       4.04327     34.53549
       educ5 |    23.06649      6.4421      3.58    0.000       10.3899     35.74307
       educ6 |    18.79797    5.002054      3.76    0.000      8.955066     28.64087
       educ7 |    27.38438    14.05605      1.95    0.052     -.2747395     55.04349
     emplw22 |   -47.63608    4.926177     -9.67    0.000     -57.32968    -37.94248
     emplw23 |   -46.29225    5.498361     -8.42    0.000     -57.11177    -35.47272
     emplw24 |           0   (omitted)
     emplw25 |   -107.8381    8.816946    -12.23    0.000     -125.1878    -90.48835
     emplw26 |   -42.52463     6.86796     -6.19    0.000     -56.03922    -29.01005
      occ1w2 |    5.105468    4.666746      1.09    0.275     -4.077625     14.28856
      occ2w2 |    5.112618     4.39214      1.16    0.245     -3.530113     13.75535
      occ3w2 |    .9723937    5.320465      0.18    0.855      -9.49707     11.44186
      occ4w2 |    9.856189    5.174828      1.90    0.058     -.3266948     20.03907
      occ5w2 |    6.788501    5.953875      1.14    0.255      -4.92737     18.50437
      occ6w2 |           0   (omitted)
      occ7w2 |    63.84805    7.201749      8.87    0.000      49.67665     78.01945
      occ8w2 |    2.126584    5.256068      0.40    0.686     -8.216161     12.46933
avgcumdosew2 |   -10.39226     11.1168     -0.93    0.351     -32.26758     11.48306
   BSIposymp |    .5501223     .072439      7.59    0.000      .4075788     .6926659
     sufamw2 |    .0131483    .0401235      0.33    0.743     -.0658057     .0921023
     trgovw2 |    .0420272    .0435246      0.97    0.335     -.0436193     .1276737
      ageXd2 |    -.024742    .1545947     -0.16    0.873     -.3289491     .2794652
BSIposympXd2 |    .0532869    .0182286      2.92    0.004      .0174172     .0891567
  sufamw2Xd2 |    .0727495    .0368748      1.97    0.049      .0001883     .1453106
  trgovw2Xd2 |    .0271678    .0129145      2.10    0.036       .001755     .0525806
       _cons |   -8.017591    16.36974     -0.49    0.625      -40.2295     24.19432
-------------+----------------------------------------------------------------

.
.  mlowess WHPsleep sufamw2 avgcumdosew2 if gender==1, title(Exploration of interaction)

340 observations, R-sq = 0.0175

.  gr save mslpsufmwd2.gph, replace
(file mslpsufmwd2.gph saved)

.
.  mlowess WHPsleep age avgcumdosew2 if gender==1, title(Age by dose effect)

340 observations, R-sq = 0.1021

.  gr save mslpaged2.gph, replace
(file mslpaged2.gph saved)

.
.  mlowess WHPsleep trgovw2 avgcumdosew2 if gender==1,title(Trust by dose effect)

306 observations, R-sq = 0.0600

.  gr save msleepTrD2.gph, replace
(file msleepTrD2.gph saved)

.
.  summ age if gender==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         age |       340    49.18235    12.22222         30         77

. cap gen meanage = r(mean) if gender==1

. cap gen low  = meanage - r(sd) if gender==1

. cap gen hi =  meanage + r(sd) if gender==1

. cap gen youngdose = avgcumdosew2 if age < low & gender==1

. cap gen middose = avgcumdosew2 if age > low & age < hi & gender==1

. cap gen olddose = avgcumdosew2 if age > hi & gender==1

.
. twoway lfit WHPsleep youngdose  || qfit WHPsleep middose || qfit WHPsleep olddose ,  ///
>          yti(WHPsleep) color(blue red green) title(Effect of age by Dose Interaction on Sleep) ///
>    legend(label( 1 "for young men " ) label( 2 "for mid-aged men") label(3 "seniors") rows(3))  ///
>    xti(avgcumdosew2 in mGrays scale)

.   graph save mSleepDoseXage1.gph, replace
(file mSleepDoseXage1.gph saved)

.   graph export mSleepDoseXage1.eps, replace
(file mSleepDoseXage1.eps written in EPS format)

.
.
. // for curiosity we take a look:
.
.
. summ BSIposymp if gender==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
   BSIposymp |       340    74.96176    23.12557         49        185

. * range from 49 to 185
. * male mean=74.96
. * male sd = 23.125
. centile BSIposymp if gender==1, centile(33 67)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
   BSIposymp |      340        33            60              58          62
             |                 67            80              76          86

.  // 33 % have a score of 60 or below
.  // 67% have a score of 80 or below
. cap gen bpslow = avgcumdosew2 if BSIposymp <= 60 & gender==1

. cap gen bpshi = avgcumdosew2 if BSIposymp >=80 & BSIposymp < .

. cap gen bpsmid = avgcumdosew2 if BSIposymp > 60 & BSIposymp < 80

. label var bpslow "cumdosew2 for BSIposymp lower third males"

. label var bpshi  "cumdosew2 BSIposymp upper third males"

. label var bpsmid "cumdosew2 BSIposymp middle third males"

.
. twoway lfit WHPsleep bpslow || lfit WHPsleep bpsmid || lfit WHPsleep bpshi,  ///
>      yti(WHPsleep) color(blue red green) ///
>      title(Effect of BSIposymptoms by Dose Interaction on Sleep) ///
>      subtitle(for males in wave two) ///
>    legend(label( 1 "for lower BSIposymp " ) caption(trifurcated number of BSIposymp) ///
>    label( 2 "for mid-BSIposymptoms") label(3 "for high BSI posymptoms") rows(3))  ///
>    xti(avgcumdosew2 in milliGrays scale)

. graph save mBSIposXD2onSlp2.gph, replace
(file mBSIposXD2onSlp2.gph saved)

. graph export mBSIposXd2onSlp2.eps, replace
(file mBSIposXd2onSlp2.eps written in EPS format)

.
. summ sufamw2 if gender==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     sufamw2 |       340    63.88235    39.12672          0        100

. centile sufamw2 if gender==1, centile(33 67)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
     sufamw2 |      340        33            50              40          50
             |                 67           100             100         100

. cap gen losufamd2 = avgcumdosew2 if gender==1 & sufamw2 < 63.88

. cap gen hisufamd2 = avgcumdosew2 if gender==1 & sufamw2 >= 63.88

.
.
. twoway lfit WHPsleep losufamd2|| lfit WHPsleep hisufamd2 ,  ///
>      yti(WHPsleep) color(blue red green) ///
>      title(Effect of Family support by Dose Interaction on Sleep) ///
>      subtitle(for males in wave two) ///
>    legend(label( 1 "for lower family support " )  ///
>    label( 2 "for higher family support")  rows(2))

. graph save mfamsupXD2onSlp2.gph, replace
(file mfamsupXD2onSlp2.gph saved)

. graph export mfamsupXd2onSlp2.eps, replace
(file mfamsupXd2onSlp2.eps written in EPS format)

.
.
. summ trgovw2 if gender==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     trgovw2 |       306    38.67647    32.59734          0        100

. centile trgovw2, centile(33 67)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
     trgovw2 |      578        33            20              10          30
             |                 67            50              50          50

. cap gen lotrustd2 = avgcumdosew2 if gender==1 & trgovw2 <= 20

. cap gen midtrustd2 = avgcumdosew2 if gender==1 & trgovw2 > 20 & trgovw2 <= 50

. cap gen hitrustd2 = avgcumdosew2 if gender==1 & trgovw2 > 50

.
.   twoway lfit WHPsleep lotrustd2 || lfit WHPsleep midtrustd2 || lfit WHPsleep hitrustd2,  ///
>      yti(WHPsleep) color(blue red green) ///
>      title(Effect of Trust in government by Dose on Sleep) ///
>      subtitle(for males in wave two) ///
>    legend(label( 1 "for lower trust " ) caption(trifurcated trust) ///
>    label( 2 "for midlevel trust") label(3 "for high trusters") rows(3))  ///
>    xti(avgcumdosew2 in milliGrays scale)

.    gr save mtrstd2onSleep.gph, replace
(file mtrstd2onSleep.gph saved)

.    gr export mtrstd2onSleep.eps, replace
(file mtrstd2onSleep.eps written in EPS format)

.
.
.
. * mediation possibility analysis
. * age is a mediator in wave 2 for males possibly
. * injured onself due to Chornobyl is a possible mediator
. sem(avgcumdosew2->age)(age->whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  age whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
             age |    .5900767    .1054083      5.60    0.000      .3834803     .7966732
           _cons |   -11.72448    5.341452     -2.19    0.028     -22.19353    -1.255426
-----------------+----------------------------------------------------------------
 Variance         |
           e.age |    146.8166    11.26032                    126.3255     170.6315
      e.whpsleep |     562.664    43.15436                    484.1333     653.9331
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      1.81, Prob > chi2 = 0.1786

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

Endogenous variables


Observed:  radhlw2 whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radhlw2 |     .247389    .0355816      6.95    0.000      .1776504     .3171276
           _cons |    5.717624    2.087123      2.74    0.006      1.626938     9.808311
-----------------+----------------------------------------------------------------
 Variance         |
       e.radhlw2 |    1240.593     95.1491                    1067.444     1441.828
      e.whpsleep |    538.0289    41.26493                    462.9365      625.302
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.12, Prob > chi2 = 0.1455

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

Endogenous variables


Observed:  illw2 whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
           illw2 |      10.273     2.20415      4.66    0.000      5.952947     14.59305
           _cons |    14.39627    1.444369      9.97    0.000      11.56536     17.22718
-----------------+----------------------------------------------------------------
 Variance         |
         e.illw2 |    .3492324    .0267849                    .3004902      .405881
      e.whpsleep |    577.6204    44.30146                    497.0022     671.3155
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.29, Prob > chi2 = 0.0697

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

Endogenous variables


Observed:  phlthw2 whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         phlthw2 |   -.3853796    .0725504     -5.31    0.000     -.5275759    -.2431834
           _cons |    49.84219    6.261599      7.96    0.000      37.56969      62.1147
-----------------+----------------------------------------------------------------
 Variance         |
       e.phlthw2 |    316.2124    24.25239                    272.0788     367.5049
      e.whpsleep |     567.434     43.5202                    488.2376     659.4769
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.97, Prob > chi2 = 0.0847

. sem(avgcumdosew2-> radfmw2)(radfmw2->whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  radfmw2 whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   radfmw2 <-     |
    avgcumdosew2 |    .8365725    .7409603      1.13    0.259      -.615683     2.288828
           _cons |    55.20999     1.98505     27.81    0.000      51.31936     59.10061
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radfmw2 |    .2631028    .0365974      7.19    0.000      .1913732     .3348323
           _cons |     2.55926    2.402374      1.07    0.287     -2.149306     7.267825
-----------------+----------------------------------------------------------------
 Variance         |
       e.radfmw2 |    1167.021    89.50646                    1004.141     1356.323
      e.whpsleep |    533.4369    40.91275                    458.9854     619.9651
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.64, Prob > chi2 = 0.1045

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

Endogenous variables


Observed:  radtlw2 whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -4054.4325
Iteration 1:   log likelihood = -4054.4325  (backed up)

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radtlw2 |    .0922484    .0382975      2.41    0.016      .0171866     .1673101
           _cons |    12.50431    2.394969      5.22    0.000      7.810257     17.19836
-----------------+----------------------------------------------------------------
 Variance         |
       e.radtlw2 |    1210.953    92.87582                    1041.941      1407.38
      e.whpsleep |    604.2139    46.34109                    519.8841     702.2228
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.54, Prob > chi2 = 0.0600

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

Endogenous variables


Observed:  radchw2 whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radchw2 |    .0019404    .0395678      0.05    0.961      -.075611     .0794919
           _cons |    17.20242    2.349013      7.32    0.000      12.59844      21.8064
-----------------+----------------------------------------------------------------
 Variance         |
       e.radchw2 |    1146.581    87.93878                    986.5537     1332.567
      e.whpsleep |    614.5203    47.13155                     528.752     714.2009
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      3.70, Prob > chi2 = 0.0544

. sem(avgcumdosew2-> PTSDw2)(PTSDw2->whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  PTSDw2 whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

Iteration 0:   log likelihood = -3699.7005
Iteration 1:   log likelihood = -3699.7005  (backed up)

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
          PTSDw2 |    .5480395    .1019289      5.38    0.000      .3482625     .7478166
           _cons |    14.47158    1.393525     10.38    0.000      11.74032     17.20284
-----------------+----------------------------------------------------------------
 Variance         |
        e.PTSDw2 |    160.3224    12.29617                    137.9463     186.3281
      e.whpsleep |    566.3688     43.4385                     487.321     658.2388
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      4.19, Prob > chi2 = 0.0405

. sem(avgcumdosew2-> injothr)(injothr->whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  injothr whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   injothr <-     |
    avgcumdosew2 |    .0130531    .0094019      1.39    0.165     -.0053743     .0314804
           _cons |    .7345028    .0251879     29.16    0.000      .6851354     .7838701
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         injothr |    9.506146    3.049465      3.12    0.002      3.529304     15.48299
           _cons |    10.19523    2.635731      3.87    0.000      5.029295     15.36117
-----------------+----------------------------------------------------------------
 Variance         |
       e.injothr |    .1878967     .014411                    .1616721     .2183752
      e.whpsleep |    597.4487    45.82223                    514.0631     694.3602
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.95, Prob > chi2 = 0.0858

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

Endogenous variables


Observed:  injselfr whpsleep


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
        injselfr |    10.71239    2.625726      4.08    0.000      5.566059     15.85872
           _cons |    11.84617     1.87298      6.32    0.000      8.175196     15.51714
-----------------+----------------------------------------------------------------
 Variance         |
      e.injselfr |    .2449181    .0187844                     .210735      .284646
      e.whpsleep |    585.8447    44.93224                    504.0787     680.8739
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      1.96, Prob > chi2 = 0.1611

.
. title "Male dose => sleep wave three  analysis"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              Male dose => sleep wave three  analysis                *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:16:12  *****
*******************************************************************************
*******************************************************************************


.
. // Full model
. regress WHPsleep  age educ2-educ7 marrw31-marrw33 marrw35 childw3 ///
>   emplw22-emplw26 occ1w2-occ8w2 inc1w2-inc4w2 radhlw2 radchw3 ///
>   radtlw3 havmil bfmPain2 avgcumdosew3 kmacc radfmw3   phlthw3  ///
>   Vodkaw3 suprtw3  illw3 BSIposymp   sufamw3 trgovw3 neiw3 ///
>   shjobw3 medcow3 if gender==1, vce(cluster id)
note: emplw25 omitted because of collinearity
note: occ7w2 omitted because of collinearity
note: inc4w2 omitted because of collinearity

Linear regression                                      Number of obs =     305
                                                       F( 43,   304) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4935
                                                       Root MSE      =  18.742

(Std. Err. adjusted for 305 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |   -.2034207    .1767829     -1.15    0.251     -.5512938     .1444524
       educ2 |    27.71319    12.17263      2.28    0.024      3.759901     51.66648
       educ3 |    24.81635     8.46321      2.93    0.004      8.162459     41.47024
       educ4 |    23.02596    9.418875      2.44    0.015      4.491514      41.5604
       educ5 |    26.55158    8.860378      3.00    0.003      9.116146     43.98702
       educ6 |    23.60028    7.839324      3.01    0.003      8.174077     39.02649
       educ7 |    32.50217    13.77282      2.36    0.019      5.400047      59.6043
     marrw31 |   -18.74693    8.247186     -2.27    0.024     -34.97573    -2.518135
     marrw32 |   -20.31026    9.031983     -2.25    0.025     -38.08338    -2.537135
     marrw33 |   -24.22848    8.924617     -2.71    0.007     -41.79033    -6.666638
     marrw35 |   -17.99932     9.54269     -1.89    0.060     -36.77741     .7787682
     childw3 |   -1.352588     1.62907     -0.83    0.407     -4.558269     1.853093
     emplw22 |    55.20328    9.080037      6.08    0.000       37.3356     73.07096
     emplw23 |    55.57995    9.516167      5.84    0.000      36.85405     74.30584
     emplw24 |    99.35941    12.68848      7.83    0.000      74.39104     124.3278
     emplw25 |           0   (omitted)
     emplw26 |    58.23859    6.972216      8.35    0.000      44.51867      71.9585
      occ1w2 |   -57.86313    8.225608     -7.03    0.000     -74.04947    -41.67679
      occ2w2 |   -57.53788     8.37778     -6.87    0.000     -74.02366     -41.0521
      occ3w2 |   -64.73218    8.599946     -7.53    0.000     -81.65514    -47.80923
      occ4w2 |   -56.22635    9.289987     -6.05    0.000     -74.50717    -37.94553
      occ5w2 |   -55.91292    8.712902     -6.42    0.000     -73.05815    -38.76769
      occ6w2 |   -58.05693    9.530612     -6.09    0.000     -76.81125    -39.30261
      occ7w2 |           0   (omitted)
      occ8w2 |   -56.11974    8.691104     -6.46    0.000     -73.22207     -39.0174
      inc1w2 |    .4170462    7.328368      0.06    0.955      -14.0037      14.8378
      inc2w2 |    1.613796    6.448413      0.25    0.803     -11.07538     14.30297
      inc3w2 |    1.671616    6.563176      0.25    0.799     -11.24339     14.58662
      inc4w2 |           0   (omitted)
     radhlw2 |    .0664177     .074414      0.89    0.373     -.0800139     .2128494
     radchw3 |   -.0162651    .0476547     -0.34    0.733       -.11004     .0775097
     radtlw3 |    .0737489    .0436971      1.69    0.092     -.0122382     .1597359
      havmil |    .0140907    .0226882      0.62    0.535     -.0305551     .0587364
    bfmPain2 |   -.1625358    .4993654     -0.33    0.745     -1.145186     .8201146
avgcumdosew3 |    .7736711    .4419319      1.75    0.081     -.0959617     1.643304
       kmacc |   -.0033137     .015859     -0.21    0.835     -.0345209     .0278936
     radfmw3 |   -.0266904    .0597787     -0.45    0.656     -.1443227     .0909419
     phlthw3 |   -.0829454    .0841911     -0.99    0.325     -.2486165     .0827258
     Vodkaw3 |    .6581326    .5390702      1.22    0.223     -.4026486     1.718914
     suprtw3 |    .0929304    .0549093      1.69    0.092     -.0151201     .2009808
       illw3 |   -2.825724    1.843043     -1.53    0.126     -6.452461     .8010126
   BSIposymp |     .536666     .123242      4.35    0.000      .2941505     .7791814
     sufamw3 |    .0795962    .0455195      1.75    0.081      -.009977     .1691694
     trgovw3 |     .118055    .0420317      2.81    0.005      .0353451     .2007648
       neiw3 |    .0017761    .0434023      0.04    0.967     -.0836309     .0871832
     shjobw3 |   -.0324959    .0495203     -0.66    0.512     -.1299419       .06495
     medcow3 |    -.133784    .4483058     -0.30    0.766     -1.015959     .7483914
       _cons |    3536.004    10952.76      0.32    0.747     -18016.81     25088.82
-------------+----------------------------------------------------------------

.
. title "Trimmed male wave 3 analysis"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                    Trimmed male wave 3 analysis                     *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:16:12  *****
*******************************************************************************
*******************************************************************************


. regress WHPsleep  age educ2-educ7 ///
>   emplw22-emplw26  ///
>    avgcumdosew3  ///
>    BSIposymp   sufamw3 trgovw3  ///
>    if gender==1, vce(cluster id)
note: emplw25 omitted because of collinearity

Linear regression                                      Number of obs =     305
                                                       F( 14,   304) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4252
                                                       Root MSE      =  18.937

(Std. Err. adjusted for 305 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |   -.0420255    .1380266     -0.30    0.761     -.3136339      .229583
       educ2 |    22.49974     8.91942      2.52    0.012       4.94812     40.05136
       educ3 |     19.6361    6.138024      3.20    0.002      7.557703     31.71449
       educ4 |    19.59378    8.271432      2.37    0.018      3.317275     35.87029
       educ5 |    20.87978    6.935506      3.01    0.003      7.232106     34.52746
       educ6 |     19.3815    6.065892      3.20    0.002      7.445051     31.31795
       educ7 |    26.08434     13.9347      1.87    0.062     -1.336332     53.50501
     emplw22 |   -1.245184     4.23875     -0.29    0.769     -9.586189     7.095821
     emplw23 |    -.106279     5.02253     -0.02    0.983     -9.989604     9.777046
     emplw24 |    45.52958    4.609925      9.88    0.000      36.45818     54.60098
     emplw25 |           0   (omitted)
     emplw26 |    8.369313    7.736263      1.08    0.280     -6.854091     23.59272
avgcumdosew3 |    .6292147    .5099525      1.23    0.218     -.3742688     1.632698
   BSIposymp |    .5780563    .0635916      9.09    0.000      .4529209     .7031917
     sufamw3 |    .1004861    .0336046      2.99    0.003      .0343592     .1666131
     trgovw3 |    .1036335    .0381487      2.72    0.007      .0285646     .1787024
       _cons |   -54.39432    10.98603     -4.95    0.000      -76.0126    -32.77604
-------------+----------------------------------------------------------------

.
. title "Dose is not significant in trimmed model so we do not explore interactions"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Dose is not significant in trimmed model so we do not explore interactions*****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:16:12  *****
*******************************************************************************
*******************************************************************************


.
.  foreach var in BSIposymp sufamw3 trgovw3 {
  2.  cap gen `var'Xd3 = `var3'*avgcumdosew3
  3.  }

.
.  summ BSIposymp if gender==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
   BSIposymp |       340    74.96176    23.12557         49        185

. * range from 49 to 185
. * male mean=74.96
. * male sd = 23.125
. centile BSIposymp if gender==1, centile(33 67)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
   BSIposymp |      340        33            60              58          62
             |                 67            80              76          86

.  // 33 % have a score of 60 or below
.  // 67% have a score of 80 or below
. cap gen bpslowd3 = avgcumdosew3 if BSIposymp <= 60 & gender==1

.  gen bpshid3 = avgcumdosew3 if BSIposymp >=80 & BSIposymp < .
(402 missing values generated)

.  gen bpsmid3 = avgcumdosew3 if BSIposymp > 60 & BSIposymp < 80
(479 missing values generated)

. label var bpslowd3 "cumdosew3 for BSIposymp lower third males"

. label var bpshid3  "cumdosew3 BSIposymp upper third males"

. label var bpsmid3 "cumdosew3 BSIposymp middle third males"

.
. twoway lfit WHPsleep bpslowd3 || lfit WHPsleep bpsmid3 || lfit WHPsleep bpshid3,  ///
>      yti(WHPsleep) color(blue red green) ///
>      title(Effect of BSIposymptoms by Dose Interaction on Sleep) ///
>      subtitle(for males in wave three) ///
>    legend(label( 1 "for lower BSIposymp " ) caption(trifurcated number of BSIposymp) ///
>    label( 2 "for mid-BSIposymptoms") label(3 "for high BSI posymptoms") rows(3))  ///
>    xti(avgcumdosew3 in milliGrays scale)

. graph save mBSIposXD3onSlp3.gph, replace
(file mBSIposXD3onSlp3.gph saved)

. graph export mBSIposXd3onSlp3.eps, replace
(file mBSIposXd3onSlp3.eps written in EPS format)

.
. summ sufamw3 if gender==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     sufamw3 |       339    55.67847    43.73278          0        100

. centile sufamw3 if gender==1, centile(33 50  67)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
     sufamw3 |      339        33            20               0          30
             |                 50            70              50          80
             |                 67           100             100         100

. gen midsufamd3 = avgcumdosew3 if gender==1 & sufamw3 > 20 & sufamw3 < 70
(655 missing values generated)

. cap gen losufamd3 = avgcumdosew3 if gender==1 & sufamw3 <= 20

. cap gen hisufamd3 = avgcumdosew3 if gender==1 & sufamw3 >= 70

.
.
. twoway lfit WHPsleep losufamd2|| || lfit WHPsleep midsufamd3 || lfit WHPsleep hisufamd2 ,  ///
>      yti(WHPsleep) color(blue red green) ///
>      title(Effect of Family support by Dose Interaction on Sleep) ///
>      subtitle(for males in wave three) ///
>    legend(label( 1 "for lower family support " )  ///
>    label( 2 "for mid-level family support") label(3 "for high family suppport")  rows(3))

. graph save mfamsupXD3onSlp3.gph, replace
(file mfamsupXD3onSlp3.gph saved)

. graph export mfamsupXd3onSlp3.eps, replace
(file mfamsupXd3onSlp3.eps written in EPS format)

.
.
. summ trgovw3 if gender==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     trgovw3 |       306    39.00327    31.89486          0        100

. centile trgovw3 if gender==1, centile(33 50 67)

                                                       -- Binom. Interp. --
    Variable |     Obs  Percentile      Centile        [95% Conf. Interval]
-------------+-------------------------------------------------------------
     trgovw3 |      306        33         11.55              10          20
             |                 50            40              30          50
             |                 67            50              50          60

. cap gen lotrustd3 = avgcumdosew3 if gender==1 & trgovw3 <= 11.55

. cap gen midtrustd3 = avgcumdosew3 if gender==1 & trgovw3 > 11.55 & trgovw3 <= 50

. cap gen hitrustd3 = avgcumdosew3 if gender==1 & trgovw3 > 50

.
.   twoway lfit WHPsleep lotrustd3 || lfit WHPsleep midtrustd3 || lfit WHPsleep hitrustd3,  ///
>      yti(WHPsleep) color(blue red green) ///
>      title(Effect of Trust in government by Dose on Sleep) ///
>      subtitle(for males in wave three) ///
>    legend(label( 1 "for lower trust " ) caption(trifurcated trust) ///
>    label( 2 "for midlevel trust") label(3 "for high trusters") rows(3))  ///
>    xti(avgcumdosew3 in milliGrays scale)

.    gr save mtrstd3onSleep.gph, replace
(file mtrstd3onSleep.gph saved)

.    gr export mtrstd3onSleep.eps, replace
(file mtrstd3onSleep.eps written in EPS format)

.
.
.
.
.
.
.
. * mediation possibility analysis
. * age is a mediator in wave 3 for males possibly
. * illnesss in wave 3 is a possible mediator of sleep
. * injured onself due to Chornobyl is a possible mediator
. sem(avgcumdosew3->age)(age->whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  age whpsleep


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
             age |    .5900767    .1054083      5.60    0.000      .3834803     .7966732
           _cons |   -11.72448    5.341452     -2.19    0.028     -22.19353    -1.255426
-----------------+----------------------------------------------------------------
 Variance         |
           e.age |    146.8453    11.26252                    126.3501     170.6649
      e.whpsleep |     562.664    43.15436                    484.1333     653.9331
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.02, Prob > chi2 = 0.1551

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

Endogenous variables


Observed:  radhlw3 whpsleep


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
         radhlw3 |     .248613    .0353901      7.02    0.000      .1792498     .3179763
           _cons |    5.519939     2.09495      2.63    0.008      1.413913     9.625964
-----------------+----------------------------------------------------------------
 Variance         |
       e.radhlw3 |    1253.634    96.14937                    1078.665     1456.985
      e.whpsleep |    536.6341    41.15796                    461.7364     623.6809
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.64, Prob > chi2 = 0.1043

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

Endogenous variables


Observed:  illw3 whpsleep


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 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
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
           illw3 |    4.690789    1.396473      3.36    0.001      1.953752     7.427827
           _cons |    14.96528    1.493716     10.02    0.000      12.03766     17.89291
-----------------+----------------------------------------------------------------
 Variance         |
         e.illw3 |    .8866751    .0680049                    .7629223     1.030502
      e.whpsleep |    594.7864    45.61803                    511.7724      691.266
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.79, Prob > chi2 = 0.0951

. sem(avgcumdosew3-> injselfr)(injselfr->whpsleep) if gender==1, nocapslatent

Endogenous variables


Observed:  injselfr whpsleep


Exogenous variables


Observed:  avgcumdosew3


Fitting target model:

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

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

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   injselfr <-    |
    avgcumdosew3 |    .0271212    .0100639      2.69    0.007      .0073963      .046846
           _cons |    .4757739    .0294973     16.13    0.000      .4179602     .5335876
  ---------------+----------------------------------------------------------------
   whpsleep <-    |
        injselfr |    10.71239    2.625726      4.08    0.000      5.566059     15.85872
           _cons |    11.84617     1.87298      6.32    0.000      8.175196     15.51714
-----------------+----------------------------------------------------------------
 Variance         |
      e.injselfr |    .2446954    .0187673                    .2105434     .2843872
      e.whpsleep |    585.8447    44.93224                    504.0787     680.8739
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =      2.13, Prob > chi2 = 0.1442

.
.
.
. //sjlog using maleSleepTrRegSummary, replace
. // this section requires installation of estout.ado by Ben Jann at ETH
. set more off

. est clear

. regress  WHPsleep  age educ2-educ7  ///
>    occ1w1-occ8w1   ///
>   radtlw1 avgcumdosew1   ///
>   suprtw2 illw1 BSIposymp  BSIsoma BSIanx PTSDw1 ///
>   sufamw1 ///
>   if gender==1, vce(cluster id)

Linear regression                                      Number of obs =     339
                                                       F( 24,   338) =   12.72
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.4360
                                                       Root MSE      =  19.359

(Std. Err. adjusted for 339 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .3499829    .1419889      2.46    0.014      .0706897     .6292761
       educ2 |    23.24714    7.637437      3.04    0.003      8.224248     38.27004
       educ3 |    17.84279     4.53336      3.94    0.000      8.925637     26.75994
       educ4 |    22.69655    6.909847      3.28    0.001      9.104834     36.28827
       educ5 |    20.22991    5.314291      3.81    0.000      9.776665     30.68316
       educ6 |    18.58899    3.749427      4.96    0.000      11.21384     25.96414
       educ7 |    20.01712    10.98884      1.82    0.069     -1.598011     41.63224
      occ1w1 |   -13.27666    6.367654     -2.09    0.038     -25.80188    -.7514397
      occ2w1 |   -17.42106    6.265736     -2.78    0.006     -29.74581    -5.096313
      occ3w1 |    -17.0223    7.380325     -2.31    0.022     -31.53945    -2.505143
      occ4w1 |   -12.49821    7.150135     -1.75    0.081     -26.56257     1.566162
      occ5w1 |   -13.01296    9.215571     -1.41    0.159     -31.14005     5.114139
      occ6w1 |   -21.10993    6.767366     -3.12    0.002     -34.42138    -7.798467
      occ7w1 |   -9.337123     12.6326     -0.74    0.460     -34.18555      15.5113
      occ8w1 |   -6.924492    6.363031     -1.09    0.277     -19.44062     5.591637
     radtlw1 |    .0616176    .0308876      1.99    0.047      .0008615     .1223737
avgcumdosew1 |    1.044914    .3650061      2.86    0.004      .3269448     1.762884
     suprtw2 |    .0741879    .0253192      2.93    0.004      .0243849     .1239909
       illw1 |    5.348099      3.5487      1.51    0.133      -1.63222     12.32842
   BSIposymp |    .3765249    .1458219      2.58    0.010      .0896922     .6633576
     BSIsoma |    .5044461    .4044792      1.25    0.213     -.2911674      1.30006
      BSIanx |    .9592216    .9373483      1.02    0.307     -.8845493     2.802993
      PTSDw1 |     .061858    .0362182      1.71    0.089     -.0093834     .1330994
     sufamw1 |   -.0387303    .0410979     -0.94    0.347     -.1195702     .0421095
       _cons |    -59.2708    10.86536     -5.46    0.000     -80.64303    -37.89856
-------------+----------------------------------------------------------------

. eststo wave1

.
.  regress WHPsleep  age educ2-educ7 ///
>   emplw22-emplw26 occ1w2-occ8w2  ///
>    avgcumdosew2  ///
>    BSIposymp sufamw2 trgovw2 ageXd2 BSIposympXd2  ///
>    sufamw2Xd2 trgovw2Xd2    ///
>    if gender==1, vce(cluster id)
note: emplw24 omitted because of collinearity
note: occ6w2 omitted because of collinearity

Linear regression                                      Number of obs =     306
                                                       F( 24,   305) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4495
                                                       Root MSE      =  18.877

(Std. Err. adjusted for 306 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0883753    .1633631      0.54    0.589     -.2330861     .4098367
       educ2 |    23.96945    8.640679      2.77    0.006      6.966561     40.97234
       educ3 |    19.21306    5.661613      3.39    0.001      8.072292     30.35382
       educ4 |    19.28938    7.747905      2.49    0.013       4.04327     34.53549
       educ5 |    23.06649      6.4421      3.58    0.000       10.3899     35.74307
       educ6 |    18.79797    5.002054      3.76    0.000      8.955066     28.64087
       educ7 |    27.38438    14.05605      1.95    0.052     -.2747395     55.04349
     emplw22 |   -47.63608    4.926177     -9.67    0.000     -57.32968    -37.94248
     emplw23 |   -46.29225    5.498361     -8.42    0.000     -57.11177    -35.47272
     emplw24 |           0   (omitted)
     emplw25 |   -107.8381    8.816946    -12.23    0.000     -125.1878    -90.48835
     emplw26 |   -42.52463     6.86796     -6.19    0.000     -56.03922    -29.01005
      occ1w2 |    5.105468    4.666746      1.09    0.275     -4.077625     14.28856
      occ2w2 |    5.112618     4.39214      1.16    0.245     -3.530113     13.75535
      occ3w2 |    .9723937    5.320465      0.18    0.855      -9.49707     11.44186
      occ4w2 |    9.856189    5.174828      1.90    0.058     -.3266948     20.03907
      occ5w2 |    6.788501    5.953875      1.14    0.255      -4.92737     18.50437
      occ6w2 |           0   (omitted)
      occ7w2 |    63.84805    7.201749      8.87    0.000      49.67665     78.01945
      occ8w2 |    2.126584    5.256068      0.40    0.686     -8.216161     12.46933
avgcumdosew2 |   -10.39226     11.1168     -0.93    0.351     -32.26758     11.48306
   BSIposymp |    .5501223     .072439      7.59    0.000      .4075788     .6926659
     sufamw2 |    .0131483    .0401235      0.33    0.743     -.0658057     .0921023
     trgovw2 |    .0420272    .0435246      0.97    0.335     -.0436193     .1276737
      ageXd2 |    -.024742    .1545947     -0.16    0.873     -.3289491     .2794652
BSIposympXd2 |    .0532869    .0182286      2.92    0.004      .0174172     .0891567
  sufamw2Xd2 |    .0727495    .0368748      1.97    0.049      .0001883     .1453106
  trgovw2Xd2 |    .0271678    .0129145      2.10    0.036       .001755     .0525806
       _cons |   -8.017591    16.36974     -0.49    0.625      -40.2295     24.19432
-------------+----------------------------------------------------------------

. eststo wave2

.
. title "Trimmed male wave 3 analysis"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                    Trimmed male wave 3 analysis                     *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Jun 2012    10:16:18  *****
*******************************************************************************
*******************************************************************************


. regress WHPsleep  age educ2-educ7 ///
>   emplw22-emplw26  ///
>    avgcumdosew3  ///
>    BSIposymp   sufamw3 trgovw3  ///
>    if gender==1, vce(cluster id)
note: emplw25 omitted because of collinearity

Linear regression                                      Number of obs =     305
                                                       F( 14,   304) =       .
                                                       Prob > F      =       .
                                                       R-squared     =  0.4252
                                                       Root MSE      =  18.937

(Std. Err. adjusted for 305 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
     WHPsleep |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |   -.0420255    .1380266     -0.30    0.761     -.3136339      .229583
       educ2 |    22.49974     8.91942      2.52    0.012       4.94812     40.05136
       educ3 |     19.6361    6.138024      3.20    0.002      7.557703     31.71449
       educ4 |    19.59378    8.271432      2.37    0.018      3.317275     35.87029
       educ5 |    20.87978    6.935506      3.01    0.003      7.232106     34.52746
       educ6 |     19.3815    6.065892      3.20    0.002      7.445051     31.31795
       educ7 |    26.08434     13.9347      1.87    0.062     -1.336332     53.50501
     emplw22 |   -1.245184     4.23875     -0.29    0.769     -9.586189     7.095821
     emplw23 |    -.106279     5.02253     -0.02    0.983     -9.989604     9.777046
     emplw24 |    45.52958    4.609925      9.88    0.000      36.45818     54.60098
     emplw25 |           0   (omitted)
     emplw26 |    8.369313    7.736263      1.08    0.280     -6.854091     23.59272
avgcumdosew3 |    .6292147    .5099525      1.23    0.218     -.3742688     1.632698
   BSIposymp |    .5780563    .0635916      9.09    0.000      .4529209     .7031917
     sufamw3 |    .1004861    .0336046      2.99    0.003      .0343592     .1666131
     trgovw3 |    .1036335    .0381487      2.72    0.007      .0285646     .1787024
       _cons |   -54.39432    10.98603     -4.95    0.000      -76.0126    -32.77604
-------------+----------------------------------------------------------------

. eststo wave3

.
.
.  estout  *,      cells(b(star fmt(%9.3f)) se(par)  p)                ///
>                  stats(r2_a bic N, fmt(%9.3f %9.0g) labels(adjR^2 BIC))  ///
>                  legend collabels(none) varlabels(_cons Constant)  ///
>                  title("Trimmed Regression Models" ///
>                  "of reconstructed dose on male sleep")

Trimmed Regression Models of reconstructed dose on male sleep
------------------------------------------------------------
                    wave1           wave2           wave3
------------------------------------------------------------
age                 0.350*          0.088          -0.042
                  (0.142)         (0.163)         (0.138)
                    0.014           0.589           0.761
educ2              23.247**        23.969**        22.500*
                  (7.637)         (8.641)         (8.919)
                    0.003           0.006           0.012
educ3              17.843***       19.213***       19.636**
                  (4.533)         (5.662)         (6.138)
                    0.000           0.001           0.002
educ4              22.697**        19.289*         19.594*
                  (6.910)         (7.748)         (8.271)
                    0.001           0.013           0.018
educ5              20.230***       23.066***       20.880**
                  (5.314)         (6.442)         (6.936)
                    0.000           0.000           0.003
educ6              18.589***       18.798***       19.382**
                  (3.749)         (5.002)         (6.066)
                    0.000           0.000           0.002
educ7              20.017          27.384          26.084
                 (10.989)        (14.056)        (13.935)
                    0.069           0.052           0.062
occ1w1            -13.277*
                  (6.368)
                    0.038
occ2w1            -17.421**
                  (6.266)
                    0.006
occ3w1            -17.022*
                  (7.380)
                    0.022
occ4w1            -12.498
                  (7.150)
                    0.081
occ5w1            -13.013
                  (9.216)
                    0.159
occ6w1            -21.110**
                  (6.767)
                    0.002
occ7w1             -9.337
                 (12.633)
                    0.460
occ8w1             -6.924
                  (6.363)
                    0.277
radtlw1             0.062*
                  (0.031)
                    0.047
avgcumdosew1        1.045**
                  (0.365)
                    0.004
suprtw2             0.074**
                  (0.025)
                    0.004
illw1               5.348
                  (3.549)
                    0.133
BSIposymp           0.377*          0.550***        0.578***
                  (0.146)         (0.072)         (0.064)
                    0.010           0.000           0.000
BSIsoma             0.504
                  (0.404)
                    0.213
BSIanx              0.959
                  (0.937)
                    0.307
PTSDw1              0.062
                  (0.036)
                    0.089
sufamw1            -0.039
                  (0.041)
                    0.347
emplw22                           -47.636***       -1.245
                                  (4.926)         (4.239)
                                    0.000           0.769
emplw23                           -46.292***       -0.106
                                  (5.498)         (5.023)
                                    0.000           0.983
o.emplw24                           0.000          45.530***
                                      (.)         (4.610)
                                        .           0.000
emplw25                          -107.838***
                                  (8.817)
                                    0.000
emplw26                           -42.525***        8.369
                                  (6.868)         (7.736)
                                    0.000           0.280
occ1w2                              5.105
                                  (4.667)
                                    0.275
occ2w2                              5.113
                                  (4.392)
                                    0.245
occ3w2                              0.972
                                  (5.320)
                                    0.855
occ4w2                              9.856
                                  (5.175)
                                    0.058
occ5w2                              6.789
                                  (5.954)
                                    0.255
o.occ6w2                            0.000
                                      (.)
                                        .
occ7w2                             63.848***
                                  (7.202)
                                    0.000
occ8w2                              2.127
                                  (5.256)
                                    0.686
avgcumdosew2                      -10.392
                                 (11.117)
                                    0.351
sufamw2                             0.013
                                  (0.040)
                                    0.743
trgovw2                             0.042
                                  (0.044)
                                    0.335
ageXd2                             -0.025
                                  (0.155)
                                    0.873
BSIposympXd2                        0.053**
                                  (0.018)
                                    0.004
sufamw2Xd2                          0.073*
                                  (0.037)
                                    0.049
trgovw2Xd2                          0.027*
                                  (0.013)
                                    0.036
o.emplw25                                           0.000
                                                      (.)
                                                        .
avgcumdosew3                                        0.629
                                                  (0.510)
                                                    0.218
sufamw3                                             0.100**
                                                  (0.034)
                                                    0.003
trgovw3                                             0.104**
                                                  (0.038)
                                                    0.007
Constant          -59.271***       -8.018         -54.394***
                 (10.865)        (16.370)        (10.986)
                    0.000           0.625           0.000
------------------------------------------------------------
adjR^2              0.393           0.398           0.395
BIC               3090.75        2781.226        2729.006
N                     339             306             305
------------------------------------------------------------
* p<0.05, ** p<0.01, *** p<0.001

.
.