. set seed 1010101

. set matsize 11000

.
.
. *******
.
. *   This script requires pre-installation of spost2 by J. Scott Long for fitstat command
. *   It also requires installation of title2.ado, title3.ado
. *
. *      for the fitstat command to function
. ******
.
. global User  "Robert Alan Yaffee"

. * 17 June 2012
.
. *------- Primary objective:  Hypothesis 1 tests for Part 2 of Nottingham health profile
.
. *********  Hypothesis tests      Robert A. Yaffee    10 June 2012 main effects and moderator identification approach
. *  protocol is to test Health profile subscales against potential confounders including socio-demog vars,
. *     major neg life events, stresses and hassles, social supports, perceived health, distance,
. *     threat and dose to see whether there is a dose-psych response
.
. *  We construct a full model, trimmed model (at .1 level), and then test interactions with dose if there is a
. *     significant main effect dose psych response
.
. *     Trimming is performed with backward elimination to the .1 level
. *
. *  This approach identifies the moderating variables for our path analysis.    We analyze our
. *     final models for congruence with regression assumptions with the rdiag program for a validity assessment
.
. *----------------------------------------------------------------------------------------------------------
.
. *----------- Organization of the program --------------------------------------------------------------------------
. *  main effects regresssions are run for all part 1 health profile subscales except that of emotional
. *    reaction for both males and females separately
. *  these models are trimmed with backward elimination to determine whether the main effect of avg cumulative dose
. *     is significant for that wave
. *   If the main effect of average cumulative dose for that wave is not statistically significant with the
. *     covariates controlled we do not go further along that path
. *   If the main effect of average cumulative dose for that wave is statistically significant, we trim the
. *     model to a p = .1
. *   If average cumulative dose is not significant, we stop
. *   If average cumulative dose is significant we perform a hierarchical regression with interactions between dose
. *      and other significant main effects
. *   We proceed to test for mediating effects of those other significant explanatory variable
.
. ***------------------------------------------------------------------------------------------------------------------
.
. * Part 2 Nottingham subscales
. *  1: hp2work
. *  2: hp2hmcare
. *  3: hp2probsoc
. *  4: hp2pbfhm
. *  5: hp2sexlife
. *  6: hp2inthob
. *  7: hp2vacatn
.
. local dvwhole HP2work-HP2vacatn

. local dv2 HP2work HP2hmcare HP2probsoc HP2pbfhm HP2sxlife HP2inthob HP2vacatn

.
.
.
. *************************************
. di "$User"
Robert Alan Yaffee

.
. title "Testing Hypothesis 1 part 2  wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                Testing Hypothesis 1 part 2  wave 1                  *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:10:40  *****
*******************************************************************************
*******************************************************************************


.
. cd /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
/Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2

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

. cd /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
/Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2

.
.
. di "{hline}"
-------------

. di "{hline}"
-------------

. title2 "Chunk 1 Hyp 1:radiation dose and Nottingham Health profile subscales"
-------------
title2: Chunk 1 Hyp 1:radiation dose and Nottingham Health profile subscales
                                       Date and time:  18 Jun 2012    18:10:41
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
                                       Stata data file:  chwide16june2012.dta  has  2373  variables and  703  observations

Chunk 1 Hyp 1:radiation dose and Nottingham Health profile subscales
-------------

.
.
. //  there is substantial intercorrelation among the items warranting a
. //  multivariate regression model
. cap dummies educ

. cap order educ1-educ8, after(educ)

.
. * These variables are substantially correlated
. pwcorr HP2work HP2hmcare HP2probsoc HP2pbfhm HP2sxlife HP2inthob HP2vacatn, ///
>    obs sig

             |  HP2work HP2hmc~e HP2pro~c HP2pbfhm HP2sxl~e HP2int~b HP2vac~n
-------------+---------------------------------------------------------------
     HP2work |   1.0000
             |
             |      703
             |
   HP2hmcare |   0.4878   1.0000
             |   0.0000
             |      703      703
             |
  HP2probsoc |   0.4587   0.5420   1.0000
             |   0.0000   0.0000
             |      703      703      703
             |
    HP2pbfhm |   0.2832   0.4150   0.4745   1.0000
             |   0.0000   0.0000   0.0000
             |      703      703      703      703
             |
   HP2sxlife |   0.4968   0.4576   0.5589   0.4192   1.0000
             |   0.0000   0.0000   0.0000   0.0000
             |      703      703      703      703      703
             |
   HP2inthob |   0.3787   0.4757   0.5956   0.5089   0.5401   1.0000
             |   0.0000   0.0000   0.0000   0.0000   0.0000
             |      703      703      703      703      703      703
             |
   HP2vacatn |   0.4166   0.4757   0.5956   0.4416   0.5211   0.6840   1.0000
             |   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
             |      703      703      703      703      703      703      703
             |

.
. cap gen havmilsq = havmil^2

.
. cap rename Havmil havmil

. //  controlling for potential confounders
. //  socio-demographics age gender educ income occp marstat children inc
. //  distance from accident side
. //  perceived Chornobyl related health threat to oneself
.
. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40

. local w2bf bf1 bf4 bf6 bf7 bf14 bf15 bf40

. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40

.
. *-------------------------------------------------------------------------------
. *  Hypothesis 1   Part 2 wave 1 tests    male and female
. * endogneous Nottingham pt 2 subscales: HP2work HP2hmcare HP2probsoc HP2pbfhm ///
> *                                        HP2sxlife HP2inthob HP2vacatn
. *  structure of models
. *    1. general models on all Pt 2 subscales with all potential confounders
. *    2. trimmed models on all Pt 2 subscales with from all potential confounders
. *    3. from trimmed models examination of possible moderator variables
. *    4. from trimmed models examination of possible mediator variables
. *    5. Summary analysis and model evaluation of final models only
. *   program is divided into 8 chunks one a general model and 1 for each
. *       endogenous variable
. *-------------------------------------------------------------------------------
. * Chunk 1  General models for all part 2 of Nottingham Health Profile
.
.
. forvalues j=1/1 {
  2. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  3.   }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


.
.
. title " H1: Test of hypothesis 1: Pt 2 wave 1 general models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        H1: Test of hypothesis 1: Pt 2 wave 1 general models         *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:10:41  *****
*******************************************************************************
*******************************************************************************


. forvalues j=1/1 {
  2. set more off
  3.   foreach var in HP2work HP2hmcare HP2probsoc HP2pbfhm HP2sxlife HP2inthob ///
>       HP2vacatn  {
  4.       forvalues k=1/2 {
  5. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  6. di _skip(4)
  7.
. title4 "Full main model for `var' for wave= `j' "
  8. di _skip(4)
  9. title4 "chunk 2 H1 test:Gender= `k'  model Wave =  `j' for `e(depvar)' "
 10. di _skip(4)
 11. title4 "Full Nottingham Part 2 `var' subscale models" "wave `j' for gender==`k'"
 12.
.       xi: logit `var' age  ///
>                 radhlw`j'  bf1 bf20   ///
>                  deaw`j'   ///
>               shhlw`j' shjobw`j' shrelaw`j' suprtw`j'  ///
>                    if gender==`k',  difficult iterate(500) nolog
 13.                         estat class
 14.                         estat gof
 15.                         fitstat
 16. }
 17. }
 18. }

-------------
Full main model for HP2work for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 1  model Wave =  1 for hp2vactn
-------------

-------------
Full Nottingham Part 2 HP2work subscale models
-------------

Logistic regression                               Number of obs   =        340
                                                  LR chi2(9)      =      31.46
                                                  Prob > chi2     =     0.0002
Log likelihood = -157.14168                       Pseudo R2       =     0.0910

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0308396    .0127975      2.41    0.016       .005757     .0559223
     radhlw1 |    .0011812    .0045458      0.26    0.795     -.0077284     .0100908
         bf1 |   -.0366332    .0469292     -0.78    0.435     -.1286127     .0553463
        bf20 |    .0453017    .0444164      1.02    0.308     -.0417528     .1323562
       deaw1 |   -.0051463    .2892671     -0.02    0.986     -.5720994     .5618067
      shhlw1 |    .0001023    .0055692      0.02    0.985     -.0108131     .0110176
     shjobw1 |    .0091313    .0050059      1.82    0.068     -.0006801     .0189427
    shrelaw1 |    .0025607    .0044585      0.57    0.566     -.0061777     .0112992
     suprtw1 |    .0026986    .0050591      0.53    0.594     -.0072171     .0126143
       _cons |   -5.679852    1.827319     -3.11    0.002     -9.261332    -2.098372
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         3             4  |          7
     -     |        67           266  |        333
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    4.29%
Specificity                     Pr( -|~D)   98.52%
Positive predictive value       Pr( D| +)   42.86%
Negative predictive value       Pr(~D| -)   79.88%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.48%
False - rate for true D         Pr( -| D)   95.71%
False + rate for classified +   Pr(~D| +)   57.14%
False - rate for classified -   Pr( D| -)   20.12%
--------------------------------------------------
Correctly classified                        79.12%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(323) =       339.90
                  Prob > chi2 =         0.2483

Measures of Fit for logit of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -157.142
D(330):                      314.283     LR(9):                        31.462
                                         Prob > LR:                     0.000
McFadden's R2:                 0.091     McFadden's Adj R2:             0.033
Maximum Likelihood R2:         0.088     Cragg & Uhler's R2:            0.138
McKelvey and Zavoina's R2:     0.183     Efron's R2:                    0.092
Variance of y*:                4.026     Variance of error:             3.290
Count R2:                      0.791     Adj Count R2:                 -0.014
AIC:                           0.983     AIC*n:                       334.283
BIC:                       -1609.269     BIC':                         20.998

-------------
Full main model for HP2work for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 2  model Wave =  1 for HP2work
-------------

-------------
Full Nottingham Part 2 HP2work subscale models
-------------

Logistic regression                               Number of obs   =        361
                                                  LR chi2(9)      =      47.56
                                                  Prob > chi2     =     0.0000
Log likelihood = -182.19002                       Pseudo R2       =     0.1154

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0643256    .0124013      5.19    0.000      .0400194     .0886317
     radhlw1 |    .0047546    .0039694      1.20    0.231     -.0030253     .0125344
         bf1 |    .0004355    .0252089      0.02    0.986     -.0489731      .049844
        bf20 |    .0056912    .0216782      0.26    0.793     -.0367972     .0481796
       deaw1 |   -.1112272    .1659119     -0.67    0.503     -.4364086     .2139542
      shhlw1 |    .0037005    .0053166      0.70    0.486     -.0067199     .0141209
     shjobw1 |    .0025496    .0049315      0.52    0.605     -.0071159     .0122152
    shrelaw1 |   -.0059036    .0043278     -1.36    0.173     -.0143859     .0025787
     suprtw1 |    .0007605    .0038753      0.20    0.844      -.006835      .008356
       _cons |   -5.262441    1.017784     -5.17    0.000     -7.257261     -3.26762
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        24            12  |         36
     -     |        69           256  |        325
-----------+--------------------------+-----------
   Total   |        93           268  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   25.81%
Specificity                     Pr( -|~D)   95.52%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   78.77%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.48%
False - rate for true D         Pr( -| D)   74.19%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)   21.23%
--------------------------------------------------
Correctly classified                        77.56%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       359
            Pearson chi2(349) =       374.34
                  Prob > chi2 =         0.1680

Measures of Fit for logit of HP2work

Log-Lik Intercept Only:     -205.969     Log-Lik Full Model:         -182.190
D(351):                      364.380     LR(9):                        47.557
                                         Prob > LR:                     0.000
McFadden's R2:                 0.115     McFadden's Adj R2:             0.067
Maximum Likelihood R2:         0.123     Cragg & Uhler's R2:            0.181
McKelvey and Zavoina's R2:     0.198     Efron's R2:                    0.141
Variance of y*:                4.100     Variance of error:             3.290
Count R2:                      0.776     Adj Count R2:                  0.129
AIC:                           1.065     AIC*n:                       384.380
BIC:                       -1702.616     BIC':                          5.443

-------------
Full main model for HP2hmcare for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 1  model Wave =  1 for HP2work
-------------

-------------
Full Nottingham Part 2 HP2hmcare subscale models
-------------

Logistic regression                               Number of obs   =        340
                                                  LR chi2(9)      =      46.85
                                                  Prob > chi2     =     0.0000
Log likelihood = -149.44808                       Pseudo R2       =     0.1355

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .052336    .0131829      3.97    0.000       .026498     .0781739
     radhlw1 |    .0043343    .0047058      0.92    0.357     -.0048889     .0135576
         bf1 |   -.0149427     .033119     -0.45    0.652     -.0798548     .0499693
        bf20 |    .0144084    .0298855      0.48    0.630     -.0441661     .0729829
       deaw1 |   -.1108583    .2961578     -0.37    0.708     -.6913169     .4696004
      shhlw1 |    .0046663    .0057067      0.82    0.414     -.0065187     .0158513
     shjobw1 |    .0132629    .0053838      2.46    0.014      .0027109      .023815
    shrelaw1 |   -.0051278    .0047295     -1.08    0.278     -.0143976     .0041419
     suprtw1 |   -.0070556    .0059804     -1.18    0.238      -.018777     .0046658
       _cons |   -5.506222    1.326203     -4.15    0.000     -8.105532    -2.906912
-------------+----------------------------------------------------------------

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        15             6  |         21
     -     |        55           264  |        319
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.43%
Specificity                     Pr( -|~D)   97.78%
Positive predictive value       Pr( D| +)   71.43%
Negative predictive value       Pr(~D| -)   82.76%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.22%
False - rate for true D         Pr( -| D)   78.57%
False + rate for classified +   Pr(~D| +)   28.57%
False - rate for classified -   Pr( D| -)   17.24%
--------------------------------------------------
Correctly classified                        82.06%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(323) =       340.89
                  Prob > chi2 =         0.2365

Measures of Fit for logit of HP2hmcare

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -149.448
D(330):                      298.896     LR(9):                        46.850
                                         Prob > LR:                     0.000
McFadden's R2:                 0.136     McFadden's Adj R2:             0.078
Maximum Likelihood R2:         0.129     Cragg & Uhler's R2:            0.202
McKelvey and Zavoina's R2:     0.237     Efron's R2:                    0.150
Variance of y*:                4.310     Variance of error:             3.290
Count R2:                      0.821     Adj Count R2:                  0.129
AIC:                           0.938     AIC*n:                       318.896
BIC:                       -1624.656     BIC':                          5.611

-------------
Full main model for HP2hmcare for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 2  model Wave =  1 for HP2hmcare
-------------

-------------
Full Nottingham Part 2 HP2hmcare subscale models
-------------

Logistic regression                               Number of obs   =        361
                                                  LR chi2(9)      =      81.82
                                                  Prob > chi2     =     0.0000
Log likelihood = -191.97101                       Pseudo R2       =     0.1757

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0920059    .0127833      7.20    0.000      .0669511     .1170607
     radhlw1 |    .0020253    .0038466      0.53    0.599     -.0055139     .0095645
         bf1 |     -.00663    .0212107     -0.31    0.755     -.0482022     .0349423
        bf20 |   -.0001616    .0177132     -0.01    0.993     -.0348789     .0345556
       deaw1 |    -.084969    .1571368     -0.54    0.589     -.3929515     .2230135
      shhlw1 |   -.0017213    .0052283     -0.33    0.742     -.0119686     .0085261
     shjobw1 |    .0107311    .0048545      2.21    0.027      .0012164     .0202457
    shrelaw1 |   -.0074675    .0042372     -1.76    0.078     -.0157724     .0008373
     suprtw1 |   -.0008664    .0038272     -0.23    0.821     -.0083676     .0066348
       _cons |   -5.472133    .9016353     -6.07    0.000     -7.239306     -3.70496
-------------+----------------------------------------------------------------

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        62            28  |         90
     -     |        63           208  |        271
-----------+--------------------------+-----------
   Total   |       125           236  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   49.60%
Specificity                     Pr( -|~D)   88.14%
Positive predictive value       Pr( D| +)   68.89%
Negative predictive value       Pr(~D| -)   76.75%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   11.86%
False - rate for true D         Pr( -| D)   50.40%
False + rate for classified +   Pr(~D| +)   31.11%
False - rate for classified -   Pr( D| -)   23.25%
--------------------------------------------------
Correctly classified                        74.79%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       359
            Pearson chi2(349) =       375.75
                  Prob > chi2 =         0.1555

Measures of Fit for logit of HP2hmcare

Log-Lik Intercept Only:     -232.881     Log-Lik Full Model:         -191.971
D(351):                      383.942     LR(9):                        81.821
                                         Prob > LR:                     0.000
McFadden's R2:                 0.176     McFadden's Adj R2:             0.133
Maximum Likelihood R2:         0.203     Cragg & Uhler's R2:            0.280
McKelvey and Zavoina's R2:     0.288     Efron's R2:                    0.223
Variance of y*:                4.623     Variance of error:             3.290
Count R2:                      0.748     Adj Count R2:                  0.272
AIC:                           1.119     AIC*n:                       403.942
BIC:                       -1683.054     BIC':                        -28.821

-------------
Full main model for HP2probsoc for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 1  model Wave =  1 for HP2hmcare
-------------

-------------
Full Nottingham Part 2 HP2probsoc subscale models
-------------

Logistic regression                               Number of obs   =        340
                                                  LR chi2(9)      =      66.20
                                                  Prob > chi2     =     0.0000
Log likelihood = -92.051568                       Pseudo R2       =     0.2645

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .065801    .0176318      3.73    0.000      .0312434     .1003586
     radhlw1 |     .004144    .0061988      0.67    0.504     -.0080054     .0162935
         bf1 |    .0313968    .0422548      0.74    0.457      -.051421     .1142146
        bf20 |   -.0193584    .0374978     -0.52    0.606     -.0928527     .0541359
       deaw1 |   -.5581614    .4525925     -1.23    0.217     -1.445226     .3289037
      shhlw1 |    .0137667    .0070908      1.94    0.052      -.000131     .0276644
     shjobw1 |    .0236604    .0075625      3.13    0.002      .0088381     .0384826
    shrelaw1 |   -.0149185     .006252     -2.39    0.017     -.0271722    -.0026648
     suprtw1 |    .0010509    .0069016      0.15    0.879      -.012476     .0145778
       _cons |   -7.048599     1.70409     -4.14    0.000     -10.38855    -3.708644
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        13             0  |         13
     -     |        28           299  |        327
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   31.71%
Specificity                     Pr( -|~D)  100.00%
Positive predictive value       Pr( D| +)  100.00%
Negative predictive value       Pr(~D| -)   91.44%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.00%
False - rate for true D         Pr( -| D)   68.29%
False + rate for classified +   Pr(~D| +)    0.00%
False - rate for classified -   Pr( D| -)    8.56%
--------------------------------------------------
Correctly classified                        91.76%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(323) =       450.80
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -92.052
D(330):                      184.103     LR(9):                        66.202
                                         Prob > LR:                     0.000
McFadden's R2:                 0.264     McFadden's Adj R2:             0.185
Maximum Likelihood R2:         0.177     Cragg & Uhler's R2:            0.340
McKelvey and Zavoina's R2:     0.458     Efron's R2:                    0.278
Variance of y*:                6.073     Variance of error:             3.290
Count R2:                      0.918     Adj Count R2:                  0.317
AIC:                           0.600     AIC*n:                       204.103
BIC:                       -1739.449     BIC':                        -13.741

-------------
Full main model for HP2probsoc for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 2  model Wave =  1 for HP2probsoc
-------------

-------------
Full Nottingham Part 2 HP2probsoc subscale models
-------------

Logistic regression                               Number of obs   =        361
                                                  LR chi2(9)      =     102.23
                                                  Prob > chi2     =     0.0000
Log likelihood = -131.99945                       Pseudo R2       =     0.2791

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1172627    .0171673      6.83    0.000      .0836153     .1509101
     radhlw1 |    .0111397    .0049416      2.25    0.024      .0014543     .0208251
         bf1 |    .0362951    .0284738      1.27    0.202     -.0195124     .0921027
        bf20 |   -.0253268    .0231741     -1.09    0.274     -.0707472     .0200936
       deaw1 |   -.0870921    .1767587     -0.49    0.622     -.4335327     .2593485
      shhlw1 |    .0025727    .0062142      0.41    0.679      -.009607     .0147524
     shjobw1 |    .0087888    .0058839      1.49    0.135     -.0027435      .020321
    shrelaw1 |   -.0093887    .0051896     -1.81    0.070     -.0195601     .0007827
     suprtw1 |    .0013382    .0045531      0.29    0.769     -.0075856     .0102621
       _cons |   -8.243948    1.264801     -6.52    0.000     -10.72291    -5.764984
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        33            14  |         47
     -     |        41           273  |        314
-----------+--------------------------+-----------
   Total   |        74           287  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   44.59%
Specificity                     Pr( -|~D)   95.12%
Positive predictive value       Pr( D| +)   70.21%
Negative predictive value       Pr(~D| -)   86.94%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.88%
False - rate for true D         Pr( -| D)   55.41%
False + rate for classified +   Pr(~D| +)   29.79%
False - rate for classified -   Pr( D| -)   13.06%
--------------------------------------------------
Correctly classified                        84.76%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       359
            Pearson chi2(349) =       399.18
                  Prob > chi2 =         0.0329

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -183.113     Log-Lik Full Model:         -131.999
D(351):                      263.999     LR(9):                       102.227
                                         Prob > LR:                     0.000
McFadden's R2:                 0.279     McFadden's Adj R2:             0.225
Maximum Likelihood R2:         0.247     Cragg & Uhler's R2:            0.387
McKelvey and Zavoina's R2:     0.459     Efron's R2:                    0.306
Variance of y*:                6.086     Variance of error:             3.290
Count R2:                      0.848     Adj Count R2:                  0.257
AIC:                           0.787     AIC*n:                       283.999
BIC:                       -1802.997     BIC':                        -49.227

-------------
Full main model for HP2pbfhm for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 1  model Wave =  1 for HP2probsoc
-------------

-------------
Full Nottingham Part 2 HP2pbfhm subscale models
-------------

Logistic regression                               Number of obs   =        340
                                                  LR chi2(9)      =      22.29
                                                  Prob > chi2     =     0.0080
Log likelihood = -70.363535                       Pseudo R2       =     0.1367

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0531285    .0215313      2.47    0.014      .0109279     .0953291
     radhlw1 |    .0202681     .008252      2.46    0.014      .0040946     .0364417
         bf1 |   -.0087893    .0546645     -0.16    0.872     -.1159298     .0983511
        bf20 |     .007857    .0497616      0.16    0.875     -.0896739     .1053879
       deaw1 |   -.0860305    .4565197     -0.19    0.851     -.9807926     .8087316
      shhlw1 |     .005778    .0099994      0.58    0.563     -.0138205     .0253765
     shjobw1 |   -.0120291    .0099428     -1.21    0.226     -.0315167     .0074584
    shrelaw1 |    .0007624    .0073877      0.10    0.918     -.0137173      .015242
     suprtw1 |    -.018106    .0125821     -1.44    0.150     -.0427664     .0065544
       _cons |   -6.445038    2.186355     -2.95    0.003     -10.73022    -2.159861
-------------+----------------------------------------------------------------

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             0  |          0
     -     |        22           318  |        340
-----------+--------------------------+-----------
   Total   |        22           318  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    0.00%
Specificity                     Pr( -|~D)  100.00%
Positive predictive value       Pr( D| +)       .%
Negative predictive value       Pr(~D| -)   93.53%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.00%
False - rate for true D         Pr( -| D)  100.00%
False + rate for classified +   Pr(~D| +)       .%
False - rate for classified -   Pr( D| -)    6.47%
--------------------------------------------------
Correctly classified                        93.53%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(323) =       349.26
                  Prob > chi2 =         0.1510

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -81.506     Log-Lik Full Model:          -70.364
D(330):                      140.727     LR(9):                        22.285
                                         Prob > LR:                     0.008
McFadden's R2:                 0.137     McFadden's Adj R2:             0.014
Maximum Likelihood R2:         0.063     Cragg & Uhler's R2:            0.167
McKelvey and Zavoina's R2:     0.285     Efron's R2:                    0.087
Variance of y*:                4.600     Variance of error:             3.290
Count R2:                      0.935     Adj Count R2:                  0.000
AIC:                           0.473     AIC*n:                       160.727
BIC:                       -1782.825     BIC':                         30.175

-------------
Full main model for HP2pbfhm for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 2  model Wave =  1 for HP2pbfhm
-------------

-------------
Full Nottingham Part 2 HP2pbfhm subscale models
-------------

Logistic regression                               Number of obs   =        361
                                                  LR chi2(9)      =      54.48
                                                  Prob > chi2     =     0.0000
Log likelihood = -112.37659                       Pseudo R2       =     0.1951

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0764706    .0168625      4.53    0.000      .0434207     .1095204
     radhlw1 |    .0197767    .0060446      3.27    0.001      .0079295     .0316239
         bf1 |    .0102198    .0319073      0.32    0.749     -.0523175      .072757
        bf20 |   -.0098859    .0262026     -0.38    0.706     -.0612421     .0414703
       deaw1 |   -.1694401    .2100502     -0.81    0.420     -.5811308     .2422507
      shhlw1 |    .0028786    .0067993      0.42    0.672     -.0104478     .0162051
     shjobw1 |    .0109885    .0066829      1.64    0.100     -.0021097     .0240866
    shrelaw1 |   -.0061099    .0055939     -1.09    0.275     -.0170736     .0048539
     suprtw1 |   -.0018698    .0055191     -0.34    0.735      -.012687     .0089474
       _cons |   -7.471036    1.391934     -5.37    0.000     -10.19918    -4.742896
-------------+----------------------------------------------------------------

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         9             3  |         12
     -     |        38           311  |        349
-----------+--------------------------+-----------
   Total   |        47           314  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   19.15%
Specificity                     Pr( -|~D)   99.04%
Positive predictive value       Pr( D| +)   75.00%
Negative predictive value       Pr(~D| -)   89.11%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.96%
False - rate for true D         Pr( -| D)   80.85%
False + rate for classified +   Pr(~D| +)   25.00%
False - rate for classified -   Pr( D| -)   10.89%
--------------------------------------------------
Correctly classified                        88.64%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       359
            Pearson chi2(349) =       423.47
                  Prob > chi2 =         0.0039

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:     -139.619     Log-Lik Full Model:         -112.377
D(351):                      224.753     LR(9):                        54.484
                                         Prob > LR:                     0.000
McFadden's R2:                 0.195     McFadden's Adj R2:             0.123
Maximum Likelihood R2:         0.140     Cragg & Uhler's R2:            0.260
McKelvey and Zavoina's R2:     0.363     Efron's R2:                    0.208
Variance of y*:                5.164     Variance of error:             3.290
Count R2:                      0.886     Adj Count R2:                  0.128
AIC:                           0.678     AIC*n:                       244.753
BIC:                       -1842.243     BIC':                         -1.484

-------------
Full main model for HP2sxlife for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 1  model Wave =  1 for HP2pbfhm
-------------

-------------
Full Nottingham Part 2 HP2sxlife subscale models
-------------

Logistic regression                               Number of obs   =        340
                                                  LR chi2(9)      =      85.53
                                                  Prob > chi2     =     0.0000
Log likelihood = -128.75122                       Pseudo R2       =     0.2493

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0794939     .014719      5.40    0.000      .0506451     .1083426
     radhlw1 |     .009177    .0050435      1.82    0.069      -.000708      .019062
         bf1 |    .0255037    .0309771      0.82    0.410     -.0352102     .0862176
        bf20 |   -.0168051    .0267683     -0.63    0.530     -.0692699     .0356598
       deaw1 |    .3968761    .2712323      1.46    0.143     -.1347295     .9284817
      shhlw1 |    .0053833    .0061644      0.87    0.383     -.0066986     .0174652
     shjobw1 |    .0120161    .0057139      2.10    0.035      .0008171     .0232151
    shrelaw1 |   -.0034493    .0049958     -0.69    0.490     -.0132409     .0063423
     suprtw1 |    -.001828    .0055711     -0.33    0.743     -.0127471     .0090912
       _cons |   -6.639149    1.272534     -5.22    0.000     -9.133269    -4.145029
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        26            16  |         42
     -     |        43           255  |        298
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   37.68%
Specificity                     Pr( -|~D)   94.10%
Positive predictive value       Pr( D| +)   61.90%
Negative predictive value       Pr(~D| -)   85.57%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.90%
False - rate for true D         Pr( -| D)   62.32%
False + rate for classified +   Pr(~D| +)   38.10%
False - rate for classified -   Pr( D| -)   14.43%
--------------------------------------------------
Correctly classified                        82.65%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(323) =       317.29
                  Prob > chi2 =         0.5792

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -128.751
D(330):                      257.502     LR(9):                        85.525
                                         Prob > LR:                     0.000
McFadden's R2:                 0.249     McFadden's Adj R2:             0.191
Maximum Likelihood R2:         0.222     Cragg & Uhler's R2:            0.350
McKelvey and Zavoina's R2:     0.413     Efron's R2:                    0.252
Variance of y*:                5.605     Variance of error:             3.290
Count R2:                      0.826     Adj Count R2:                  0.145
AIC:                           0.816     AIC*n:                       277.502
BIC:                       -1666.050     BIC':                        -33.065

-------------
Full main model for HP2sxlife for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 2  model Wave =  1 for HP2sxlife
-------------

-------------
Full Nottingham Part 2 HP2sxlife subscale models
-------------

Logistic regression                               Number of obs   =        361
                                                  LR chi2(9)      =      98.58
                                                  Prob > chi2     =     0.0000
Log likelihood = -157.72791                       Pseudo R2       =     0.2381

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0955211    .0143598      6.65    0.000      .0673765     .1236658
     radhlw1 |    .0076884    .0043462      1.77    0.077       -.00083     .0162068
         bf1 |    .0126394    .0277031      0.46    0.648     -.0416577     .0669365
        bf20 |   -.0012302    .0235195     -0.05    0.958     -.0473276     .0448672
       deaw1 |    .0002926    .1487155      0.00    0.998     -.2911845     .2917697
      shhlw1 |   -.0067303    .0056634     -1.19    0.235     -.0178304     .0043698
     shjobw1 |    .0163073    .0053284      3.06    0.002      .0058638     .0267508
    shrelaw1 |   -.0028221    .0044927     -0.63    0.530     -.0116277     .0059835
     suprtw1 |     .001642    .0041364      0.40    0.691     -.0064651     .0097491
       _cons |    -7.57151    1.189708     -6.36    0.000     -9.903294    -5.239726
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        41            20  |         61
     -     |        53           247  |        300
-----------+--------------------------+-----------
   Total   |        94           267  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   43.62%
Specificity                     Pr( -|~D)   92.51%
Positive predictive value       Pr( D| +)   67.21%
Negative predictive value       Pr(~D| -)   82.33%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.49%
False - rate for true D         Pr( -| D)   56.38%
False + rate for classified +   Pr(~D| +)   32.79%
False - rate for classified -   Pr( D| -)   17.67%
--------------------------------------------------
Correctly classified                        79.78%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       359
            Pearson chi2(349) =       354.34
                  Prob > chi2 =         0.4105

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.020     Log-Lik Full Model:         -157.728
D(351):                      315.456     LR(9):                        98.584
                                         Prob > LR:                     0.000
McFadden's R2:                 0.238     McFadden's Adj R2:             0.190
Maximum Likelihood R2:         0.239     Cragg & Uhler's R2:            0.350
McKelvey and Zavoina's R2:     0.392     Efron's R2:                    0.265
Variance of y*:                5.408     Variance of error:             3.290
Count R2:                      0.798     Adj Count R2:                  0.223
AIC:                           0.929     AIC*n:                       335.456
BIC:                       -1751.540     BIC':                        -45.584

-------------
Full main model for HP2inthob for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 1  model Wave =  1 for HP2sxlife
-------------

-------------
Full Nottingham Part 2 HP2inthob subscale models
-------------

Logistic regression                               Number of obs   =        340
                                                  LR chi2(9)      =      62.70
                                                  Prob > chi2     =     0.0000
Log likelihood = -87.714325                       Pseudo R2       =     0.2633

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0469277    .0177122      2.65    0.008      .0122124     .0816431
     radhlw1 |    .0188772    .0066787      2.83    0.005      .0057871     .0319672
         bf1 |   -1.367019    102.0878     -0.01    0.989     -201.4554     198.7214
        bf20 |    1.370719    102.0878      0.01    0.989     -198.7177     201.4591
       deaw1 |   -1.420629    .7247073     -1.96    0.050     -2.841029     -.000229
      shhlw1 |    .0101692     .007213      1.41    0.159     -.0039681     .0243065
     shjobw1 |    .0095172    .0070594      1.35    0.178     -.0043189     .0233533
    shrelaw1 |   -.0074121      .00618     -1.20    0.230     -.0195247     .0047004
     suprtw1 |    .0120175    .0067365      1.78    0.074     -.0011857     .0252207
       _cons |    -61.4171    4083.511     -0.02    0.988     -8064.952     7942.118
-------------+----------------------------------------------------------------


Note: 23 failures and 0 successes completely determined.


Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         8             1  |          9
     -     |        30           301  |        331
-----------+--------------------------+-----------
   Total   |        38           302  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.05%
Specificity                     Pr( -|~D)   99.67%
Positive predictive value       Pr( D| +)   88.89%
Negative predictive value       Pr(~D| -)   90.94%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.33%
False - rate for true D         Pr( -| D)   78.95%
False + rate for classified +   Pr(~D| +)   11.11%
False - rate for classified -   Pr( D| -)    9.06%
--------------------------------------------------
Correctly classified                        90.88%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(323) =       332.44
                  Prob > chi2 =         0.3467

Measures of Fit for logit of HP2inthob

Log-Lik Intercept Only:     -119.064     Log-Lik Full Model:          -87.714
D(330):                      175.429     LR(9):                        62.700
                                         Prob > LR:                     0.000
McFadden's R2:                 0.263     McFadden's Adj R2:             0.179
Maximum Likelihood R2:         0.168     Cragg & Uhler's R2:            0.334
McKelvey and Zavoina's R2:     0.965     Efron's R2:                    0.239
Variance of y*:               94.491     Variance of error:             3.290
Count R2:                      0.909     Adj Count R2:                  0.184
AIC:                           0.575     AIC*n:                       195.429
BIC:                       -1748.123     BIC':                        -10.239

-------------
Full main model for HP2inthob for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 2  model Wave =  1 for HP2inthob
-------------

-------------
Full Nottingham Part 2 HP2inthob subscale models
-------------

Logistic regression                               Number of obs   =        361
                                                  LR chi2(9)      =      79.74
                                                  Prob > chi2     =     0.0000
Log likelihood = -131.84212                       Pseudo R2       =     0.2322

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0887071    .0158463      5.60    0.000      .0576489     .1197652
     radhlw1 |    .0197231    .0053656      3.68    0.000      .0092067     .0302394
         bf1 |    -.033217    .0371955     -0.89    0.372     -.1061189     .0396848
        bf20 |    .0312708    .0332387      0.94    0.347     -.0338758     .0964173
       deaw1 |     -.01341    .1602451     -0.08    0.933     -.3274847     .3006646
      shhlw1 |    .0056196     .006261      0.90    0.369     -.0066516     .0178909
     shjobw1 |    .0023075    .0060411      0.38    0.702     -.0095328     .0141479
    shrelaw1 |   -.0033791    .0049976     -0.68    0.499     -.0131743     .0064161
     suprtw1 |    .0018167    .0046916      0.39    0.699     -.0073787      .011012
       _cons |   -9.026372    1.602951     -5.63    0.000      -12.1681    -5.884647
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        26             6  |         32
     -     |        40           289  |        329
-----------+--------------------------+-----------
   Total   |        66           295  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   39.39%
Specificity                     Pr( -|~D)   97.97%
Positive predictive value       Pr( D| +)   81.25%
Negative predictive value       Pr(~D| -)   87.84%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.03%
False - rate for true D         Pr( -| D)   60.61%
False + rate for classified +   Pr(~D| +)   18.75%
False - rate for classified -   Pr( D| -)   12.16%
--------------------------------------------------
Correctly classified                        87.26%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       359
            Pearson chi2(349) =       429.70
                  Prob > chi2 =         0.0020

Measures of Fit for logit of HP2inthob

Log-Lik Intercept Only:     -171.710     Log-Lik Full Model:         -131.842
D(351):                      263.684     LR(9):                        79.736
                                         Prob > LR:                     0.000
McFadden's R2:                 0.232     McFadden's Adj R2:             0.174
Maximum Likelihood R2:         0.198     Cragg & Uhler's R2:            0.323
McKelvey and Zavoina's R2:     0.408     Efron's R2:                    0.269
Variance of y*:                5.559     Variance of error:             3.290
Count R2:                      0.873     Adj Count R2:                  0.303
AIC:                           0.786     AIC*n:                       283.684
BIC:                       -1803.312     BIC':                        -26.736

-------------
Full main model for HP2vacatn for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 1  model Wave =  1 for HP2inthob
-------------

-------------
Full Nottingham Part 2 HP2vacatn subscale models
-------------

Logistic regression                               Number of obs   =        340
                                                  LR chi2(9)      =      63.50
                                                  Prob > chi2     =     0.0000
Log likelihood = -93.400079                       Pseudo R2       =     0.2537

-------------+----------------------------------------------------------------
    HP2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0680461    .0174883      3.89    0.000      .0337697     .1023225
     radhlw1 |    .0124707    .0061517      2.03    0.043      .0004136     .0245278
         bf1 |   -.0963654    .0889765     -1.08    0.279     -.2707562     .0780254
        bf20 |    .0856524    .0861894      0.99    0.320     -.0832757     .2545804
       deaw1 |   -1.062962    .5930123     -1.79    0.073     -2.225245     .0993207
      shhlw1 |    .0106702    .0069711      1.53    0.126     -.0029929     .0243333
     shjobw1 |    .0181404    .0071032      2.55    0.011      .0042184     .0320624
    shrelaw1 |   -.0112469    .0061227     -1.84    0.066     -.0232473     .0007534
     suprtw1 |    .0083536    .0065604      1.27    0.203     -.0045047     .0212118
       _cons |   -10.52227    3.506457     -3.00    0.003      -17.3948    -3.649741
-------------+----------------------------------------------------------------

Logistic model for HP2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         8             4  |         12
     -     |        33           295  |        328
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   19.51%
Specificity                     Pr( -|~D)   98.66%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   89.94%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.34%
False - rate for true D         Pr( -| D)   80.49%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)   10.06%
--------------------------------------------------
Correctly classified                        89.12%
--------------------------------------------------


Logistic model for HP2vacatn, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(323) =       324.00
                  Prob > chi2 =         0.4740

Measures of Fit for logit of HP2vacatn

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -93.400
D(330):                      186.800     LR(9):                        63.505
                                         Prob > LR:                     0.000
McFadden's R2:                 0.254     McFadden's Adj R2:             0.174
Maximum Likelihood R2:         0.170     Cragg & Uhler's R2:            0.327
McKelvey and Zavoina's R2:     0.472     Efron's R2:                    0.242
Variance of y*:                6.227     Variance of error:             3.290
Count R2:                      0.891     Adj Count R2:                  0.098
AIC:                           0.608     AIC*n:                       206.800
BIC:                       -1736.752     BIC':                        -11.044

-------------
Full main model for HP2vacatn for wave= 1
-------------

-------------
chunk 2 H1 test:Gender= 2  model Wave =  1 for HP2vacatn
-------------

-------------
Full Nottingham Part 2 HP2vacatn subscale models
-------------

Logistic regression                               Number of obs   =        361
                                                  LR chi2(9)      =      82.63
                                                  Prob > chi2     =     0.0000
Log likelihood = -125.82087                       Pseudo R2       =     0.2472

-------------+----------------------------------------------------------------
    HP2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0884841    .0163538      5.41    0.000      .0564313     .1205368
     radhlw1 |    .0261977    .0057913      4.52    0.000       .014847     .0375484
         bf1 |   -.0344464    .0312123     -1.10    0.270     -.0956214     .0267286
        bf20 |    .0183328    .0265608      0.69    0.490     -.0337255      .070391
       deaw1 |   -.0152546    .1698279     -0.09    0.928     -.3481113      .317602
      shhlw1 |   -.0000247    .0063261     -0.00    0.997     -.0124237     .0123742
     shjobw1 |    .0075507    .0061271      1.23    0.218     -.0044583     .0195596
    shrelaw1 |   -.0045753    .0052069     -0.88    0.380     -.0147807     .0056301
     suprtw1 |    .0082219    .0046149      1.78    0.075     -.0008231      .017267
       _cons |   -8.575778    1.434965     -5.98    0.000     -11.38826    -5.763298
-------------+----------------------------------------------------------------

Logistic model for HP2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        23             6  |         29
     -     |        40           292  |        332
-----------+--------------------------+-----------
   Total   |        63           298  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   36.51%
Specificity                     Pr( -|~D)   97.99%
Positive predictive value       Pr( D| +)   79.31%
Negative predictive value       Pr(~D| -)   87.95%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.01%
False - rate for true D         Pr( -| D)   63.49%
False + rate for classified +   Pr(~D| +)   20.69%
False - rate for classified -   Pr( D| -)   12.05%
--------------------------------------------------
Correctly classified                        87.26%
--------------------------------------------------


Logistic model for HP2vacatn, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       359
            Pearson chi2(349) =       465.78
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2vacatn

Log-Lik Intercept Only:     -167.134     Log-Lik Full Model:         -125.821
D(351):                      251.642     LR(9):                        82.625
                                         Prob > LR:                     0.000
McFadden's R2:                 0.247     McFadden's Adj R2:             0.187
Maximum Likelihood R2:         0.205     Cragg & Uhler's R2:            0.339
McKelvey and Zavoina's R2:     0.441     Efron's R2:                    0.288
Variance of y*:                5.883     Variance of error:             3.290
Count R2:                      0.873     Adj Count R2:                  0.270
AIC:                           0.752     AIC*n:                       271.642
BIC:                       -1815.354     BIC':                        -29.626

.
. set more off

. *-----Chunk 2 dosew1 moderator paid employment impact---------------------------
. title "1.  H1 pt2 wv 2 male cum rad dose wrt HP2work impact "


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       1.  H1 pt2 wv 2 male cum rad dose wrt HP2work impact          *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:11:04  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=1/1 {
  2.         set more off
  3. title4 "trimmed HP2work main effects models wave 1 for H1 part 2 with dose ns"
  4. title4 "Wave `j' dose HP2work relationship but avgcumdosew`j': Dose not signif"
  5. di _skip(2)
  6. di as input "Gender =1 HP2work model"
  7.         logit HP2work age bf4 bf40  illw`j' movew`j' shrelaw`j' ///
>            avgcumdosew`j' radhlw`j' if gender==1
  8.                         estat class
  9.                         estat gof
 10.                         fitstat
 11. }
-------------
trimmed HP2work main effects models wave 1 for H1 part 2 with dose ns
-------------
-------------
Wave 1 dose HP2work relationship but avgcumdosew1: Dose not signif
-------------

Gender =1 HP2work model

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -145.38341
Iteration 2:   log likelihood = -143.32275
Iteration 3:   log likelihood = -143.31043
Iteration 4:   log likelihood = -143.31043

Logistic regression                               Number of obs   =        340
                                                  LR chi2(8)      =      59.12
                                                  Prob > chi2     =     0.0000
Log likelihood = -143.31043                       Pseudo R2       =     0.1710

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0048446    .0141529      0.34    0.732     -.0228945     .0325838
         bf4 |   -.1400119    .0321951     -4.35    0.000     -.2031132    -.0769107
        bf40 |    .3309236    .0941317      3.52    0.000      .1464287     .5154184
       illw1 |   -.2284418    .3531212     -0.65    0.518     -.9205467     .4636631
      movew1 |    .4467728    .4500499      0.99    0.321     -.4353089     1.328854
    shrelaw1 |    .0013722    .0039941      0.34    0.731     -.0064562     .0092005
avgcumdosew1 |     .014672    .0771675      0.19    0.849     -.1365736     .1659175
     radhlw1 |   -.0007224    .0043698     -0.17    0.869      -.009287     .0078422
       _cons |   -.8602236    .9469206     -0.91    0.364     -2.716154     .9957067
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        17            15  |         32
     -     |        53           255  |        308
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   24.29%
Specificity                     Pr( -|~D)   94.44%
Positive predictive value       Pr( D| +)   53.12%
Negative predictive value       Pr(~D| -)   82.79%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.56%
False - rate for true D         Pr( -| D)   75.71%
False + rate for classified +   Pr(~D| +)   46.88%
False - rate for classified -   Pr( D| -)   17.21%
--------------------------------------------------
Correctly classified                        80.00%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       335
            Pearson chi2(326) =       303.46
                  Prob > chi2 =         0.8099

Measures of Fit for logit of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -143.310
D(331):                      286.621     LR(8):                        59.125
                                         Prob > LR:                     0.000
McFadden's R2:                 0.171     McFadden's Adj R2:             0.119
Maximum Likelihood R2:         0.160     Cragg & Uhler's R2:            0.250
McKelvey and Zavoina's R2:     0.254     Efron's R2:                    0.166
Variance of y*:                4.413     Variance of error:             3.290
Count R2:                      0.800     Adj Count R2:                  0.029
AIC:                           0.896     AIC*n:                       304.621
BIC:                       -1642.760     BIC':                        -12.493

.
. title4 "Constructing male moderators of HP2work in wave 1"
-------------
Constructing male moderators of HP2work in wave 1
-------------

. * construction of potential moderators
.
. set more off

. foreach var in bf4 bf40 {
  2. cap gen `var'Xd1 = `var'*avgcumdosew1
  3. label var `var'Xd1  "interaction of avgcumdosew1 and `var'"
  4. }

.
.
.
.
. des bf4 bf40

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


. forvalues j=1/1 {
  2. title4 "trimmed HP2work main effects models wave `j' " "male model for H1 part 2 with dose ns"
  3. title2 "Wave `j dose HP2work relationship but avgcumdosew`j': Dose not signif"
  4. }
-------------
trimmed HP2work main effects models wave 1
-------------
-------------
title2: Wave `j dose HP2work relationship but avgcumdosew1: Dose not signif
                                       Date and time:  18 Jun 2012    18:11:05
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
                                       Stata data file:  chwide16june2012.dta  has  2369  variables and  703  observations

Wave `j dose HP2work relationship but avgcumdosew1: Dose not signif
-------------

.
.
. set more off

.
. forvalues j=1/1 {
  2.                 sw, pr(.1):logistic HP2work age bf4 bf40 movew`j' shrelaw`j'  ///
>                 avgcumdosew`j' illw1 radhlw`j' bf4Xd1 bf40Xd1 if gender==1, coef
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }


  begin with full model


p = 0.8072 >= 0.1000  removing avgcumdosew1


p = 0.7761 >= 0.1000  removing shrelaw1


p = 0.7348 >= 0.1000  removing age


p = 0.7348 >= 0.1000  removing radhlw1


p = 0.3215 >= 0.1000  removing movew1


p = 0.2131 >= 0.1000  removing illw1


p = 0.2607 >= 0.1000  removing bf40Xd1


p = 0.9419 >= 0.1000  removing bf4Xd1


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      57.60
                                                  Prob > chi2     =     0.0000
Log likelihood = -144.07356                       Pseudo R2       =     0.1666

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .3278445    .0853217      3.84    0.000       .160617      .495072
         bf4 |   -.1439508    .0277538     -5.19    0.000     -.1983472    -.0895544
       _cons |   -.5378471    .4253878     -1.26    0.206     -1.371592     .2958977
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        18            14  |         32
     -     |        52           256  |        308
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   25.71%
Specificity                     Pr( -|~D)   94.81%
Positive predictive value       Pr( D| +)   56.25%
Negative predictive value       Pr(~D| -)   83.12%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.19%
False - rate for true D         Pr( -| D)   74.29%
False + rate for classified +   Pr(~D| +)   43.75%
False - rate for classified -   Pr( D| -)   16.88%
--------------------------------------------------
Correctly classified                        80.59%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =        91
             Pearson chi2(88) =       104.61
                  Prob > chi2 =         0.1092

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -144.074
D(337):                      288.147     LR(2):                        57.599
                                         Prob > LR:                     0.000
McFadden's R2:                 0.167     McFadden's Adj R2:             0.149
Maximum Likelihood R2:         0.156     Cragg & Uhler's R2:            0.244
McKelvey and Zavoina's R2:     0.248     Efron's R2:                    0.162
Variance of y*:                4.375     Variance of error:             3.290
Count R2:                      0.806     Adj Count R2:                  0.057
AIC:                           0.865     AIC*n:                       294.147
BIC:                       -1676.208     BIC':                        -45.941

.
. logit hp2work bf4 bf40 avgcumdosew1 radhlw1 havmilsq if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -146.04951
Iteration 2:   log likelihood = -144.07501
Iteration 3:   log likelihood = -144.06434
Iteration 4:   log likelihood = -144.06434

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      57.62
                                                  Prob > chi2     =     0.0000
Log likelihood = -144.06434                       Pseudo R2       =     0.1666

-------------+----------------------------------------------------------------
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1443876    .0307305     -4.70    0.000     -.2046181     -.084157
        bf40 |    .3278933    .0856676      3.83    0.000      .1599879     .4957988
avgcumdosew1 |    .0103223    .0782446      0.13    0.895     -.1430344     .1636789
     radhlw1 |     -.00017    .0043575     -0.04    0.969     -.0087106     .0083705
    havmilsq |   -5.54e-08    1.66e-06     -0.03    0.973     -3.32e-06     3.21e-06
       _cons |   -.5281323    .5641161     -0.94    0.349      -1.63378      .577515
-------------+----------------------------------------------------------------

. logit hp2work bf4 bf40  if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -146.01734
Iteration 2:   log likelihood = -144.08312
Iteration 3:   log likelihood = -144.07356
Iteration 4:   log likelihood = -144.07356

Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      57.60
                                                  Prob > chi2     =     0.0000
Log likelihood = -144.07356                       Pseudo R2       =     0.1666

-------------+----------------------------------------------------------------
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1439508    .0277538     -5.19    0.000     -.1983472    -.0895544
        bf40 |    .3278445    .0853217      3.84    0.000       .160617      .495072
       _cons |   -.5378471    .4253878     -1.26    0.206     -1.371592     .2958977
-------------+----------------------------------------------------------------

. estat class

Logistic model for hp2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        18            14  |         32
     -     |        52           256  |        308
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as hp2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   25.71%
Specificity                     Pr( -|~D)   94.81%
Positive predictive value       Pr( D| +)   56.25%
Negative predictive value       Pr(~D| -)   83.12%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.19%
False - rate for true D         Pr( -| D)   74.29%
False + rate for classified +   Pr(~D| +)   43.75%
False - rate for classified -   Pr( D| -)   16.88%
--------------------------------------------------
Correctly classified                        80.59%
--------------------------------------------------

. estat gof


Logistic model for hp2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =        91
             Pearson chi2(88) =       104.61
                  Prob > chi2 =         0.1092

. fitstat

Measures of Fit for logit of hp2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -144.074
D(337):                      288.147     LR(2):                        57.599
                                         Prob > LR:                     0.000
McFadden's R2:                 0.167     McFadden's Adj R2:             0.149
Maximum Likelihood R2:         0.156     Cragg & Uhler's R2:            0.244
McKelvey and Zavoina's R2:     0.248     Efron's R2:                    0.162
Variance of y*:                4.375     Variance of error:             3.290
Count R2:                      0.806     Adj Count R2:                  0.057
AIC:                           0.865     AIC*n:                       294.147
BIC:                       -1676.208     BIC':                        -45.941

.
. * capturing significant vars from last analysis
. local cn1: colnames(e(b))

. di "`cn1'"
bf4 bf40 _cons

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

. di `leng1'
14

. local leng1b `leng1'-6

. di `leng1b'
8

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

. di "`nuvlist'"
bf4 bf40

. local rhsvars = "`nuvlist'"

. local nuvlist= "`nuvlist'"

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

. di "`nuvlist'"
bf4 bf40

. sw, pr(.1):logit hp2hmcare `nuvlist' if gender==1


  begin with full model


p < 0.1000  for all terms in model


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      81.32
                                                  Prob > chi2     =     0.0000
Log likelihood = -132.21538                       Pseudo R2       =     0.2352

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.2248287    .0309809     -7.26    0.000     -.2855501    -.1641072
        bf40 |    .1658314    .0893229      1.86    0.063     -.0092382      .340901
       _cons |    .7314062    .4552436      1.61    0.108     -.1608548     1.623667
-------------+----------------------------------------------------------------

. di "`rhsvars'"
bf4 bf40

. matrix define c=e(b)

. local cn2: colnames(c)

. di "`cn2'"
bf4 bf40 _cons

. local leng2 = length("`cn2'")

. local leng2b = `leng2'-6

. local rhsvars = substr("`cn2'",1,`leng2b')

. logit hp2work `rhsvars' if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -146.01734
Iteration 2:   log likelihood = -144.08312
Iteration 3:   log likelihood = -144.07356
Iteration 4:   log likelihood = -144.07356

Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      57.60
                                                  Prob > chi2     =     0.0000
Log likelihood = -144.07356                       Pseudo R2       =     0.1666

-------------+----------------------------------------------------------------
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1439508    .0277538     -5.19    0.000     -.1983472    -.0895544
        bf40 |    .3278445    .0853217      3.84    0.000       .160617      .495072
       _cons |   -.5378471    .4253878     -1.26    0.206     -1.371592     .2958977
-------------+----------------------------------------------------------------

.
.
.
. di "`rhsvars'"
bf4 bf40

. local varlist2 =substr("`rhsvars'",1,9)

. di "`varlist2'"
bf4 bf40

.
.  * constructing potential moderators
. foreach var in bf4 bf40 {
  2. cap gen `var'Xd1 = `var'* avgcumdosew1
  3. }

.
. *x  no signif male moderators for paid employment
. set more off

. sw, pr(.1): logistic hp2work `rhsvars' bf4Xd1 bf40Xd1 if gender==1, coef


  begin with full model


p = 0.2607 >= 0.1000  removing bf40Xd1


p = 0.9419 >= 0.1000  removing bf4Xd1


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      57.60
                                                  Prob > chi2     =     0.0000
Log likelihood = -144.07356                       Pseudo R2       =     0.1666

-------------+----------------------------------------------------------------
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1439508    .0277538     -5.19    0.000     -.1983472    -.0895544
        bf40 |    .3278445    .0853217      3.84    0.000       .160617      .495072
       _cons |   -.5378471    .4253878     -1.26    0.206     -1.371592     .2958977
-------------+----------------------------------------------------------------

. fitstat

Measures of Fit for logistic of hp2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -144.074
D(337):                      288.147     LR(2):                        57.599
                                         Prob > LR:                     0.000
McFadden's R2:                 0.167     McFadden's Adj R2:             0.149
Maximum Likelihood R2:         0.156     Cragg & Uhler's R2:            0.244
McKelvey and Zavoina's R2:     0.248     Efron's R2:                    0.162
Variance of y*:                4.375     Variance of error:             3.290
Count R2:                      0.806     Adj Count R2:                  0.057
AIC:                           0.865     AIC*n:                       294.147
BIC:                       -1676.208     BIC':                        -45.941

.
. scalar wkModMw1 = "none"

. di _skip(2)


. title4 "testing the female moderator model Hp2work H1 Pt 2 wave 1"
-------------
testing the female moderator model Hp2work H1 Pt 2 wave 1
-------------

. *  Testing female moderator model xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.
. title4 "testing general female moderator model for hp2work"
-------------
testing general female moderator model for hp2work
-------------

. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40

. di _skip(4)


.
.
. forvalues j=1/1 {
  2. set more off
  3. di _skip(4)
  4. di as input "For females hp2work on wave 1 with dose ns"
  5. des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' `w1bf'
  6. sw, pr(.1): logistic HP2work  age  havmilsq ///
>    avgcumdosew1  illw`j' shjobw`j' suprtw`j' radhlw`j' if gender==2, coef
  7. estat gof
  8. estat class
  9. fitstat
 10. }

For females hp2work on wave 1 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w1            double   %15.0g        LABJ           profess executive administration in 1986


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


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


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


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


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


occ7w1            double   %15.0g        LABJ           homemaking or caregiving  in 1986


occ8w1            double   %15.0g        LABJ           student  in 1986


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


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf10              float    %9.0g                        bf10= max(0, sufamw1 - 20)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf20              float    %9.0g                        bf20 = max(0, kzchorn - 2.53946E-006)


bf22              float    %9.0g                        bf22 = max(0, icdxcnt - 1.01635E-007) * bf7m


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


  begin with full model


p = 0.9219 >= 0.1000  removing suprtw1


p = 0.8867 >= 0.1000  removing shjobw1


p = 0.6189 >= 0.1000  removing havmilsq


p = 0.1241 >= 0.1000  removing avgcumdosew1


Logistic regression                               Number of obs   =        361
                                                  LR chi2(3)      =      46.25
                                                  Prob > chi2     =     0.0000
Log likelihood = -182.84519                       Pseudo R2       =     0.1123

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0626548    .0119743      5.23    0.000      .0391855      .086124
     radhlw1 |    .0071024    .0037129      1.91    0.056     -.0001748     .0143795
       illw1 |    .4077261    .2382216      1.71    0.087     -.0591797     .8746319
       _cons |   -4.859841    .6646145     -7.31    0.000     -6.162461     -3.55722
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       361
 number of covariate patterns =       253
            Pearson chi2(249) =       271.11
                  Prob > chi2 =         0.1605

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        24             6  |         30
     -     |        69           262  |        331
-----------+--------------------------+-----------
   Total   |        93           268  |        361

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   25.81%
Specificity                     Pr( -|~D)   97.76%
Positive predictive value       Pr( D| +)   80.00%
Negative predictive value       Pr(~D| -)   79.15%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.24%
False - rate for true D         Pr( -| D)   74.19%
False + rate for classified +   Pr(~D| +)   20.00%
False - rate for classified -   Pr( D| -)   20.85%
--------------------------------------------------
Correctly classified                        79.22%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -205.969     Log-Lik Full Model:         -182.845
D(357):                      365.690     LR(3):                        46.247
                                         Prob > LR:                     0.000
McFadden's R2:                 0.112     McFadden's Adj R2:             0.093
Maximum Likelihood R2:         0.120     Cragg & Uhler's R2:            0.177
McKelvey and Zavoina's R2:     0.192     Efron's R2:                    0.141
Variance of y*:                4.072     Variance of error:             3.290
Count R2:                      0.792     Adj Count R2:                  0.194
AIC:                           1.035     AIC*n:                       373.690
BIC:                       -1736.639     BIC':                        -28.580

.
. cap gen ageXd1 = age*avgcumdosew1

.
. * capturing significant vars
. local cn3: colnames(e(b))

. di "`cn3'"
age radhlw1 illw1 _cons

. local leng3 = length( "`cn3'")

. di `leng3'
23

. local leng3b `leng3'-6

. di `leng3b'
17

. local nuvlist3 = substr("`cn3'",1,`leng3b')

. di "`nuvlist3'"
age radhlw1 illw1

. local rhsvars3 = "`nuvlist3'"

. local rhsvars4= substr("`cn3'",1,`leng3b')

. di "`rhsvars4'"
age radhlw1 illw1

.
. * moderators for hp2work female and male are saved as scalars:
. scalar wkModFw1="none"

. scalar wkModMw1="none"

. cap gen ageXd1 = age*avgcumdosew1

.
. *x no significant female moderator for paid employment
. forvalues j=1/1 {
  2. di as input "For females hp2probsoc on wave 1 with dose ns"
  3. des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j'
  4. set more off
  5. sw, pr(.1): logistic HP2work  bf4 bf14  age  havmil ///
>    avgcumdosew1  ageXd1 illw`j' accdw`j'  suprtw`j' if gender==2, coef
  6. estat gof
  7. estat class
  8. fitstat
  9. }
For females hp2probsoc on wave 1 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w1            double   %15.0g        LABJ           profess executive administration in 1986


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


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


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


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


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


occ7w1            double   %15.0g        LABJ           homemaking or caregiving  in 1986


occ8w1            double   %15.0g        LABJ           student  in 1986


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


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


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


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


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


  begin with full model


p = 0.9043 >= 0.1000  removing suprtw1


p = 0.5398 >= 0.1000  removing accdw1


p = 0.4992 >= 0.1000  removing havmil


p = 0.3576 >= 0.1000  removing illw1


p = 0.2119 >= 0.1000  removing ageXd1


p = 0.1822 >= 0.1000  removing avgcumdosew1


p = 0.2326 >= 0.1000  removing bf14


Logistic regression                               Number of obs   =        362
                                                  LR chi2(2)      =      59.51
                                                  Prob > chi2     =     0.0000
Log likelihood = -176.51284                       Pseudo R2       =     0.1442

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1117282    .0265443     -4.21    0.000      -.163754    -.0597024
         age |    .0511864      .01239      4.13    0.000      .0269024     .0754704
       _cons |   -2.684594    .7848001     -3.42    0.001     -4.222774    -1.146414
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       274
            Pearson chi2(271) =       303.76
                  Prob > chi2 =         0.0834

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        31            18  |         49
     -     |        62           251  |        313
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   33.33%
Specificity                     Pr( -|~D)   93.31%
Positive predictive value       Pr( D| +)   63.27%
Negative predictive value       Pr(~D| -)   80.19%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.69%
False - rate for true D         Pr( -| D)   66.67%
False + rate for classified +   Pr(~D| +)   36.73%
False - rate for classified -   Pr( D| -)   19.81%
--------------------------------------------------
Correctly classified                        77.90%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -176.513
D(359):                      353.026     LR(2):                        59.506
                                         Prob > LR:                     0.000
McFadden's R2:                 0.144     McFadden's Adj R2:             0.130
Maximum Likelihood R2:         0.152     Cragg & Uhler's R2:            0.223
McKelvey and Zavoina's R2:     0.234     Efron's R2:                    0.175
Variance of y*:                4.295     Variance of error:             3.290
Count R2:                      0.779     Adj Count R2:                  0.140
AIC:                           0.992     AIC*n:                       359.026
BIC:                       -1762.075     BIC':                        -47.723

.
. scalar SigDoseFw1 = "no"

. scalar MainEffwkFw1 = "bf4 age"

. ******   Moderator analysis for Dose=>paid employment wave one
. title4 "testing potential moderators for women and hp2work in wave 1"
-------------
testing potential moderators for women and hp2work in wave 1
-------------

. set more off

. forvalues j=1/1 {
  2.                 sw, pr(.1):logistic HP2work age occ1w1-occ8w1 bf8 illw`j' shjobw`j' havmilsq ///
>                 avgcumdosew`j' ageXd1 if gender==2, coef
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }


  begin with full model


p = 0.9407 >= 0.1000  removing occ4w1


p = 0.7880 >= 0.1000  removing shjobw1


p = 0.7709 >= 0.1000  removing bf8


p = 0.7819 >= 0.1000  removing occ7w1


p = 0.7309 >= 0.1000  removing occ3w1


p = 0.6557 >= 0.1000  removing havmilsq


p = 0.3777 >= 0.1000  removing occ6w1


p = 0.4099 >= 0.1000  removing occ2w1


p = 0.2835 >= 0.1000  removing occ1w1


p = 0.1994 >= 0.1000  removing occ5w1


p = 0.1230 >= 0.1000  removing ageXd1


p = 0.1760 >= 0.1000  removing illw1


p = 0.1245 >= 0.1000  removing occ8w1


p = 0.1089 >= 0.1000  removing avgcumdosew1


Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =      41.64
                                                  Prob > chi2     =     0.0000
Log likelihood = -185.74123                       Pseudo R2       =     0.1008

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0695394     .011616      5.99    0.000      .0467724     .0923064
       _cons |   -4.709665    .6434135     -7.32    0.000     -5.970733    -3.448598
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        20            14  |         34
     -     |        73           256  |        329
-----------+--------------------------+-----------
   Total   |        93           270  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.51%
Specificity                     Pr( -|~D)   94.81%
Positive predictive value       Pr( D| +)   58.82%
Negative predictive value       Pr(~D| -)   77.81%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.19%
False - rate for true D         Pr( -| D)   78.49%
False + rate for classified +   Pr(~D| +)   41.18%
False - rate for classified -   Pr( D| -)   22.19%
--------------------------------------------------
Correctly classified                        76.03%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =        49
             Pearson chi2(47) =        58.17
                  Prob > chi2 =         0.1274

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -206.563     Log-Lik Full Model:         -185.741
D(361):                      371.482     LR(1):                        41.643
                                         Prob > LR:                     0.000
McFadden's R2:                 0.101     McFadden's Adj R2:             0.091
Maximum Likelihood R2:         0.108     Cragg & Uhler's R2:            0.159
McKelvey and Zavoina's R2:     0.172     Efron's R2:                    0.125
Variance of y*:                3.971     Variance of error:             3.290
Count R2:                      0.760     Adj Count R2:                  0.065
AIC:                           1.034     AIC*n:                       375.482
BIC:                       -1756.397     BIC':                        -35.748

.
. * capturing significant vars
. local cn5: colnames(e(b))

. di "`cn5'"
age _cons

. local leng5 = length( "`cn5'")

. di `leng5'
9

. local leng5b `leng5'-6

. di `leng5b'
3

. local nuvlist5 = substr("`cn5'",1,`leng5b')

. di "`nuvlist5'"
age

. local rhsvars5 = "`nuvlist2'"

. local nuvlist6= "`nuvlist2'"

. local nuvlist6= substr("`cn5'",1,`leng5b')

. di "`nuvlist6'"
age

.
. foreach varx in `nuvlist6' {
  2. cap gen `varx'X`vary' =  `varx'*avgcumdosew1
  3.  }

.
. cap gen illw1Xd1 = illw1*avgcumdosew1

.
. logit hp2hmcare age avgcumdosew1 illw1 ageXd1 illw1Xd1 if gender==2              // correct regress on previous

Iteration 0:   log likelihood = -233.72859
Iteration 1:   log likelihood = -189.61734
Iteration 2:   log likelihood = -188.76377
Iteration 3:   log likelihood = -188.76057
Iteration 4:   log likelihood = -188.76057

Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =      89.94
                                                  Prob > chi2     =     0.0000
Log likelihood = -188.76057                       Pseudo R2       =     0.1924

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0970647    .0160129      6.06    0.000      .0656799     .1284495
avgcumdosew1 |     .884954    2.296761      0.39    0.700     -3.616615     5.386523
       illw1 |    .9418439    .3176563      2.96    0.003       .319249     1.564439
      ageXd1 |   -.0212632    .0412659     -0.52    0.606     -.1021429     .0596166
    illw1Xd1 |   -.2742628     .427414     -0.64    0.521     -1.111979     .5634532
       _cons |   -5.742044    .8635113     -6.65    0.000     -7.434495    -4.049593
-------------+----------------------------------------------------------------

.
.
. scalar SigDoseWkFw1 = "no"

. scalar SigDoseWkMw1 = "no"

. des bf4 bf40

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


. scalar MainEffwkMw1 = "bf4 bf40"

. scalar MainEffwkFw1 = "age "

. scalar WKModMw1 = "none"

. scalar WkModFw1 = "ageXd1"

.
.
. * male sign main effects in main effects model: 2- bf4, bf40
. * male and female main effects model avgcumdosew1 were not signif.
. * male hp2wk w1  mediators: bf4 and bf40
. * female signif main effects in main effects model
.
. title4  "H1 pt 2 wave 1 Mediation of paid employment testing for males"
-------------
H1 pt 2 wave 1 Mediation of paid employment testing for males
-------------

.
. * male hp2wk w1 mediators:  testing b4 and b40
.
. cap gen ageXillw1 = age*illw1

. correlate bf4 age if gender==1
(obs=340)

             |      bf4      age
-------------+------------------
         bf4 |   1.0000
         age |  -0.4041   1.0000


.
.
. glm age avgcumdosew1 if gender==1, fam(gauss) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm hp2work age if gender==1, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  332.6127
Iteration 2:   deviance =  332.2035
Iteration 3:   deviance =  332.2034
Iteration 4:   deviance =  332.2034

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  332.2034085                    (1/df) Deviance =  .9828503
Pearson          =  339.5831812                    (1/df) Pearson  =  1.004684

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             =  -1637.98

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0233394    .0063554      3.67    0.000      .0108831     .0357956
       _cons |   -2.001321    .3351159     -5.97    0.000     -2.658136    -1.344506
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des bf4

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


. glm bf4 avgcumdosew1 if gender==1, fam(gauss) link(identity)

Iteration 0:   log likelihood = -1026.9659

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  24.75428
Deviance         =  8366.946191                    (1/df) Deviance =  24.75428
Pearson          =  8366.946191                    (1/df) Pearson  =  24.75428

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   6.05274
Log likelihood   = -1026.965868                    BIC             =  6396.763

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.1031788     .161925     -0.64    0.524     -.4205461     .2141884
       _cons |    12.54134    .2786337     45.01    0.000      11.99523     13.08746
-------------+----------------------------------------------------------------

. glm hp2work bf4 if gender==1, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  302.5414
Iteration 2:   deviance =  301.6138
Iteration 3:   deviance =  301.6078
Iteration 4:   deviance =  301.6078
Iteration 5:   deviance =  301.6078

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  301.6078179                    (1/df) Deviance =  .8923308
Pearson          =  318.2302284                    (1/df) Pearson  =  .9415096

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1668.576

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1012401    .0146623     -6.90    0.000     -.1299776    -.0725026
       _cons |    .3470813    .1825598      1.90    0.057     -.0107293      .704892
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
.
. des bf40

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


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


. glm bf40  avgcumdosew1 if gender==1, fam(gauss) link(identity)

Iteration 0:   log likelihood = -659.60303

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  2.852057
Deviance         =  963.9952523                    (1/df) Deviance =  2.852057
Pearson          =  963.9952523                    (1/df) Pearson  =  2.852057

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  3.891783
Log likelihood   = -659.6030291                    BIC             = -1006.188

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0453656    .0549627      0.83    0.409     -.0623593     .1530904
       _cons |    2.124647    .0945774     22.46    0.000      1.939278     2.310015
-------------+----------------------------------------------------------------

. glm hp2work bf40 if gender==1, fam(binomial) link(probit) ///
>    irls scale(dev)

Iteration 1:   deviance =  316.1036
Iteration 2:   deviance =  315.5033
Iteration 3:   deviance =  315.5021
Iteration 4:   deviance =  315.5021

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  315.5020956                    (1/df) Deviance =  .9334382
Pearson          =  333.9910612                    (1/df) Pearson  =  .9881392

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1654.682

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .2493852     .044782      5.57    0.000       .161614     .3371563
       _cons |   -1.421911    .1366145    -10.41    0.000     -1.689671    -1.154152
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "bf40 could be mediator for males h2wk in wave 1"
-------------
bf40 could be mediator for males h2wk in wave 1
-------------

.
.
.
. glm illw1  avgcumdosew1 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -151.48261

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  .1435742
Deviance         =  48.52808533                    (1/df) Deviance =  .1435742
Pearson          =  48.52808533                    (1/df) Pearson  =  .1435742

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  .9028389
Log likelihood   = -151.4826069                    BIC             = -1921.656

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0087277    .0123318      0.71    0.479     -.0154423     .0328976
       _cons |    .0962541    .0212201      4.54    0.000      .0546635     .1378446
-------------+----------------------------------------------------------------

. glm hp2work illw1  if gender==1, fam(binomial) irls ///
>    scale(dev) link(probit)

Iteration 1:   deviance =  345.5327
Iteration 2:   deviance =  345.2889
Iteration 3:   deviance =  345.2888
Iteration 4:   deviance =  345.2888

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  345.2887981                    (1/df) Deviance =  1.021564
Pearson          =  340.1227725                    (1/df) Pearson  =   1.00628

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1624.895

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |    .1303424    .1949057      0.67    0.504     -.2516658     .5123505
       _cons |   -.8347401     .080778    -10.33    0.000      -.993062    -.6764181
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar WkMedMw1 = "bf40"

.
.
.
. title4 "Testing possible female paid employment mediators for paid employment in wave 1"
-------------
Testing possible female paid employment mediators for paid employment in wave 1
-------------

.
. title4 "Test of age as possible female mediator in wave 1"
-------------
Test of age as possible female mediator in wave 1
-------------

. glm age avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood =  -1406.325

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =   136.455
Deviance         =  49260.25928                    (1/df) Deviance =   136.455
Pearson          =  49260.25928                    (1/df) Pearson  =   136.455

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.759366
Log likelihood   = -1406.325011                    BIC             =  47132.38

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.783267      6.16449
       _cons |    48.88157    .7187038     68.01    0.000      47.47293      50.2902
-------------+----------------------------------------------------------------

. glm hp2work age if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  372.7391
Iteration 2:   deviance =  372.3711
Iteration 3:   deviance =  372.3711
Iteration 4:   deviance =  372.3711

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  372.3710546                    (1/df) Deviance =  1.031499
Pearson          =  375.1783727                    (1/df) Pearson  =  1.039275

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1755.508

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0398718    .0066503      6.00    0.000      .0268375      .052906
       _cons |   -2.722762    .3594297     -7.58    0.000     -3.427231    -2.018292
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "age can be a wave 1 mediator for women with hp2work "
-------------
age can be a wave 1 mediator for women with hp2work
-------------

.
.
. title4 "Test of b40 as female mediator of paid employment in wave 1"
-------------
Test of b40 as female mediator of paid employment in wave 1
-------------

. glm bf40 avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood = -818.49948

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  5.351018
Deviance         =  1931.717442                    (1/df) Deviance =  5.351018
Pearson          =  1931.717442                    (1/df) Pearson  =  5.351018

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  4.520658
Log likelihood   = -818.4994757                    BIC             =  -196.162

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .4524905    .2213302      2.04    0.041      .0186913     .8862898
       _cons |    3.013471    .1423225     21.17    0.000      2.734524     3.292417
-------------+----------------------------------------------------------------

. glm hp2work bf40 if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  406.4865
Iteration 2:   deviance =  406.0549
Iteration 3:   deviance =  406.0547
Iteration 4:   deviance =  406.0547

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  406.0547444                    (1/df) Deviance =  1.124805
Pearson          =  360.1809662                    (1/df) Pearson  =  .9977312

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1721.825

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |     .080565    .0316866      2.54    0.011      .0184603     .1426696
       _cons |    -.921639    .1303745     -7.07    0.000     -1.177168    -.6661097
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "b40 could be a wv 1 mediator for women"
-------------
b40 could be a wv 1 mediator for women
-------------

.
.
. title4 "bf4 Test of female mediation of paid employment in wave 1"
-------------
bf4 Test of female mediation of paid employment in wave 1
-------------

. glm bf4 avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood = -1109.0162

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  26.52082
Deviance         =  9574.015672                    (1/df) Deviance =  26.52082
Pearson          =  9574.015672                    (1/df) Pearson  =  26.52082

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.121302
Log likelihood   = -1109.016226                    BIC             =  7446.136

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.474583    -.5430862
       _cons |    10.99384    .3168463     34.70    0.000      10.37284     11.61485
-------------+----------------------------------------------------------------

. glm hp2work bf4 if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  370.9717
Iteration 2:   deviance =  370.7179
Iteration 3:   deviance =  370.7176
Iteration 4:   deviance =  370.7176

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  370.7176349                    (1/df) Deviance =  1.026919
Pearson          =  356.8979308                    (1/df) Pearson  =  .9886369

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1757.162

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |    -.090794    .0144985     -6.26    0.000     -.1192106    -.0623775
       _cons |    .2257867    .1560342      1.45    0.148     -.0800347      .531608
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "bf4 alone is a mediator for women"
-------------
bf4 alone is a mediator for women
-------------

.
.
. title "bf4 Test of female mediation of paid employment in wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****     bf4 Test of female mediation of paid employment in wave 1       *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:12:37  *****
*******************************************************************************
*******************************************************************************


. glm bf4 avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood = -1109.0162

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  26.52082
Deviance         =  9574.015672                    (1/df) Deviance =  26.52082
Pearson          =  9574.015672                    (1/df) Pearson  =  26.52082

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.121302
Log likelihood   = -1109.016226                    BIC             =  7446.136

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.474583    -.5430862
       _cons |    10.99384    .3168463     34.70    0.000      10.37284     11.61485
-------------+----------------------------------------------------------------

. glm hp2work bf4 if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  370.9717
Iteration 2:   deviance =  370.7179
Iteration 3:   deviance =  370.7176
Iteration 4:   deviance =  370.7176

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  370.7176349                    (1/df) Deviance =  1.026919
Pearson          =  356.8979308                    (1/df) Pearson  =  .9886369

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1757.162

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |    -.090794    .0144985     -6.26    0.000     -.1192106    -.0623775
       _cons |    .2257867    .1560342      1.45    0.148     -.0800347      .531608
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "bf4 could be a mediator for women"
-------------
bf4 could be a mediator for women
-------------

.
.
.
. title "Test of female mediation of illw1 and paid employment in wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Test of female mediation of illw1 and paid employment in wave 1    *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:12:40  *****
*******************************************************************************
*******************************************************************************


. glm illw1 avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood = -259.70777

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  .2462383
Deviance         =  88.89203958                    (1/df) Deviance =  .2462383
Pearson          =  88.89203958                    (1/df) Pearson  =  .2462383

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  1.441916
Log likelihood   = -259.7077741                    BIC             = -2038.987

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0655142    .0474789      1.38    0.168     -.0275426     .1585711
       _cons |    .1570822    .0305304      5.15    0.000      .0972436     .2169207
-------------+----------------------------------------------------------------

. glm hp2work illw1 if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  408.8941
Iteration 2:   deviance =  408.3909
Iteration 3:   deviance =  408.3907
Iteration 4:   deviance =  408.3907

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  408.3907209                    (1/df) Deviance =  1.131276
Pearson          =  362.2934789                    (1/df) Pearson  =  1.003583

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1719.489

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |     .294665    .1449437      2.03    0.042      .0105805     .5787495
       _cons |   -.7143685    .0815701     -8.76    0.000     -.8742431     -.554494
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "illw1 alone is a mediator for women"
-------------
illw1 alone is a mediator for women
-------------

.
.
.
.
. title "Test of female mediation of paid employment in wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       Test of female mediation of paid employment in wave 1         *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:12:42  *****
*******************************************************************************
*******************************************************************************


. mvreg bf4 age bf40 = avgcumdosew1 if gender==2

Equation          Obs  Parms        RMSE    "R-sq"          F        P
----------------------------------------------------------------------
bf4               363      2    5.149837    0.0253   9.376729   0.0024
age               363      2     11.6814    0.0338   12.64139   0.0004
bf40              363      2    2.313227    0.0114   4.179627   0.0416

-------------+----------------------------------------------------------------
             |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
bf4          |
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.477832    -.5398375
       _cons |    10.99384    .3168463     34.70    0.000      10.37075     11.61694
-------------+----------------------------------------------------------------
age          |
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.775898     6.171859
       _cons |    48.88157    .7187038     68.01    0.000       47.4682     50.29494
-------------+----------------------------------------------------------------
bf40         |
avgcumdosew1 |    .4524905    .2213302      2.04    0.042       .017232      .887749
       _cons |    3.013471    .1423225     21.17    0.000      2.733585     3.293356
-------------+----------------------------------------------------------------

. glm hp2work bf4 age bf40 if gender==2, fam(binomial) link(probit) irls ///
>   scale(dev)

Iteration 1:   deviance =  354.2404
Iteration 2:   deviance =  353.2021
Iteration 3:   deviance =  353.1978
Iteration 4:   deviance =  353.1978
Iteration 5:   deviance =  353.1978

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  353.1977844                    (1/df) Deviance =  .9838378
Pearson          =  373.3187421                    (1/df) Pearson  =  1.039885

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1762.893

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0639211    .0157071     -4.07    0.000     -.0947065    -.0331358
         age |    .0282268     .007046      4.01    0.000      .0144169     .0420367
        bf40 |    .0293818    .0331211      0.89    0.375     -.0355344     .0942981
       _cons |   -1.597741    .4643893     -3.44    0.001     -2.507928    -.6875549
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4  "age & b4  together could be  wave 1 mediators for women"
-------------
age & b4  together could be  wave 1 mediators for women
-------------

.
.
.
.
. title "Test of female mediation of paid employment in wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       Test of female mediation of paid employment in wave 1         *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:12:45  *****
*******************************************************************************
*******************************************************************************


. mvreg bf4 age bf40 illw1 = avgcumdosew1 if gender==2

Equation          Obs  Parms        RMSE    "R-sq"          F        P
----------------------------------------------------------------------
bf4               363      2    5.149837    0.0253   9.376729   0.0024
age               363      2     11.6814    0.0338   12.64139   0.0004
bf40              363      2    2.313227    0.0114   4.179627   0.0416
illw1             363      2    .4962241    0.0052   1.904017   0.1685

-------------+----------------------------------------------------------------
             |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
bf4          |
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.477832    -.5398375
       _cons |    10.99384    .3168463     34.70    0.000      10.37075     11.61694
-------------+----------------------------------------------------------------
age          |
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.775898     6.171859
       _cons |    48.88157    .7187038     68.01    0.000       47.4682     50.29494
-------------+----------------------------------------------------------------
bf40         |
avgcumdosew1 |    .4524905    .2213302      2.04    0.042       .017232      .887749
       _cons |    3.013471    .1423225     21.17    0.000      2.733585     3.293356
-------------+----------------------------------------------------------------
illw1        |
avgcumdosew1 |    .0655142    .0474789      1.38    0.168     -.0278557     .1588841
       _cons |    .1570822    .0305304      5.15    0.000      .0970423      .217122
-------------+----------------------------------------------------------------

. glm hp2work bf4 age bf40 illw1 if gender==2, fam(binomial) ///
>    link(probit) irls scale(dev)

Iteration 1:   deviance =   354.001
Iteration 2:   deviance =  352.9698
Iteration 3:   deviance =  352.9654
Iteration 4:   deviance =  352.9654
Iteration 5:   deviance =  352.9654

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       358
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   352.965421                    (1/df) Deviance =  .9859369
Pearson          =  374.1304084                    (1/df) Pearson  =  1.045057

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1757.231

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0628029    .0158842     -3.95    0.000     -.0939353    -.0316706
         age |    .0280305    .0070628      3.97    0.000      .0141877     .0418734
        bf40 |    .0276234    .0334236      0.83    0.409     -.0378856     .0931324
       illw1 |    .0692009    .1432947      0.48    0.629     -.2116515     .3500534
       _cons |    -1.60672    .4655573     -3.45    0.001     -2.519195    -.6942446
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. qui: {
When all are together only age and b4 are a wave 1 mediators for women

.
.
. scalar wkMedMw1 = "bf40 "

.
. scalar SigDoseWkMw1 = "no"

. scalar MainEffwkMw1 = "age"

. scalar MainEffwkFw1 = "age"

. scalar wkMedFw1 = "age b4"

. * male hp2wk w1 mediators:  testing b4 and b40
.
. title4 "*---1.- Summary matrix construction Paid employment partition: first two rows"
-------------
*---1.- Summary matrix construction Paid employment partition: first two rows
-------------

.
.     matrix define wkMw1 = J(1,8, 0)

.         matrix define  wkFw1 = J(1,8, 0)

. matrix colnames  wkMw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

. matrix colnames  wkFw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix rownames  wkMw1 = workMw1

.     matrix rownames  wkFw1 = workFw1

.         matrix define  wkMw1= (1, 2, 1, 1, 0 ,2,  0  , 1 )

.         matrix define  wkFw1= (1, 2, 1, 2, 0, 1,  1  , 2 )

.
.         matrix define H1pt2w1 = ( wkMw1 \  wkFw1)

.     matrix colnames H1pt2w1 =  hypnum ptnum wave  medsig numMAsig numModsig numMed

.     matrix rownames H1pt2w1 =  wkMw1 wkFw1

.     matlist H1pt2w1

   | hypnum    ptnum    wave    medsig    numMAsig    numModsig    numMed    numMed
-------------+----------------------------------------------------------------------------------------
wkMw1   |         1            2            1            1            0            2            0            1
wkFw1   |         1            2            1            2            0            1            1            2

.
. set more off

. scalar list
MainEffwkFw1 = age
MainEffwkMw1 = age
MainEffVactnMw1 = age radhlw1
VactnMedFw1 = age illw1 radhlw1
VactnMedMw1 = age
VacatnModFw1 = none
MainEffVactnFw1 = age radhlw1 bf7m
SigDoseVactnFw1 = no
VactnModMw1 = none
inthobMedFw1 = age bf4 illw1 bf4m
inthobMedMw1 = age
 inthobMw1 = age
InthbModFw1 = none
MainEffInthbFw1 = age radhlw1 bf4
SigdoseInthbFw1 = no
InthbModMw1 = none
MainEffInthbMw1 = age radhlw1 shfamw1
SigDoseInthbMw1 = no
MainEffMw1 = radhlw1 bf4 bf40
sxlifeMedMw1 = radhlw1
sxlifeMedFw1 = age illw1 radhlw1 bf4 bf4m
MainEffsxlifeFw1 = age bf4 bf4m
SigDoseSxlifeFw1 = no
SigDosesxlifeMw1 = no
MainEffsxlifeMw1 = age bf4 bf40
MainEffhmcrFw1 = age
MainEffhmcrMw1 = age
hmcrMedFw1 = age bf4
hmcrMedMw1 = radhlw1
SigDosePrbfmhmMw1 = no
vactnModMw1 = none
SigDoseVactnMw1 = no
SxLifeModFw1 = no
sxlifeModFw1 = none
sxlifeModMw1 = none
MaineffhmcrMw1 = age bf4 bf40
SigDoseMEhmcrW1 = no
PrbfmhmMedFw1 = age bf4
PrbfmhmMedMw1 = age
MainEffPrbfmhmFw1 = age radhlw1 bf4
MainEffPrbfmhmMw1 = age bf4
PrbfmhmModFw1 = none
PrbfmhmModMw1 = none
SigDosePrbfmhmFw1 = no
SigDosePrbfhmMw1 = no
MainEffPrbfhmMw1 = age bf4
MainEffVactnMw2 = age radhlw2
sxlifeMedMw2 = age illw2
SigDoseSxlifeFw2 = no
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m
MainEffPrbsocMw2 = age radhlw2 shjobw2
MainEffhmcrFw2 = age
hmcrMedFw2 = age bf4
MainEffwkFw2 = age
MainEffwkMw2 = age
MainEffPrbsocMw1 = age bf4m
SigdoseMw1 = no
ProbsocMedFw1 = age bf4
ProbsocMedMw1 = radhlw1
ProbsocModFw1 = none
SigDoseProbsocMw1 = no
hmcrmedMw1 = radhlw1
hmcrmedFw1 = age b4 b40
SigdosehmcrFw1 = no
MainEffProbSocFw1 = age radhlw1 avgcumdosew1 shrelaw1 bf4
SigDoseProbsocFw1 = yes
PrbsocModMw1 = shjobw1Xd1 shrelaw1Xd1
 WkhmcrMw1 = age b4
  WkModFw1 = ageXd1
hmcareMedFw1 = age illw1
hmcareMedMw1 = age
SigDosehmcrFw1 = no
  wkMedMw1 = bf40
hmcrModFw1 = none
SigDoseHmcrFw1 = yes
  WkMedMw1 = bf40
hmcrModMw1 = none
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
VactnMedMw2 = age
inthobMedMw2 = age
 inthobMw2 = age
PrbfmhmModMw2 = none
MainEffProbSocFw2 = age radhlw2 avgcumdosew2 bf4
hmcrModMw2 = none
MainEffhmcrMw2 = age
  wkMedFw2 = age b4
  wkMedMw2 = age bf4
MainEffsxlifeMw2 = age bf4 bf40 shjobw2 shrelaw2 radhlw2
MainEffPrbfmhmMw2 = bf4 bf6 bf7
ProbsocMedFw2 = age bf4 radhlw2
hmcareMedFw2 = age bf4
 WkhmcrMw2 = age b4
MainEffhmcrw2 = age
hmcrModFw2 = none
SigDoseHmcrFw2 = yes
NumhmcrModMw2 = none
SigDosehmcrMw2 = no
SigdosehmcrFw2 = yes
hmcrMedMw2 = age ageXillw2
SigDosehmcrFw2 = no
MainEffhmcareMw2 = age
  WkMedMw2 = age ageXillw2
  wkMedFw3 = radhlw3 age ageXillw3 bf40 bf4m bf1
VactnMedFw2 = age illw2 radhlw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 bf7m
SigDoseVactnFw2 = no
VactnModMw2 = none
vactnModMw2 = none
SigDoseVactnMw2 = no
inthobMedFw2 = age bf4 illw2 bf4m
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
InthbModMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
MainEffMw2 = radhlw2 bf4 bf40
SigdoseMEinthob = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
SxLifeModFw2 = no
sxlifeModFw2 = none
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf4 bf6 bf7
ProbsocMedMw2 = age
ProbsocModFw2 = none
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
PrbsocModMw2 = none
SigdoseMw2 = none
hmcareMedMw2 = age
hmcareModFw2 = none
MainEffhmcarew2 = age
SigdoseHmcareFw2 = no
hmcareModMw2 = none
SigDoseHmcareMw2 = no
NameMedMw2 = age ageXillw2
 NumModMw2 = none
SigDosehmcareMw2 = no
SigDoseWKMw2 = no
  WkMedFw2 = age bf4
  WkModFw2 = none
  WKModMw2 = none
SigDoseWkMw2 = no
SigDoseWkFw2 = no
SigDoseFw2 = no
  wkModFw2 = none
  wkModMw2 = none
VactnMedFw3 = age illw3 radhlw3
VactnMedMw3 = age illw3
VacatnModFw3 = none
MainEffVactnFw3 = age radhlw3 deaw3
SigDoseVactnFw3 = no
vactnModMw3 = none
MainEffVactnMw3 = age bf7m radhlw3
SigDoseVactnMw3 = no
sxLifeMedFw3 = age bf4 bf4m
sxLifeMedMw3 = age illw3
InthbModFw3 = none
MainEffInthbFw3 = age radhlw3 bf4
SigdoseInthbFw3 = no
  InthbMw3 = none
MainEffInthbMw3 = age radhlw3 shfamw3
SigDoseInthbMw3 = no
sxlifeMedFw3 = age illw3 radhlw3 bf4 bf4m
sxlifeMedMw3 = age illw3
sxlifeModFw3 = none
MainEffsxlifeFw3 = age radhlw3 bf4 bf4m shrelaw3 shfamw3
SigDoseSxlifeFw3 = no
sxlifeModMw3 = none
SigDosesxlifeMw3 = no
MainEffsxlifeMw3 = age bf4 illw3 radhlw3
PrbfmhmMedFw3 = age bf4
PrbfmhmMedMw3 = age
PrbfmhmModFw3 = none
MainEffPrbfmhmFw3 = age bf4 bf40
SigDosePrbfmhmFw3 = no
PrbfmhmModw3 = none
SigDosePrbfmhmMw3 = no
SigDosePrbfhmMw3 = no
MainEffPrbfhmMw3 = bf1 bf4 dvcew3 bf7m
ProbsocMedFw3 = age radhlw3
ProbsocMedMw3 = age
ProbsocModFw3 = none
MainEffProbSocFw3 = age radhlw3 illw3 Shrelaw3 avgcumodsew3
SigDoseProbsocFw3 = yes
ProbSocModMw3 = none
SigDoseProbsocMw3 = no
MainEffPrbsocMw3 = age radhlw3 shjobw3
hmcareMedFw3 = age illw3
hmcareMedMw3 = age illw3
hmcareModFw3 = none
SigdoseHmcareFw3 = no
hmcareModMw3 = none
MainEffhmcareMw3 = none
SigDoseHmcareMw3 = no
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

. * moderator construction
. * none ussed because basic dose work relationship washes out
.
. title "2. Hyp 1 pt 2 wave 1 male dose Hp2hmcare impact explored"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****      2. Hyp 1 pt 2 wave 1 male dose Hp2hmcare impact explored       *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:12:48  *****
*******************************************************************************
*******************************************************************************


.
. * -------  testing male and female moderators-wave 1 for hmcare-----------------
.
. cap gen hp2hmcare=HP2hmcare

.
. forvalues j=1/1 {
  2. set more off
  3. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  4. di as input "For females hp2hmcare on wave 1 with dose ns"
  5.         des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' bf8 ///
>            marrw`j'1-marrw`j'6  `w1bf' radhlw`j'
  6.         sw, pr(.1): logistic hp2hmcare marrw`j'3-marrw`j'6 age  havmilsq ///
>                 avgcumdosew1 bf8 illw`j' shjobw`j' suprtw`j' if gender==1, coef
  7.         estat gof
  8.         estat class
  9.         fitstat
 10.         }
For females hp2hmcare on wave 1 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w1            double   %15.0g        LABJ           profess executive administration in 1986


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


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


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


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


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


occ7w1            double   %15.0g        LABJ           homemaking or caregiving  in 1986


occ8w1            double   %15.0g        LABJ           student  in 1986


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


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


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


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


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


bf8               float    %9.0g                        bf8 = max(0, radtlw3 - 40) * bf5m


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf10              float    %9.0g                        bf10= max(0, sufamw1 - 20)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf20              float    %9.0g                        bf20 = max(0, kzchorn - 2.53946E-006)


bf22              float    %9.0g                        bf22 = max(0, icdxcnt - 1.01635E-007) * bf7m


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


radhlw1           double   %8.0g                        how much believed personal health is affected by radiation in 1986


note: marrw14 dropped because of collinearity
note: marrw16 dropped because of collinearity


  begin with full model


p = 0.8518 >= 0.1000  removing marrw13


p = 0.6179 >= 0.1000  removing avgcumdosew1


p = 0.5000 >= 0.1000  removing havmilsq


p = 0.5276 >= 0.1000  removing bf8


p = 0.5433 >= 0.1000  removing illw1


p = 0.4921 >= 0.1000  removing marrw15


p = 0.1693 >= 0.1000  removing suprtw1


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      41.30
                                                  Prob > chi2     =     0.0000
Log likelihood = -152.22537                       Pseudo R2       =     0.1194

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0525652    .0122122      4.30    0.000      .0286297     .0765007
     shjobw1 |    .0156714    .0041469      3.78    0.000      .0075436     .0237992
       _cons |   -4.957356    .7134246     -6.95    0.000     -6.355643     -3.55907
-------------+----------------------------------------------------------------


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       215
            Pearson chi2(212) =       221.53
                  Prob > chi2 =         0.3127

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        14             4  |         18
     -     |        56           266  |        322
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   20.00%
Specificity                     Pr( -|~D)   98.52%
Positive predictive value       Pr( D| +)   77.78%
Negative predictive value       Pr(~D| -)   82.61%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.48%
False - rate for true D         Pr( -| D)   80.00%
False + rate for classified +   Pr(~D| +)   22.22%
False - rate for classified -   Pr( D| -)   17.39%
--------------------------------------------------
Correctly classified                        82.35%
--------------------------------------------------

Measures of Fit for logistic of hp2hmcare

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -152.225
D(337):                      304.451     LR(2):                        41.295
                                         Prob > LR:                     0.000
McFadden's R2:                 0.119     McFadden's Adj R2:             0.102
Maximum Likelihood R2:         0.114     Cragg & Uhler's R2:            0.179
McKelvey and Zavoina's R2:     0.217     Efron's R2:                    0.130
Variance of y*:                4.204     Variance of error:             3.290
Count R2:                      0.824     Adj Count R2:                  0.143
AIC:                           0.913     AIC*n:                       310.451
BIC:                       -1659.904     BIC':                        -29.637

.
. cap gen shjobw1Xd1 = shjobw1*avgcumdosew1

.
. logit hp2hmcare age avgcumdosew1 shjobw1 ageXd1 shjobw1Xd1 if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -152.72837
Iteration 2:   log likelihood = -151.52069
Iteration 3:   log likelihood = -151.51061
Iteration 4:   log likelihood = -151.51059
Iteration 5:   log likelihood = -151.51059

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      42.72
                                                  Prob > chi2     =     0.0000
Log likelihood = -151.51059                       Pseudo R2       =     0.1236

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0459744    .0152127      3.02    0.003      .0161581     .0757907
avgcumdosew1 |   -2.020359    2.276313     -0.89    0.375     -6.481851     2.441132
     shjobw1 |    .0138632    .0047443      2.92    0.003      .0045646     .0231618
      ageXd1 |    .0271336    .0358792      0.76    0.449     -.0431882     .0974555
  shjobw1Xd1 |    .0056837     .007561      0.75    0.452     -.0091355      .020503
       _cons |   -4.439055     .908991     -4.88    0.000     -6.220645    -2.657466
-------------+----------------------------------------------------------------

.
. scalar SigDosehmcrMw1 = "no"

. scalar MainEffhmcrMw1 = "age shjobw1"

. scalar hmcrModMw1 = "none"

.
.
.
. title4 "Trimmed female Hp2hmcare moderator model"
-------------
Trimmed female Hp2hmcare moderator model
-------------

.
. cap gen ageXd1= age*avgcumdosew1

.
. forvalues j=1/1 {
  2. set more off
  3. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  4. di as input "For females HP2hmcare on wave 1 with dose ns"
  5.         des  age  avgcumdosew`j' ///
>            marrw`j'1-marrw`j'6  `w1bf' radhlw`j'
  6.         logistic hp2hmcare marrw`j'3-marrw`j'6 age  havmilsq ///
>                 avgcumdosew1 illw`j' ageXd1 if gender==2, coef
  7.         estat gof
  8.         estat class
  9.         fitstat
 10.         }
For females HP2hmcare on wave 1 with dose ns

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


age               double   %8.0g                    *   Respondent's age


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf10              float    %9.0g                        bf10= max(0, sufamw1 - 20)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf20              float    %9.0g                        bf20 = max(0, kzchorn - 2.53946E-006)


bf22              float    %9.0g                        bf22 = max(0, icdxcnt - 1.01635E-007) * bf7m


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


radhlw1           double   %8.0g                        how much believed personal health is affected by radiation in 1986


note: marrw14 != 0 predicts success perfectly
      marrw14 dropped and 3 obs not used


Logistic regression                               Number of obs   =        360
                                                  LR chi2(8)      =      90.30
                                                  Prob > chi2     =     0.0000
Log likelihood = -185.35656                       Pseudo R2       =     0.1959

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     marrw13 |   -.3849014    .3723136     -1.03    0.301     -1.114623     .3448198
     marrw14 |           0   (omitted)
     marrw15 |   -.9153623    1.029513     -0.89    0.374      -2.93317     1.102445
     marrw16 |   -.9459556     1.17984     -0.80    0.423     -3.258399     1.366488
         age |    .1113504    .0191706      5.81    0.000      .0737767     .1489241
    havmilsq |   -2.13e-06    2.61e-06     -0.82    0.413     -7.24e-06     2.97e-06
avgcumdosew1 |    1.596621      2.0241      0.79    0.430     -2.370543     5.563785
       illw1 |    .8779977    .2787263      3.15    0.002      .3317043     1.424291
      ageXd1 |   -.0367027    .0350736     -1.05    0.295     -.1054456     .0320402
       _cons |   -6.146477    .9034853     -6.80    0.000     -7.917275    -4.375678
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       360
 number of covariate patterns =       338
            Pearson chi2(329) =       329.08
                  Prob > chi2 =         0.4884

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        61            28  |         89
     -     |        61           210  |        271
-----------+--------------------------+-----------
   Total   |       122           238  |        360

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   50.00%
Specificity                     Pr( -|~D)   88.24%
Positive predictive value       Pr( D| +)   68.54%
Negative predictive value       Pr(~D| -)   77.49%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   11.76%
False - rate for true D         Pr( -| D)   50.00%
False + rate for classified +   Pr(~D| +)   31.46%
False - rate for classified -   Pr( D| -)   22.51%
--------------------------------------------------
Correctly classified                        75.28%
--------------------------------------------------

Measures of Fit for logistic of hp2hmcare

Log-Lik Intercept Only:     -230.506     Log-Lik Full Model:         -185.357
D(350):                      370.713     LR(8):                        90.300
                                         Prob > LR:                     0.000
McFadden's R2:                 0.196     McFadden's Adj R2:             0.152
Maximum Likelihood R2:         0.222     Cragg & Uhler's R2:            0.307
McKelvey and Zavoina's R2:     0.468     Efron's R2:                    0.243
Variance of y*:                6.185     Variance of error:             3.290
Count R2:                      0.753     Adj Count R2:                  0.270
AIC:                           1.085     AIC*n:                       390.713
BIC:                       -1689.423     BIC':                        -43.211

.
. title4 "Trimmed model of hp2work for women in wave 1"
-------------
Trimmed model of hp2work for women in wave 1
-------------

. forvalues j=1/1 {
  2. set more off
  3. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  4. di as input "For females HP2hmcare on wave 1 with dose ns"
  5.         des  age  avgcumdosew`j' ///
>            marrw`j'1-marrw`j'6  `w1bf' radhlw`j'
  6.         logistic hp2hmcare age avgcumdosew1 illw`j'  if gender==2, coef
  7.         estat gof
  8.         estat class
  9.         fitstat
 10.         }
For females HP2hmcare on wave 1 with dose ns

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


age               double   %8.0g                    *   Respondent's age


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf10              float    %9.0g                        bf10= max(0, sufamw1 - 20)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf20              float    %9.0g                        bf20 = max(0, kzchorn - 2.53946E-006)


bf22              float    %9.0g                        bf22 = max(0, icdxcnt - 1.01635E-007) * bf7m


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


radhlw1           double   %8.0g                        how much believed personal health is affected by radiation in 1986


Logistic regression                               Number of obs   =        363
                                                  LR chi2(3)      =      88.59
                                                  Prob > chi2     =     0.0000
Log likelihood = -189.43609                       Pseudo R2       =     0.1895

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0919881    .0122684      7.50    0.000      .0679425     .1160337
avgcumdosew1 |   -.5411658    .2831823     -1.91    0.056     -1.096193     .0138613
       illw1 |    .8054954    .2675545      3.01    0.003      .2810981     1.329893
       _cons |    -5.38915    .6535341     -8.25    0.000     -6.670053    -4.108247
-------------+----------------------------------------------------------------


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       313
            Pearson chi2(309) =       323.98
                  Prob > chi2 =         0.2677

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        64            28  |         92
     -     |        61           210  |        271
-----------+--------------------------+-----------
   Total   |       125           238  |        363

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   51.20%
Specificity                     Pr( -|~D)   88.24%
Positive predictive value       Pr( D| +)   69.57%
Negative predictive value       Pr(~D| -)   77.49%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   11.76%
False - rate for true D         Pr( -| D)   48.80%
False + rate for classified +   Pr(~D| +)   30.43%
False - rate for classified -   Pr( D| -)   22.51%
--------------------------------------------------
Correctly classified                        75.48%
--------------------------------------------------

Measures of Fit for logistic of hp2hmcare

Log-Lik Intercept Only:     -233.729     Log-Lik Full Model:         -189.436
D(359):                      378.872     LR(3):                        88.585
                                         Prob > LR:                     0.000
McFadden's R2:                 0.190     McFadden's Adj R2:             0.172
Maximum Likelihood R2:         0.217     Cragg & Uhler's R2:            0.299
McKelvey and Zavoina's R2:     0.304     Efron's R2:                    0.241
Variance of y*:                4.725     Variance of error:             3.290
Count R2:                      0.755     Adj Count R2:                  0.288
AIC:                           1.066     AIC*n:                       386.872
BIC:                       -1737.218     BIC':                        -70.902

.
. qui {
-------------
Caveat: We drop bf8 because it is dependent on a variable in a future wave.
-------------
-------------
If it depended on a past wave variable we might have kept it.
-------------
-------------
But when it is dependent on something that has not happened yet,
-------------
-------------
it is too latent to consider in a wave specific analysis.
-------------

. des bf8 bf5m bf4m

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


bf8               float    %9.0g                        bf8 = max(0, radtlw3 - 40) * bf5m


bf5m              float    %9.0g                        bf5m = max(0, ecprw3 - 75) * bf4m


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


. scalar SigDosehmcrFw1 = "no"

. scalar MainEffhmcrFw1 = "illw1 age"

.
.
. title4 "home care wave 1 male mediator analysis"
-------------
home care wave 1 male mediator analysis
-------------

.
. title4 "age is a possible male mediator of home care in wave 1"
-------------
age is a possible male mediator of home care in wave 1
-------------

. glm age avgcumdosew1 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm hp2hmcare age if gender==1, fam(binomial) irls scale(dev) link(probit)

Iteration 1:   deviance =  320.8295
Iteration 2:   deviance =  320.0337
Iteration 3:   deviance =  320.0328
Iteration 4:   deviance =  320.0328

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  320.0327771                    (1/df) Deviance =  .9468425
Pearson          =   341.699231                    (1/df) Pearson  =  1.010944

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1650.151

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .032545    .0064212      5.07    0.000      .0199596     .0451304
       _cons |   -2.483665    .3435565     -7.23    0.000     -3.157023    -1.810306
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar hmcrMedMw1 = "age ageXillw1"

.
. di as input "age is a possible male mediator for home care in wave 1"
age is a possible male mediator for home care in wave 1

.
.
. di as input "age and illw1 as main effects together suppress illw1"
age and illw1 as main effects together suppress illw1

. glm illw1 age avgcumdosew1 if gender==1, family(gaussian) link(identity)

Iteration 0:   log likelihood = -149.77052

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       337
                                                   Scale parameter =  .1425573
Deviance         =  48.04180784                    (1/df) Deviance =  .1425573
Pearson          =  48.04180784                    (1/df) Pearson  =  .1425573

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  .8986501
Log likelihood   = -149.7705231                    BIC             = -1916.313

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0031119    .0016849      1.85    0.065     -.0001905     .0064143
avgcumdosew1 |    .0066365    .0123401      0.54    0.591     -.0175497     .0308227
       _cons |   -.0558998    .0850529     -0.66    0.511     -.2226005     .1108009
-------------+----------------------------------------------------------------

. glm hp2hmcare illw1 age  if gender==1, family(binomial) irls scale(dev) link(probit)

Iteration 1:   deviance =  320.7839
Iteration 2:   deviance =  319.9774
Iteration 3:   deviance =  319.9764
Iteration 4:   deviance =  319.9764

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       337
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  319.9764494                    (1/df) Deviance =   .949485
Pearson          =  341.9238822                    (1/df) Pearson  =  1.014611

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1644.378

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |    .0470226    .1922185      0.24    0.807     -.3297186     .4237639
         age |     .032421    .0064525      5.02    0.000      .0197743     .0450676
       _cons |   -2.482523      .34428     -7.21    0.000       -3.1573    -1.807747
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. di as input "Interaction of age and wave 1 illness for males is mediator-moderator on hmcare"
Interaction of age and wave 1 illness for males is mediator-moderator on hmcare

.
. cap gen ageXillw1 = age*illw1

. glm illw1 avgcumdosew1 if gender==1, family(gaussian) link(identity)

Iteration 0:   log likelihood = -151.48261

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  .1435742
Deviance         =  48.52808533                    (1/df) Deviance =  .1435742
Pearson          =  48.52808533                    (1/df) Pearson  =  .1435742

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  .9028389
Log likelihood   = -151.4826069                    BIC             = -1921.656

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0087277    .0123318      0.71    0.479     -.0154423     .0328976
       _cons |    .0962541    .0212201      4.54    0.000      .0546635     .1378446
-------------+----------------------------------------------------------------

. glm hp2hmcare illw1 avgcumdosew1 ageXillw1 if gender==1, family(binomial) ///
>    irls scale(dev) link(probit)

Iteration 1:   deviance =  344.1427
Iteration 2:   deviance =    343.92
Iteration 3:   deviance =  343.9199
Iteration 4:   deviance =  343.9199

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  343.9198791                    (1/df) Deviance =  1.023571
Pearson          =   339.000371                    (1/df) Pearson  =   1.00893

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1614.606

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |   -1.213319    1.209268     -1.00    0.316     -3.583441     1.156803
avgcumdosew1 |   -.0042013    .0484889     -0.09    0.931     -.0992378     .0908352
   ageXillw1 |    .0242393    .0213349      1.14    0.256     -.0175764     .0660551
       _cons |   -.8321418    .0831923    -10.00    0.000     -.9951958    -.6690878
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
. * Saving mediators as scalars for Dose=work relationship
. **** female mediators of dose-paid employment: radhlw1, age, bf40, bf4m, bf4, bf1
.
. scalar hmcrMedMw1 = "age"

. scalar hmcrMedFw1 = "age avgcumdosew1 bf4 bf4m "

.
. cap gen hp2vacatn = HP2vacatn

.
.
. title "2. H1 pt2 wave 1 Dose female moderator Homecare impact  "


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****      2. H1 pt2 wave 1 Dose female moderator Homecare impact         *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:13:14  *****
*******************************************************************************
*******************************************************************************


.
.
. *  review of general model for men and women
.
. forvalues j=1/1 {
  2.  set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
.   foreach var in HP2hmcare  {
  5.
. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  6.    title  "chunk 3 H1 test pt 2 :Gender= `k'  model Wave =  `j' for `e(depvar)' "
  7.                 di _skip(4)
  8.
.
.       xi: logistic `var' age i.educ occ1w`j'-occ8w`j' ///
>                 marrw`j'1- marrw`j'3 marrw`j'5-marrw`j'6 inc1w`j'-inc4w`j' ///
>                 radhlw`j' havmil avgcumdosew`j' `w`j'bf'  ///
>                  deaw`j' dvcew`j' sepaw`j' accdw`j' movew`j' radhlw1 ///
>                 illw`j' shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j' ///
>                  havmilsq if gender==2, coef  difficult iterate(50)
  9.                         estat class
 10.                         estat gof
 11.                         fitstat
 12.
. }
 13. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   chunk 3 H1 test pt 2 :Gender=   model Wave =  1 for hp2hmcare     *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:13:14  *****
*******************************************************************************
*******************************************************************************


i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_8 omitted because of collinearity
note: radhlw1 omitted because of collinearity

Logistic regression                               Number of obs   =        358
                                                  LR chi2(51)     =     163.36
                                                  Prob > chi2     =     0.0000
Log likelihood =  -149.9205                       Pseudo R2       =     0.3527

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1322255    .0241652      5.47    0.000      .0848625     .1795885
    _Ieduc_2 |    -10.0193    754.0186     -0.01    0.989     -1487.869      1467.83
    _Ieduc_3 |   -10.49152    754.0185     -0.01    0.989     -1488.341     1467.358
    _Ieduc_4 |    -8.71423    754.0188     -0.01    0.991     -1486.564     1469.135
    _Ieduc_5 |    -10.4068    754.0186     -0.01    0.989     -1488.256     1467.443
    _Ieduc_6 |   -10.68819    754.0185     -0.01    0.989     -1488.537     1467.161
    _Ieduc_7 |   -10.94334    754.0203     -0.01    0.988     -1488.796     1466.909
    _Ieduc_8 |           0   (omitted)
      occ1w1 |   -2.443994    1.415397     -1.73    0.084     -5.218121     .3301329
      occ2w1 |   -2.519671    1.458446     -1.73    0.084     -5.378173     .3388315
      occ3w1 |   -2.372771    1.446929     -1.64    0.101       -5.2087     .4631575
      occ4w1 |   -3.256872    1.570864     -2.07    0.038     -6.335709    -.1780355
      occ5w1 |   -3.906156    1.725894     -2.26    0.024     -7.288845    -.5234666
      occ6w1 |   -5.192057    1.956306     -2.65    0.008     -9.026346    -1.357767
      occ7w1 |   -.9645317     1.49363     -0.65    0.518     -3.891993     1.962929
      occ8w1 |   -1.541951    1.448029     -1.06    0.287     -4.380037     1.296134
     marrw11 |   -.4640303    1.925158     -0.24    0.810     -4.237272     3.309211
     marrw12 |   -1.711412    2.266816     -0.75    0.450      -6.15429     2.731467
     marrw13 |    -1.34516    1.914926     -0.70    0.482     -5.098345     2.408026
     marrw15 |   -2.648889    2.280264     -1.16    0.245     -7.118125     1.820346
     marrw16 |   -3.140349    2.467603     -1.27    0.203     -7.976762     1.696063
      inc1w1 |    1.997721    1.384475      1.44    0.149     -.7157992     4.711242
      inc2w1 |    2.374508    1.354203      1.75    0.080     -.2796802     5.028697
      inc3w1 |    2.719588    1.365246      1.99    0.046      .0437547     5.395421
      inc4w1 |    2.169417    1.522601      1.42    0.154     -.8148263      5.15366
     radhlw1 |     .000015    .0054568      0.00    0.998     -.0106801     .0107101
      havmil |    -.003359    .0026195     -1.28    0.200      -.008493     .0017751
avgcumdosew1 |   -.9556895    .3881039     -2.46    0.014     -1.716359    -.1950199
         bf1 |   -.0087777    .0246959     -0.36    0.722     -.0571808     .0396254
         bf4 |   -.5899724     .228594     -2.58    0.010     -1.038008    -.1419365
         bf9 |   -.0436396    .0223962     -1.95    0.051     -.0875353     .0002562
        bf10 |    .0090231    .0130434      0.69    0.489     -.0165414     .0345877
        bf11 |    .0532598    .0430698      1.24    0.216     -.0311554     .1376749
        bf4m |    .4051708    .2117859      1.91    0.056     -.0099218     .8202635
       bf15m |    .0002493    .0003321      0.75    0.453     -.0004015     .0009002
        bf20 |   -.0059985    .0202682     -0.30    0.767     -.0457235     .0337264
        bf22 |   -.0000321    .0000692     -0.46    0.643     -.0001678     .0001036
        bf30 |    .0002449    .0002901      0.84    0.398     -.0003236     .0008135
        bf40 |    .0632557    .0911174      0.69    0.488      -.115331     .2418425
       deaw1 |     .158171    .2197751      0.72    0.472     -.2725802     .5889222
      dvcew1 |    .1254408    2.091225      0.06    0.952     -3.973284     4.224166
      sepaw1 |   -.6497514    2.414062     -0.27    0.788     -5.381225     4.081722
      accdw1 |    .2831415    .8314301      0.34    0.733     -1.346432     1.912715
      movew1 |    .2074149    .4471555      0.46    0.643     -.6689937     1.083823
     radhlw1 |           0   (omitted)
       illw1 |    1.106215    .3492383      3.17    0.002      .4217202     1.790709
     shfamw1 |   -.0002582    .0064446     -0.04    0.968     -.0128893     .0123729
      shhlw1 |    -.006468    .0095563     -0.68    0.499      -.025198      .012262
     shjobw1 |    .0002575     .007117      0.04    0.971     -.0136915     .0142066
    shrelaw1 |   -.0148903    .0065942     -2.26    0.024     -.0278146     -.001966
     suprtw1 |   -.0041909    .0088489     -0.47    0.636     -.0215344     .0131526
     suchrw1 |    .0319242    .0187143      1.71    0.088     -.0047551     .0686035
    havmilsq |    5.48e-07    1.88e-06      0.29    0.771     -3.14e-06     4.23e-06
       _cons |    3.542841    754.0254      0.00    0.996      -1474.32     1481.405
-------------+----------------------------------------------------------------

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        85            27  |        112
     -     |        40           206  |        246
-----------+--------------------------+-----------
   Total   |       125           233  |        358

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   68.00%
Specificity                     Pr( -|~D)   88.41%
Positive predictive value       Pr( D| +)   75.89%
Negative predictive value       Pr(~D| -)   83.74%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   11.59%
False - rate for true D         Pr( -| D)   32.00%
False + rate for classified +   Pr(~D| +)   24.11%
False - rate for classified -   Pr( D| -)   16.26%
--------------------------------------------------
Correctly classified                        81.28%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       358
 number of covariate patterns =       358
            Pearson chi2(306) =       314.35
                  Prob > chi2 =         0.3590

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -231.600     Log-Lik Full Model:         -149.920
D(304):                      299.841     LR(51):                      163.358
                                         Prob > LR:                     0.000
McFadden's R2:                 0.353     McFadden's Adj R2:             0.120
Maximum Likelihood R2:         0.366     Cragg & Uhler's R2:            0.505
McKelvey and Zavoina's R2:     0.599     Efron's R2:                    0.401
Variance of y*:                8.211     Variance of error:             3.290
Count R2:                      0.813     Adj Count R2:                  0.464
AIC:                           1.139     AIC*n:                       407.841
BIC:                       -1487.841     BIC':                        136.549

.
. title4 "Partly trimmed Female Main effects model for dose=> homecare wave 1"
-------------
Partly trimmed Female Main effects model for dose=> homecare wave 1
-------------

.   logit hp2hmcare age radhlw1  ///
>      avgcumdosew1 bf4  if gender==2

Iteration 0:   log likelihood = -233.30573
Iteration 1:   log likelihood = -184.19159
Iteration 2:   log likelihood = -183.06271
Iteration 3:   log likelihood = -183.05768
Iteration 4:   log likelihood = -183.05768

Logistic regression                               Number of obs   =        362
                                                  LR chi2(4)      =     100.50
                                                  Prob > chi2     =     0.0000
Log likelihood = -183.05768                       Pseudo R2       =     0.2154

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0770328    .0130012      5.93    0.000      .0515508     .1025148
     radhlw1 |   -.0011136    .0035739     -0.31    0.755     -.0081184     .0058911
avgcumdosew1 |   -.5567889    .2722015     -2.05    0.041     -1.090294    -.0232837
         bf4 |   -.1227731    .0262991     -4.67    0.000     -.1743185    -.0712277
       _cons |   -3.173011    .7808961     -4.06    0.000     -4.703539    -1.642482
-------------+----------------------------------------------------------------

.
.  title4 "Partly trimmed Female Main effects model for dose=> homecare wave 1"
-------------
Partly trimmed Female Main effects model for dose=> homecare wave 1
-------------

.   logit hp2hmcare age avgcumdosew1 bf4  if gender==2

Iteration 0:   log likelihood = -233.72859
Iteration 1:   log likelihood = -184.31143
Iteration 2:   log likelihood = -183.15831
Iteration 3:   log likelihood = -183.15306
Iteration 4:   log likelihood = -183.15306

Logistic regression                               Number of obs   =        363
                                                  LR chi2(3)      =     101.15
                                                  Prob > chi2     =     0.0000
Log likelihood = -183.15306                       Pseudo R2       =     0.2164

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0763754    .0127317      6.00    0.000      .0514218     .1013291
avgcumdosew1 |   -.5587715    .2733515     -2.04    0.041     -1.094531    -.0230124
         bf4 |    -.122574    .0262798     -4.66    0.000     -.1740815    -.0710665
       _cons |   -3.204746     .777467     -4.12    0.000     -4.728553    -1.680939
-------------+----------------------------------------------------------------

.
.
.
. di as input "female trimmed model for dose-home care impact in wv 1wave 1: dose not signif"
female trimmed model for dose-home care impact in wv 1wave 1: dose not signif

. di as input " female dose is not signif as main effect in dose - homecare impact "
 female dose is not signif as main effect in dose - homecare impact

. di as input  " no female moderate interactions for dose-homecare impact"
 no female moderate interactions for dose-homecare impact

.
. scalar SigDoseHmcrFw1 = "yes"

. scalar MainEffhmcrFw1= "age  b4 avgcumdosew1"

. scalar list
MainEffhmcrFw1 = age  b4 avgcumdosew1
hmcrMedFw1 = age avgcumdosew1 bf4 bf4m
hmcrMedMw1 = age
MainEffhmcrMw1 = age shjobw1
MainEffwkFw1 = age
MainEffwkMw1 = age
MainEffVactnMw1 = age radhlw1
VactnMedFw1 = age illw1 radhlw1
VactnMedMw1 = age
VacatnModFw1 = none
MainEffVactnFw1 = age radhlw1 bf7m
SigDoseVactnFw1 = no
VactnModMw1 = none
inthobMedFw1 = age bf4 illw1 bf4m
inthobMedMw1 = age
 inthobMw1 = age
InthbModFw1 = none
MainEffInthbFw1 = age radhlw1 bf4
SigdoseInthbFw1 = no
InthbModMw1 = none
MainEffInthbMw1 = age radhlw1 shfamw1
SigDoseInthbMw1 = no
MainEffMw1 = radhlw1 bf4 bf40
sxlifeMedMw1 = radhlw1
sxlifeMedFw1 = age illw1 radhlw1 bf4 bf4m
MainEffsxlifeFw1 = age bf4 bf4m
SigDoseSxlifeFw1 = no
SigDosesxlifeMw1 = no
MainEffsxlifeMw1 = age bf4 bf40
SigDosePrbfmhmMw1 = no
vactnModMw1 = none
SigDoseVactnMw1 = no
SxLifeModFw1 = no
sxlifeModFw1 = none
sxlifeModMw1 = none
MaineffhmcrMw1 = age bf4 bf40
SigDoseMEhmcrW1 = no
PrbfmhmMedFw1 = age bf4
PrbfmhmMedMw1 = age
MainEffPrbfmhmFw1 = age radhlw1 bf4
MainEffPrbfmhmMw1 = age bf4
PrbfmhmModFw1 = none
PrbfmhmModMw1 = none
SigDosePrbfmhmFw1 = no
SigDosePrbfhmMw1 = no
MainEffPrbfhmMw1 = age bf4
MainEffVactnMw2 = age radhlw2
sxlifeMedMw2 = age illw2
SigDoseSxlifeFw2 = no
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m
MainEffPrbsocMw2 = age radhlw2 shjobw2
MainEffhmcrFw2 = age
hmcrMedFw2 = age bf4
MainEffwkFw2 = age
MainEffwkMw2 = age
MainEffPrbsocMw1 = age bf4m
SigdoseMw1 = no
ProbsocMedFw1 = age bf4
ProbsocMedMw1 = radhlw1
ProbsocModFw1 = none
SigDoseProbsocMw1 = no
hmcrmedMw1 = radhlw1
hmcrmedFw1 = age b4 b40
SigdosehmcrFw1 = no
MainEffProbSocFw1 = age radhlw1 avgcumdosew1 shrelaw1 bf4
SigDoseProbsocFw1 = yes
PrbsocModMw1 = shjobw1Xd1 shrelaw1Xd1
 WkhmcrMw1 = age b4
  WkModFw1 = ageXd1
hmcareMedFw1 = age illw1
hmcareMedMw1 = age
SigDosehmcrFw1 = no
  wkMedMw1 = bf40
hmcrModFw1 = none
SigDoseHmcrFw1 = yes
  WkMedMw1 = bf40
hmcrModMw1 = none
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
VactnMedMw2 = age
inthobMedMw2 = age
 inthobMw2 = age
PrbfmhmModMw2 = none
MainEffProbSocFw2 = age radhlw2 avgcumdosew2 bf4
hmcrModMw2 = none
MainEffhmcrMw2 = age
  wkMedFw2 = age b4
  wkMedMw2 = age bf4
MainEffsxlifeMw2 = age bf4 bf40 shjobw2 shrelaw2 radhlw2
MainEffPrbfmhmMw2 = bf4 bf6 bf7
ProbsocMedFw2 = age bf4 radhlw2
hmcareMedFw2 = age bf4
 WkhmcrMw2 = age b4
MainEffhmcrw2 = age
hmcrModFw2 = none
SigDoseHmcrFw2 = yes
NumhmcrModMw2 = none
SigDosehmcrMw2 = no
SigdosehmcrFw2 = yes
hmcrMedMw2 = age ageXillw2
SigDosehmcrFw2 = no
MainEffhmcareMw2 = age
  WkMedMw2 = age ageXillw2
  wkMedFw3 = radhlw3 age ageXillw3 bf40 bf4m bf1
VactnMedFw2 = age illw2 radhlw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 bf7m
SigDoseVactnFw2 = no
VactnModMw2 = none
vactnModMw2 = none
SigDoseVactnMw2 = no
inthobMedFw2 = age bf4 illw2 bf4m
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
InthbModMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
MainEffMw2 = radhlw2 bf4 bf40
SigdoseMEinthob = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
SxLifeModFw2 = no
sxlifeModFw2 = none
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf4 bf6 bf7
ProbsocMedMw2 = age
ProbsocModFw2 = none
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
PrbsocModMw2 = none
SigdoseMw2 = none
hmcareMedMw2 = age
hmcareModFw2 = none
MainEffhmcarew2 = age
SigdoseHmcareFw2 = no
hmcareModMw2 = none
SigDoseHmcareMw2 = no
NameMedMw2 = age ageXillw2
 NumModMw2 = none
SigDosehmcareMw2 = no
SigDoseWKMw2 = no
  WkMedFw2 = age bf4
  WkModFw2 = none
  WKModMw2 = none
SigDoseWkMw2 = no
SigDoseWkFw2 = no
SigDoseFw2 = no
  wkModFw2 = none
  wkModMw2 = none
VactnMedFw3 = age illw3 radhlw3
VactnMedMw3 = age illw3
VacatnModFw3 = none
MainEffVactnFw3 = age radhlw3 deaw3
SigDoseVactnFw3 = no
vactnModMw3 = none
MainEffVactnMw3 = age bf7m radhlw3
SigDoseVactnMw3 = no
sxLifeMedFw3 = age bf4 bf4m
sxLifeMedMw3 = age illw3
InthbModFw3 = none
MainEffInthbFw3 = age radhlw3 bf4
SigdoseInthbFw3 = no
  InthbMw3 = none
MainEffInthbMw3 = age radhlw3 shfamw3
SigDoseInthbMw3 = no
sxlifeMedFw3 = age illw3 radhlw3 bf4 bf4m
sxlifeMedMw3 = age illw3
sxlifeModFw3 = none
MainEffsxlifeFw3 = age radhlw3 bf4 bf4m shrelaw3 shfamw3
SigDoseSxlifeFw3 = no
sxlifeModMw3 = none
SigDosesxlifeMw3 = no
MainEffsxlifeMw3 = age bf4 illw3 radhlw3
PrbfmhmMedFw3 = age bf4
PrbfmhmMedMw3 = age
PrbfmhmModFw3 = none
MainEffPrbfmhmFw3 = age bf4 bf40
SigDosePrbfmhmFw3 = no
PrbfmhmModw3 = none
SigDosePrbfmhmMw3 = no
SigDosePrbfhmMw3 = no
MainEffPrbfhmMw3 = bf1 bf4 dvcew3 bf7m
ProbsocMedFw3 = age radhlw3
ProbsocMedMw3 = age
ProbsocModFw3 = none
MainEffProbSocFw3 = age radhlw3 illw3 Shrelaw3 avgcumodsew3
SigDoseProbsocFw3 = yes
ProbSocModMw3 = none
SigDoseProbsocMw3 = no
MainEffPrbsocMw3 = age radhlw3 shjobw3
hmcareMedFw3 = age illw3
hmcareMedMw3 = age illw3
hmcareModFw3 = none
SigdoseHmcareFw3 = no
hmcareModMw3 = none
MainEffhmcareMw3 = none
SigDoseHmcareMw3 = no
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

.
. title4 "Fully trimmed Female Main effects model for dose=> homecare wave 1"
-------------
Fully trimmed Female Main effects model for dose=> homecare wave 1
-------------

.   logit hp2hmcare age radhlw1 occ1w1-occ8w1 inc1w1-inc4w1 ///
>      avgcumdosew1 bf4  if gender==2

Iteration 0:   log likelihood = -233.30573
Iteration 1:   log likelihood = -177.44485
Iteration 2:   log likelihood = -175.62926
Iteration 3:   log likelihood = -175.62508
Iteration 4:   log likelihood = -175.62508

Logistic regression                               Number of obs   =        362
                                                  LR chi2(16)     =     115.36
                                                  Prob > chi2     =     0.0000
Log likelihood = -175.62508                       Pseudo R2       =     0.2472

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0961718    .0183122      5.25    0.000      .0602806      .132063
     radhlw1 |   -.0009397    .0037872     -0.25    0.804     -.0083624      .006483
      occ1w1 |   -1.536209     1.27581     -1.20    0.229     -4.036751     .9643328
      occ2w1 |   -1.066639    1.306018     -0.82    0.414     -3.626387     1.493109
      occ3w1 |   -.9187994    1.316697     -0.70    0.485     -3.499477     1.661879
      occ4w1 |   -1.809667    1.369371     -1.32    0.186     -4.493584     .8742504
      occ5w1 |   -2.474943    1.459934     -1.70    0.090     -5.336361     .3864749
      occ6w1 |   -2.384731    1.550879     -1.54    0.124     -5.424399     .6549365
      occ7w1 |   -.2736949    1.305569     -0.21    0.834     -2.832564     2.285174
      occ8w1 |   -.4828664    1.289472     -0.37    0.708     -3.010185     2.044453
      inc1w1 |    1.237577    1.315563      0.94    0.347     -1.340878     3.816033
      inc2w1 |    1.563876    1.263131      1.24    0.216     -.9118151     4.039568
      inc3w1 |    1.858766    1.259322      1.48    0.140     -.6094602     4.326992
      inc4w1 |    1.650938    1.369374      1.21    0.228     -1.032987     4.334862
avgcumdosew1 |   -.6169468    .2918407     -2.11    0.035     -1.188944    -.0449496
         bf4 |   -.1423744    .0286191     -4.97    0.000     -.1984668     -.086282
       _cons |   -4.384177     1.11318     -3.94    0.000      -6.56597    -2.202384
-------------+----------------------------------------------------------------

.
. title4 "Super trimmed Female Main effects model for dose=> homecare wave 1"
-------------
Super trimmed Female Main effects model for dose=> homecare wave 1
-------------

.   sw, pr(.1): logit hp2hmcare age radhlw1 occ1w1-occ8w1 inc1w1-inc4w1 ///
>      avgcumdosew1 bf4 bf7 if gender==2


  begin with full model


p = 0.8548 >= 0.1000  removing occ7w1


p = 0.8444 >= 0.1000  removing radhlw1


p = 0.7229 >= 0.1000  removing occ8w1


p = 0.3325 >= 0.1000  removing occ3w1


p = 0.3694 >= 0.1000  removing occ2w1


p = 0.2150 >= 0.1000  removing inc1w1


p = 0.2936 >= 0.1000  removing inc4w1


p = 0.2169 >= 0.1000  removing inc2w1


p = 0.2571 >= 0.1000  removing occ4w1


p = 0.1614 >= 0.1000  removing occ1w1


p = 0.2137 >= 0.1000  removing inc3w1


p = 0.2479 >= 0.1000  removing occ6w1


p = 0.1543 >= 0.1000  removing occ5w1


p = 0.1037 >= 0.1000  removing bf7


Logistic regression                               Number of obs   =        362
                                                  LR chi2(3)      =     100.40
                                                  Prob > chi2     =     0.0000
Log likelihood =  -183.1063                       Pseudo R2       =     0.2152

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0762363    .0127384      5.98    0.000      .0512695     .1012031
         bf4 |   -.1224238    .0262785     -4.66    0.000     -.1739286    -.0709189
avgcumdosew1 |   -.5588394    .2733844     -2.04    0.041     -1.094663    -.0230158
       _cons |   -3.198013    .7776298     -4.11    0.000      -4.72214    -1.673887
-------------+----------------------------------------------------------------

.
. cap gen radhlw1Xd1 = radhlw1*avgcumdosew1

.
.
. title4 "female main effect plus interaction model"
-------------
female main effect plus interaction model
-------------

. xi:logit hp2hmcare age  avgcumdosew1 bf4  ageXd1 bf4Xd1 if gender==2

Iteration 0:   log likelihood = -233.72859
Iteration 1:   log likelihood = -183.82966
Iteration 2:   log likelihood =  -182.5885
Iteration 3:   log likelihood = -182.58185
Iteration 4:   log likelihood = -182.58185

Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =     102.29
                                                  Prob > chi2     =     0.0000
Log likelihood = -182.58185                       Pseudo R2       =     0.2188

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0849926    .0157492      5.40    0.000      .0541247     .1158604
avgcumdosew1 |    1.600207    2.155971      0.74    0.458     -2.625418     5.825832
         bf4 |   -.1093288     .034593     -3.16    0.002     -.1771298    -.0415278
      ageXd1 |   -.0339202    .0371133     -0.91    0.361     -.1066609     .0388205
      bf4Xd1 |   -.0454367    .0710033     -0.64    0.522     -.1846007     .0937273
       _cons |   -3.755837     .945655     -3.97    0.000     -5.609287    -1.902388
-------------+----------------------------------------------------------------

.
. * there are no significant moderators for female dose=hmcare relationship
. scalar hmcrModFw1 = "none"

.
.
.
. scalar SigdosehmcrFw1="no"

.
.
. scalar MainEffhmcrFw1 = "age bf4"

.
.
. scalar hmcrModFw1 = "none"

.
.
. title4 "Mediator relationships for home care are tested below"
-------------
Mediator relationships for home care are tested below
-------------

. title4  "H1 pt 2 wave 1 Mediation of home care testing for males"
-------------
H1 pt 2 wave 1 Mediation of home care testing for males
-------------

.
.
.
. correlate bf4 age if gender==1
(obs=340)

             |      bf4      age
-------------+------------------
         bf4 |   1.0000
         age |  -0.4041   1.0000


.
. des bf4

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


.
. glm bf4 avgcumdosew1 if gender==1, fam(gauss) link(identity)

Iteration 0:   log likelihood = -1026.9659

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  24.75428
Deviance         =  8366.946191                    (1/df) Deviance =  24.75428
Pearson          =  8366.946191                    (1/df) Pearson  =  24.75428

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   6.05274
Log likelihood   = -1026.965868                    BIC             =  6396.763

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.1031788     .161925     -0.64    0.524     -.4205461     .2141884
       _cons |    12.54134    .2786337     45.01    0.000      11.99523     13.08746
-------------+----------------------------------------------------------------

. glm hp2hmcare bf4  if gender==1, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  268.3422
Iteration 2:   deviance =  265.0048
Iteration 3:   deviance =  264.9272
Iteration 4:   deviance =  264.9269
Iteration 5:   deviance =  264.9269

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  264.9268544                    (1/df) Deviance =  .7838073
Pearson          =  286.2423079                    (1/df) Pearson  =  .8468707

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1705.257

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1429587     .015032     -9.51    0.000     -.1724209    -.1134964
       _cons |    .7855991    .1813087      4.33    0.000      .4302406     1.140958
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. glm age avgcumdosew1 if gender==1, fam(gauss) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm hp2hmcare age if gender==1, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  320.8295
Iteration 2:   deviance =  320.0337
Iteration 3:   deviance =  320.0328
Iteration 4:   deviance =  320.0328

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  320.0327771                    (1/df) Deviance =  .9468425
Pearson          =   341.699231                    (1/df) Pearson  =  1.010944

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1650.151

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .032545    .0064212      5.07    0.000      .0199596     .0451304
       _cons |   -2.483665    .3435565     -7.23    0.000     -3.157023    -1.810306
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar hmcrMedMw1 = "radhlw1"

.
.
. title4 "radhlw1 is a possible mediator for men of hmcare in wave 1"
-------------
radhlw1 is a possible mediator for men of hmcare in wave 1
-------------

. glm radhlw1 avgcumdosew1 if gender==1,  fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1710.3417

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1378.645
Deviance         =  465981.8893                    (1/df) Deviance =  1378.645
Pearson          =  465981.8893                    (1/df) Pearson  =  1378.645

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   10.0726
Log likelihood   = -1710.341694                    BIC             =  464011.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    2.398285    1.208412      1.98    0.047      .0298407     4.766729
       _cons |    44.66477    2.079384     21.48    0.000      40.58925     48.74029
-------------+----------------------------------------------------------------

. glm hp2hmcare radhlw1 if gender==1 , fam(binomial) irls scale(dev) link(probit)

Iteration 1:   deviance =  330.2185
Iteration 2:   deviance =  329.7978
Iteration 3:   deviance =  329.7977
Iteration 4:   deviance =  329.7977

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   329.797656                    (1/df) Deviance =  .9757327
Pearson          =  341.5925114                    (1/df) Pearson  =  1.010629

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1640.386

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |     .008257    .0020717      3.99    0.000      .0041965     .0123175
       _cons |   -1.236257    .1340392     -9.22    0.000     -1.498968    -.9735446
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. title4 "Testing possible female home care mediators for home care in wave 1"
-------------
Testing possible female home care mediators for home care in wave 1
-------------

.
. title4 "Test of age as possible female mediator in wave 1"
-------------
Test of age as possible female mediator in wave 1
-------------

. glm age avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood =  -1406.325

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =   136.455
Deviance         =  49260.25928                    (1/df) Deviance =   136.455
Pearson          =  49260.25928                    (1/df) Pearson  =   136.455

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.759366
Log likelihood   = -1406.325011                    BIC             =  47132.38

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.783267      6.16449
       _cons |    48.88157    .7187038     68.01    0.000      47.47293      50.2902
-------------+----------------------------------------------------------------

. glm hp2hmcare age if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  393.7958
Iteration 2:   deviance =  393.6955
Iteration 3:   deviance =  393.6955
Iteration 4:   deviance =  393.6955

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  393.6954976                    (1/df) Deviance =  1.090569
Pearson          =  375.4421438                    (1/df) Pearson  =  1.040006

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1734.184

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0533501    .0069587      7.67    0.000      .0397113     .0669889
       _cons |   -3.144653    .3710751     -8.47    0.000     -3.871946    -2.417359
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "age is a possible mediator for women"
-------------
age is a possible mediator for women
-------------

.
.
. title4 "Test of b40 as female mediator of home care in wave 1"
-------------
Test of b40 as female mediator of home care in wave 1
-------------

. glm bf40 avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood = -818.49948

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  5.351018
Deviance         =  1931.717442                    (1/df) Deviance =  5.351018
Pearson          =  1931.717442                    (1/df) Pearson  =  5.351018

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  4.520658
Log likelihood   = -818.4994757                    BIC             =  -196.162

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .4524905    .2213302      2.04    0.041      .0186913     .8862898
       _cons |    3.013471    .1423225     21.17    0.000      2.734524     3.292417
-------------+----------------------------------------------------------------

. glm hp2hmcare bf40 if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =   462.764
Iteration 2:   deviance =  462.2054
Iteration 3:   deviance =  462.2053
Iteration 4:   deviance =  462.2053

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  462.2053395                    (1/df) Deviance =  1.280347
Pearson          =  362.3613268                    (1/df) Pearson  =  1.003771

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1665.674

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .0666058    .0327979      2.03    0.042      .0023231     .1308886
       _cons |   -.6159451    .1313241     -4.69    0.000     -.8733356    -.3585546
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "b40 with age is a mediator for women"
-------------
b40 with age is a mediator for women
-------------

.
.
.
. title4 "bf4 Test of female mediation of home care in wave 1"
-------------
bf4 Test of female mediation of home care in wave 1
-------------

. glm bf4 avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood = -1109.0162

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  26.52082
Deviance         =  9574.015672                    (1/df) Deviance =  26.52082
Pearson          =  9574.015672                    (1/df) Pearson  =  26.52082

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.121302
Log likelihood   = -1109.016226                    BIC             =  7446.136

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.474583    -.5430862
       _cons |    10.99384    .3168463     34.70    0.000      10.37284     11.61485
-------------+----------------------------------------------------------------

. glm hp2hmcare bf4 if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  410.1424
Iteration 2:   deviance =  410.1166
Iteration 3:   deviance =  410.1166
Iteration 4:   deviance =  410.1166

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  410.1166157                    (1/df) Deviance =  1.136057
Pearson          =  357.1140873                    (1/df) Pearson  =  .9892357

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1717.763

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1024685    .0149808     -6.84    0.000     -.1318304    -.0731067
       _cons |    .6214741    .1665648      3.73    0.000       .295013     .9479351
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "bf4 alone is a mediator for women"
-------------
bf4 alone is a mediator for women
-------------

.
.
. glm illw1 avgcumdosew1 if gender==2, fam(gauss) link(identity)

Iteration 0:   log likelihood = -259.70777

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  .2462383
Deviance         =  88.89203958                    (1/df) Deviance =  .2462383
Pearson          =  88.89203958                    (1/df) Pearson  =  .2462383

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  1.441916
Log likelihood   = -259.7077741                    BIC             = -2038.987

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0655142    .0474789      1.38    0.168     -.0275426     .1585711
       _cons |    .1570822    .0305304      5.15    0.000      .0972436     .2169207
-------------+----------------------------------------------------------------

. glm hp2hmcare illw1 if gender==2, fam(binomial) link(probit) irls scale(dev)

Iteration 1:   deviance =  451.3594
Iteration 2:   deviance =   450.782
Iteration 3:   deviance =  450.7819
Iteration 4:   deviance =  450.7819

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  450.7819203                    (1/df) Deviance =  1.248703
Pearson          =  362.4981549                    (1/df) Pearson  =   1.00415

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1677.098

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |    .5711151    .1643397      3.48    0.001      .2490151     .8932151
       _cons |   -.5078804    .0821368     -6.18    0.000     -.6688655    -.3468953
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. title4 "multivariate Test of female mediation of home care in wave 1"
-------------
multivariate Test of female mediation of home care in wave 1
-------------

. mvreg bf4 age bf40 = avgcumdosew1 if gender==2

Equation          Obs  Parms        RMSE    "R-sq"          F        P
----------------------------------------------------------------------
bf4               363      2    5.149837    0.0253   9.376729   0.0024
age               363      2     11.6814    0.0338   12.64139   0.0004
bf40              363      2    2.313227    0.0114   4.179627   0.0416

-------------+----------------------------------------------------------------
             |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
bf4          |
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.477832    -.5398375
       _cons |    10.99384    .3168463     34.70    0.000      10.37075     11.61694
-------------+----------------------------------------------------------------
age          |
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.775898     6.171859
       _cons |    48.88157    .7187038     68.01    0.000       47.4682     50.29494
-------------+----------------------------------------------------------------
bf40         |
avgcumdosew1 |    .4524905    .2213302      2.04    0.042       .017232      .887749
       _cons |    3.013471    .1423225     21.17    0.000      2.733585     3.293356
-------------+----------------------------------------------------------------

. glm hp2hmcare bf4 age bf40 if gender==2, fam(binomial) link(probit) irls ///
>   scale(dev)

Iteration 1:   deviance =  373.2413
Iteration 2:   deviance =  372.8437
Iteration 3:   deviance =  372.8436
Iteration 4:   deviance =  372.8436

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  372.8435707                    (1/df) Deviance =  1.038561
Pearson          =  384.2294832                    (1/df) Pearson  =  1.070277

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1743.247

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0701088    .0159082     -4.41    0.000     -.1012882    -.0389293
         age |    .0419129     .007264      5.77    0.000      .0276756     .0561501
        bf40 |   -.0040389    .0340124     -0.12    0.905      -.070702     .0626242
       _cons |   -1.841186    .4704258     -3.91    0.000     -2.763204    -.9191686
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. title4 "When bf4 & age are together" ///
>  "only age & b4 are a wave 1 mediators for women"
-------------
When bf4 & age are together
-------------

.
. glm radhlw1 avgcumdosew1 if gender==2,  fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1821.9477

Generalized linear models                          No. of obs      =       362
Optimization     : ML                              Residual df     =       360
                                                   Scale parameter =  1385.301
Deviance         =  498708.3025                    (1/df) Deviance =  1385.301
Pearson          =  498708.3025                    (1/df) Pearson  =  1385.301

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.07706
Log likelihood   = -1821.947718                    BIC             =  496587.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.789972    3.562254      1.06    0.287     -3.191917     10.77186
       _cons |    55.44948    2.293757     24.17    0.000       50.9538     59.94516
-------------+----------------------------------------------------------------

. glm hp2hmcare radhlw1 if gender==2 , fam(binomial) irls scale(dev) link(probit)

Iteration 1:   deviance =  463.5751
Iteration 2:   deviance =  463.0208
Iteration 3:   deviance =  463.0207
Iteration 4:   deviance =  463.0207

Generalized linear models                          No. of obs      =       362
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  463.0207118                    (1/df) Deviance =  1.286169
Pearson          =  361.7039664                    (1/df) Pearson  =  1.004733

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1657.971

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0034921    .0020846      1.68    0.094     -.0005936     .0075779
       _cons |   -.5996677    .1437134     -4.17    0.000     -.8813409    -.3179945
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. title "Test of female mediation of home care in wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****          Test of female mediation of home care in wave 1            *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:14:13  *****
*******************************************************************************
*******************************************************************************


. mvreg bf4 age bf40 illw1 = avgcumdosew1 if gender==2

Equation          Obs  Parms        RMSE    "R-sq"          F        P
----------------------------------------------------------------------
bf4               363      2    5.149837    0.0253   9.376729   0.0024
age               363      2     11.6814    0.0338   12.64139   0.0004
bf40              363      2    2.313227    0.0114   4.179627   0.0416
illw1             363      2    .4962241    0.0052   1.904017   0.1685

-------------+----------------------------------------------------------------
             |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
bf4          |
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.477832    -.5398375
       _cons |    10.99384    .3168463     34.70    0.000      10.37075     11.61694
-------------+----------------------------------------------------------------
age          |
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.775898     6.171859
       _cons |    48.88157    .7187038     68.01    0.000       47.4682     50.29494
-------------+----------------------------------------------------------------
bf40         |
avgcumdosew1 |    .4524905    .2213302      2.04    0.042       .017232      .887749
       _cons |    3.013471    .1423225     21.17    0.000      2.733585     3.293356
-------------+----------------------------------------------------------------
illw1        |
avgcumdosew1 |    .0655142    .0474789      1.38    0.168     -.0278557     .1588841
       _cons |    .1570822    .0305304      5.15    0.000      .0970423      .217122
-------------+----------------------------------------------------------------

. glm hp2hmcare bf4 age bf40 illw1 if gender==2, fam(binomial) ///
>    link(probit) irls scale(dev)

Iteration 1:   deviance =  368.0172
Iteration 2:   deviance =  367.5924
Iteration 3:   deviance =  367.5922
Iteration 4:   deviance =  367.5922

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       358
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  367.5922256                    (1/df) Deviance =  1.026794
Pearson          =  388.4520039                    (1/df) Pearson  =  1.085061

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1742.604

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0651744      .01601     -4.07    0.000     -.0965533    -.0337954
         age |    .0411498     .007244      5.68    0.000      .0269518     .0553477
        bf40 |   -.0137692    .0343692     -0.40    0.689     -.0811316     .0535933
       illw1 |    .3518084      .15798      2.23    0.026      .0421733     .6614435
       _cons |   -1.887052    .4701989     -4.01    0.000     -2.808625    -.9654796
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. qui: {
When all are together only age and b4 are a wave 1 mediators for women

.
.
. scalar hmcrMedFw1 = "age bf4"

.
. scalar SigDosehmcrMw1 = "no"

. scalar MainEffhmcrMw1 = "age"

. scalar MainEffhmcrFw1 = "age"

. scalar hmcrmedFw1 = "age b4 b40"

. scalar hmcrmedMw1 = "radhlw1"

.
. scalar hmcareMedMw1 = "age "

. scalar hmcareMedFw1 = "age illw1"

. set more off

. scalar list
MainEffhmcrFw1 = age
MainEffhmcrMw1 = age
hmcrMedFw1 = age bf4
hmcrMedMw1 = radhlw1
MainEffwkFw1 = age
MainEffwkMw1 = age
MainEffVactnMw1 = age radhlw1
VactnMedFw1 = age illw1 radhlw1
VactnMedMw1 = age
VacatnModFw1 = none
MainEffVactnFw1 = age radhlw1 bf7m
SigDoseVactnFw1 = no
VactnModMw1 = none
inthobMedFw1 = age bf4 illw1 bf4m
inthobMedMw1 = age
 inthobMw1 = age
InthbModFw1 = none
MainEffInthbFw1 = age radhlw1 bf4
SigdoseInthbFw1 = no
InthbModMw1 = none
MainEffInthbMw1 = age radhlw1 shfamw1
SigDoseInthbMw1 = no
MainEffMw1 = radhlw1 bf4 bf40
sxlifeMedMw1 = radhlw1
sxlifeMedFw1 = age illw1 radhlw1 bf4 bf4m
MainEffsxlifeFw1 = age bf4 bf4m
SigDoseSxlifeFw1 = no
SigDosesxlifeMw1 = no
MainEffsxlifeMw1 = age bf4 bf40
SigDosePrbfmhmMw1 = no
vactnModMw1 = none
SigDoseVactnMw1 = no
SxLifeModFw1 = no
sxlifeModFw1 = none
sxlifeModMw1 = none
MaineffhmcrMw1 = age bf4 bf40
SigDoseMEhmcrW1 = no
PrbfmhmMedFw1 = age bf4
PrbfmhmMedMw1 = age
MainEffPrbfmhmFw1 = age radhlw1 bf4
MainEffPrbfmhmMw1 = age bf4
PrbfmhmModFw1 = none
PrbfmhmModMw1 = none
SigDosePrbfmhmFw1 = no
SigDosePrbfhmMw1 = no
MainEffPrbfhmMw1 = age bf4
MainEffVactnMw2 = age radhlw2
sxlifeMedMw2 = age illw2
SigDoseSxlifeFw2 = no
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m
MainEffPrbsocMw2 = age radhlw2 shjobw2
MainEffhmcrFw2 = age
hmcrMedFw2 = age bf4
MainEffwkFw2 = age
MainEffwkMw2 = age
MainEffPrbsocMw1 = age bf4m
SigdoseMw1 = no
ProbsocMedFw1 = age bf4
ProbsocMedMw1 = radhlw1
ProbsocModFw1 = none
SigDoseProbsocMw1 = no
hmcrmedMw1 = radhlw1
hmcrmedFw1 = age b4 b40
SigdosehmcrFw1 = no
MainEffProbSocFw1 = age radhlw1 avgcumdosew1 shrelaw1 bf4
SigDoseProbsocFw1 = yes
PrbsocModMw1 = shjobw1Xd1 shrelaw1Xd1
 WkhmcrMw1 = age b4
  WkModFw1 = ageXd1
hmcareMedFw1 = age illw1
hmcareMedMw1 = age
SigDosehmcrFw1 = no
  wkMedMw1 = bf40
hmcrModFw1 = none
SigDoseHmcrFw1 = yes
  WkMedMw1 = bf40
hmcrModMw1 = none
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
VactnMedMw2 = age
inthobMedMw2 = age
 inthobMw2 = age
PrbfmhmModMw2 = none
MainEffProbSocFw2 = age radhlw2 avgcumdosew2 bf4
hmcrModMw2 = none
MainEffhmcrMw2 = age
  wkMedFw2 = age b4
  wkMedMw2 = age bf4
MainEffsxlifeMw2 = age bf4 bf40 shjobw2 shrelaw2 radhlw2
MainEffPrbfmhmMw2 = bf4 bf6 bf7
ProbsocMedFw2 = age bf4 radhlw2
hmcareMedFw2 = age bf4
 WkhmcrMw2 = age b4
MainEffhmcrw2 = age
hmcrModFw2 = none
SigDoseHmcrFw2 = yes
NumhmcrModMw2 = none
SigDosehmcrMw2 = no
SigdosehmcrFw2 = yes
hmcrMedMw2 = age ageXillw2
SigDosehmcrFw2 = no
MainEffhmcareMw2 = age
  WkMedMw2 = age ageXillw2
  wkMedFw3 = radhlw3 age ageXillw3 bf40 bf4m bf1
VactnMedFw2 = age illw2 radhlw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 bf7m
SigDoseVactnFw2 = no
VactnModMw2 = none
vactnModMw2 = none
SigDoseVactnMw2 = no
inthobMedFw2 = age bf4 illw2 bf4m
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
InthbModMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
MainEffMw2 = radhlw2 bf4 bf40
SigdoseMEinthob = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
SxLifeModFw2 = no
sxlifeModFw2 = none
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf4 bf6 bf7
ProbsocMedMw2 = age
ProbsocModFw2 = none
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
PrbsocModMw2 = none
SigdoseMw2 = none
hmcareMedMw2 = age
hmcareModFw2 = none
MainEffhmcarew2 = age
SigdoseHmcareFw2 = no
hmcareModMw2 = none
SigDoseHmcareMw2 = no
NameMedMw2 = age ageXillw2
 NumModMw2 = none
SigDosehmcareMw2 = no
SigDoseWKMw2 = no
  WkMedFw2 = age bf4
  WkModFw2 = none
  WKModMw2 = none
SigDoseWkMw2 = no
SigDoseWkFw2 = no
SigDoseFw2 = no
  wkModFw2 = none
  wkModMw2 = none
VactnMedFw3 = age illw3 radhlw3
VactnMedMw3 = age illw3
VacatnModFw3 = none
MainEffVactnFw3 = age radhlw3 deaw3
SigDoseVactnFw3 = no
vactnModMw3 = none
MainEffVactnMw3 = age bf7m radhlw3
SigDoseVactnMw3 = no
sxLifeMedFw3 = age bf4 bf4m
sxLifeMedMw3 = age illw3
InthbModFw3 = none
MainEffInthbFw3 = age radhlw3 bf4
SigdoseInthbFw3 = no
  InthbMw3 = none
MainEffInthbMw3 = age radhlw3 shfamw3
SigDoseInthbMw3 = no
sxlifeMedFw3 = age illw3 radhlw3 bf4 bf4m
sxlifeMedMw3 = age illw3
sxlifeModFw3 = none
MainEffsxlifeFw3 = age radhlw3 bf4 bf4m shrelaw3 shfamw3
SigDoseSxlifeFw3 = no
sxlifeModMw3 = none
SigDosesxlifeMw3 = no
MainEffsxlifeMw3 = age bf4 illw3 radhlw3
PrbfmhmMedFw3 = age bf4
PrbfmhmMedMw3 = age
PrbfmhmModFw3 = none
MainEffPrbfmhmFw3 = age bf4 bf40
SigDosePrbfmhmFw3 = no
PrbfmhmModw3 = none
SigDosePrbfmhmMw3 = no
SigDosePrbfhmMw3 = no
MainEffPrbfhmMw3 = bf1 bf4 dvcew3 bf7m
ProbsocMedFw3 = age radhlw3
ProbsocMedMw3 = age
ProbsocModFw3 = none
MainEffProbSocFw3 = age radhlw3 illw3 Shrelaw3 avgcumodsew3
SigDoseProbsocFw3 = yes
ProbSocModMw3 = none
SigDoseProbsocMw3 = no
MainEffPrbsocMw3 = age radhlw3 shjobw3
hmcareMedFw3 = age illw3
hmcareMedMw3 = age illw3
hmcareModFw3 = none
SigdoseHmcareFw3 = no
hmcareModMw3 = none
MainEffhmcareMw3 = none
SigDoseHmcareMw3 = no
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

.
. * conclusion "age & illw1 are main effects as possible male & female mediators"
. * conclusion title "their interaction is not a mediator"
.
. title4 "2. summary matrix construction for H1 pt 2 wave 1 dose=>Home care impact"
-------------
2. summary matrix construction for H1 pt 2 wave 1 dose=>Home care impact
-------------

. set more off

.  matrix define   hmcrMw1 = J(1,8, 0)

.         matrix define  hmcrFw1 = J(1,8, 0)

. matrix colnames  hmcrMw1=  hypnum ptnum wave gender medsig numMAsig numModsig ///
>     numMed

. matrix colnames  hmcrFw1=  hypnum ptnum wave gender medsig numMAsig numModsig ///
>     numMed

.     matrix rownames  hmcrMw1 = hmcareM

.     matrix rownames  hmcrFw1 = hmcareF

.         matrix define  hmcrMw1= (1, 2, 1, 1, 0 , 2,  0  , 1 )

.          matrix define  hmcrFw1= (1, 2, 1, 2, 0 ,2,  0  , 2 )

.         matrix define H1pt2w1 = ( wkMw1 \  wkFw1 \  hmcrMw1 \ hmcrFw1)

.     matrix colnames H1pt2w1 =  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix colnames H1pt2w1 =  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix rownames H1pt2w1 =  wkMw1 wkFw1  hmcrMw1  hmcrFw1

.         matlist H1pt2w1

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
wkMw1   |         1            2            1            1            0            2            0            1
wkFw1   |         1            2            1            2            0            1            1            2
hmcrMw1   |         1            2            1            1            0            2            0            1
hmcrFw1   |         1            2            1            2            0            2            0            2

.
. * see scalar list for names of variables
. scalar list
MainEffhmcrFw1 = age
MainEffhmcrMw1 = age
hmcrMedFw1 = age bf4
hmcrMedMw1 = radhlw1
MainEffwkFw1 = age
MainEffwkMw1 = age
MainEffVactnMw1 = age radhlw1
VactnMedFw1 = age illw1 radhlw1
VactnMedMw1 = age
VacatnModFw1 = none
MainEffVactnFw1 = age radhlw1 bf7m
SigDoseVactnFw1 = no
VactnModMw1 = none
inthobMedFw1 = age bf4 illw1 bf4m
inthobMedMw1 = age
 inthobMw1 = age
InthbModFw1 = none
MainEffInthbFw1 = age radhlw1 bf4
SigdoseInthbFw1 = no
InthbModMw1 = none
MainEffInthbMw1 = age radhlw1 shfamw1
SigDoseInthbMw1 = no
MainEffMw1 = radhlw1 bf4 bf40
sxlifeMedMw1 = radhlw1
sxlifeMedFw1 = age illw1 radhlw1 bf4 bf4m
MainEffsxlifeFw1 = age bf4 bf4m
SigDoseSxlifeFw1 = no
SigDosesxlifeMw1 = no
MainEffsxlifeMw1 = age bf4 bf40
SigDosePrbfmhmMw1 = no
vactnModMw1 = none
SigDoseVactnMw1 = no
SxLifeModFw1 = no
sxlifeModFw1 = none
sxlifeModMw1 = none
MaineffhmcrMw1 = age bf4 bf40
SigDoseMEhmcrW1 = no
PrbfmhmMedFw1 = age bf4
PrbfmhmMedMw1 = age
MainEffPrbfmhmFw1 = age radhlw1 bf4
MainEffPrbfmhmMw1 = age bf4
PrbfmhmModFw1 = none
PrbfmhmModMw1 = none
SigDosePrbfmhmFw1 = no
SigDosePrbfhmMw1 = no
MainEffPrbfhmMw1 = age bf4
MainEffVactnMw2 = age radhlw2
sxlifeMedMw2 = age illw2
SigDoseSxlifeFw2 = no
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m
MainEffPrbsocMw2 = age radhlw2 shjobw2
MainEffhmcrFw2 = age
hmcrMedFw2 = age bf4
MainEffwkFw2 = age
MainEffwkMw2 = age
MainEffPrbsocMw1 = age bf4m
SigdoseMw1 = no
ProbsocMedFw1 = age bf4
ProbsocMedMw1 = radhlw1
ProbsocModFw1 = none
SigDoseProbsocMw1 = no
hmcrmedMw1 = radhlw1
hmcrmedFw1 = age b4 b40
SigdosehmcrFw1 = no
MainEffProbSocFw1 = age radhlw1 avgcumdosew1 shrelaw1 bf4
SigDoseProbsocFw1 = yes
PrbsocModMw1 = shjobw1Xd1 shrelaw1Xd1
 WkhmcrMw1 = age b4
  WkModFw1 = ageXd1
hmcareMedFw1 = age illw1
hmcareMedMw1 = age
SigDosehmcrFw1 = no
  wkMedMw1 = bf40
hmcrModFw1 = none
SigDoseHmcrFw1 = yes
  WkMedMw1 = bf40
hmcrModMw1 = none
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
VactnMedMw2 = age
inthobMedMw2 = age
 inthobMw2 = age
PrbfmhmModMw2 = none
MainEffProbSocFw2 = age radhlw2 avgcumdosew2 bf4
hmcrModMw2 = none
MainEffhmcrMw2 = age
  wkMedFw2 = age b4
  wkMedMw2 = age bf4
MainEffsxlifeMw2 = age bf4 bf40 shjobw2 shrelaw2 radhlw2
MainEffPrbfmhmMw2 = bf4 bf6 bf7
ProbsocMedFw2 = age bf4 radhlw2
hmcareMedFw2 = age bf4
 WkhmcrMw2 = age b4
MainEffhmcrw2 = age
hmcrModFw2 = none
SigDoseHmcrFw2 = yes
NumhmcrModMw2 = none
SigDosehmcrMw2 = no
SigdosehmcrFw2 = yes
hmcrMedMw2 = age ageXillw2
SigDosehmcrFw2 = no
MainEffhmcareMw2 = age
  WkMedMw2 = age ageXillw2
  wkMedFw3 = radhlw3 age ageXillw3 bf40 bf4m bf1
VactnMedFw2 = age illw2 radhlw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 bf7m
SigDoseVactnFw2 = no
VactnModMw2 = none
vactnModMw2 = none
SigDoseVactnMw2 = no
inthobMedFw2 = age bf4 illw2 bf4m
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
InthbModMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
MainEffMw2 = radhlw2 bf4 bf40
SigdoseMEinthob = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
SxLifeModFw2 = no
sxlifeModFw2 = none
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf4 bf6 bf7
ProbsocMedMw2 = age
ProbsocModFw2 = none
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
PrbsocModMw2 = none
SigdoseMw2 = none
hmcareMedMw2 = age
hmcareModFw2 = none
MainEffhmcarew2 = age
SigdoseHmcareFw2 = no
hmcareModMw2 = none
SigDoseHmcareMw2 = no
NameMedMw2 = age ageXillw2
 NumModMw2 = none
SigDosehmcareMw2 = no
SigDoseWKMw2 = no
  WkMedFw2 = age bf4
  WkModFw2 = none
  WKModMw2 = none
SigDoseWkMw2 = no
SigDoseWkFw2 = no
SigDoseFw2 = no
  wkModFw2 = none
  wkModMw2 = none
VactnMedFw3 = age illw3 radhlw3
VactnMedMw3 = age illw3
VacatnModFw3 = none
MainEffVactnFw3 = age radhlw3 deaw3
SigDoseVactnFw3 = no
vactnModMw3 = none
MainEffVactnMw3 = age bf7m radhlw3
SigDoseVactnMw3 = no
sxLifeMedFw3 = age bf4 bf4m
sxLifeMedMw3 = age illw3
InthbModFw3 = none
MainEffInthbFw3 = age radhlw3 bf4
SigdoseInthbFw3 = no
  InthbMw3 = none
MainEffInthbMw3 = age radhlw3 shfamw3
SigDoseInthbMw3 = no
sxlifeMedFw3 = age illw3 radhlw3 bf4 bf4m
sxlifeMedMw3 = age illw3
sxlifeModFw3 = none
MainEffsxlifeFw3 = age radhlw3 bf4 bf4m shrelaw3 shfamw3
SigDoseSxlifeFw3 = no
sxlifeModMw3 = none
SigDosesxlifeMw3 = no
MainEffsxlifeMw3 = age bf4 illw3 radhlw3
PrbfmhmMedFw3 = age bf4
PrbfmhmMedMw3 = age
PrbfmhmModFw3 = none
MainEffPrbfmhmFw3 = age bf4 bf40
SigDosePrbfmhmFw3 = no
PrbfmhmModw3 = none
SigDosePrbfmhmMw3 = no
SigDosePrbfhmMw3 = no
MainEffPrbfhmMw3 = bf1 bf4 dvcew3 bf7m
ProbsocMedFw3 = age radhlw3
ProbsocMedMw3 = age
ProbsocModFw3 = none
MainEffProbSocFw3 = age radhlw3 illw3 Shrelaw3 avgcumodsew3
SigDoseProbsocFw3 = yes
ProbSocModMw3 = none
SigDoseProbsocMw3 = no
MainEffPrbsocMw3 = age radhlw3 shjobw3
hmcareMedFw3 = age illw3
hmcareMedMw3 = age illw3
hmcareModFw3 = none
SigdoseHmcareFw3 = no
hmcareModMw3 = none
MainEffhmcareMw3 = none
SigDoseHmcareMw3 = no
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

.
.
. * X * missing the number of main effects in the trimmed models
.
. ////////////////////////////////////////////////////////////////////////
> *--------- Chunk 4  Dose social problem impact relationship HP2probsoc
.
.
. title "3.  H1 part 2 wave 1  Dose - HP2probsoc impact tested"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       3.  H1 part 2 wave 1  Dose - HP2probsoc impact tested         *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:14:16  *****
*******************************************************************************
*******************************************************************************


.
. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
.   foreach var in HP2probsoc {
  5.       forvalues k=1/2 {
  6. di _skip(4)
  7. di as input "Full main model for `var' for wave= `j' "
  8. di _skip(4)
  9. di as input  "chunk 4 H1 test:Gender= `k'  model Wave =  `j' for `e(depvar)' "
 10. di _skip(4)
 11.
.
.       xi: logistic `var' age i.educ occ1w`j'-occ8w`j' ///
>                 marrw`j'1- marrw`j'3 marrw`j'5-marrw`j'6 inc1w`j'-inc4w`j' ///
>                 radhlw`j' havmil avgcumdosew`j' `w`j'bf'  ///
>                  deaw`j' dvcew`j' sepaw`j' accdw`j' movew`j' ///
>                 illw`j' shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j' ///
>                  havmilsq if gender==`k', coef  difficult iterate(50)
 12.                         estat class
 13.                         estat gof
 14.                         fitstat
 15. }
 16. }
 17. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


Full main model for HP2probsoc for wave= 1

chunk 4 H1 test:Gender= 1  model Wave =  1 for hp2hmcare

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 13 obs not used

note: _Ieduc_7 != 0 predicts failure perfectly
      _Ieduc_7 dropped and 4 obs not used

note: _Ieduc_8 != 0 predicts failure perfectly
      _Ieduc_8 dropped and 2 obs not used

note: occ6w1 != 0 predicts failure perfectly
      occ6w1 dropped and 5 obs not used

note: occ7w1 != 0 predicts failure perfectly
      occ7w1 dropped and 4 obs not used

note: marrw12 != 0 predicts failure perfectly
      marrw12 dropped and 4 obs not used

note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 19 obs not used

note: _Ieduc_6 omitted because of collinearity
note: marrw16 omitted because of collinearity

Logistic regression                               Number of obs   =        288
                                                  LR chi2(43)     =     122.03
                                                  Prob > chi2     =     0.0000
Log likelihood = -56.842934                       Pseudo R2       =     0.5177

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0932157    .0488397      1.91    0.056     -.0025083     .1889398
    _Ieduc_2 |   -1.534787    1.373444     -1.12    0.264     -4.226687     1.157114
    _Ieduc_3 |   -2.172657    .8355094     -2.60    0.009     -3.810226    -.5350887
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    -1.97152    1.083493     -1.82    0.069     -4.095126     .1520862
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w1 |    .4116733    2.029299      0.20    0.839     -3.565679     4.389026
      occ2w1 |    1.622509    2.037766      0.80    0.426     -2.371439     5.616456
      occ3w1 |    1.707699    2.267987      0.75    0.451     -2.737474     6.152872
      occ4w1 |    .8391363    2.160815      0.39    0.698     -3.395982     5.074255
      occ5w1 |    .2067084    2.315894      0.09    0.929      -4.33236     4.745777
      occ6w1 |           0   (omitted)
      occ7w1 |           0   (omitted)
      occ8w1 |    1.657954    2.464035      0.67    0.501     -3.171466     6.487374
     marrw11 |    8.254014    1282.599      0.01    0.995     -2505.595     2522.103
     marrw12 |           0   (omitted)
     marrw13 |    6.455541      1282.6      0.01    0.996     -2507.394     2520.305
     marrw15 |    45.60071    8350.823      0.01    0.996     -16321.71     16412.91
     marrw16 |           0   (omitted)
      inc1w1 |   -4.624348    2.584817     -1.79    0.074     -9.690496     .4418005
      inc2w1 |   -1.315065    2.130506     -0.62    0.537     -5.490781     2.860651
      inc3w1 |   -.8805899    2.024434     -0.43    0.664     -4.848408     3.087229
      inc4w1 |   -3.930393    2.652434     -1.48    0.138     -9.129068     1.268283
     radhlw1 |    -.003808    .0098127     -0.39    0.698     -.0230405     .0154246
      havmil |    .0037068    .0075299      0.49    0.623     -.0110516     .0184652
avgcumdosew1 |    .1390885    .1022549      1.36    0.174     -.0613275     .3395044
         bf1 |    .0837527    .0660851      1.27    0.205     -.0457717     .2132771
         bf4 |   -.1765285    .2854179     -0.62    0.536     -.7359372     .3828802
         bf9 |    .0121714     .045033      0.27    0.787     -.0760915     .1004344
        bf10 |   -.0731627    .0326403     -2.24    0.025     -.1371365    -.0091889
        bf11 |   -.0133658    .0915598     -0.15    0.884     -.1928197     .1660881
        bf4m |   -.1819261    .2441274     -0.75    0.456     -.6604069     .2965547
       bf15m |           0   (omitted)
        bf20 |   -.0741254    .0559936     -1.32    0.186     -.1838707       .03562
        bf22 |    .0002567    .0001585      1.62    0.105      -.000054     .0005673
        bf30 |   -.0003312    .0005407     -0.61    0.540     -.0013911     .0007286
        bf40 |   -.1589223     .268107     -0.59    0.553     -.6844023     .3665577
       deaw1 |     .073587    .5137846      0.14    0.886     -.9334124     1.080586
      dvcew1 |   -33.19213    8251.737     -0.00    0.997      -16206.3     16139.92
      sepaw1 |    21.75582    8052.548      0.00    0.998     -15760.95     15804.46
      accdw1 |    1.124538    1.440947      0.78    0.435     -1.699667     3.948743
      movew1 |    .4856006    .9962789      0.49    0.626      -1.46707     2.438271
       illw1 |    .1109162     .620821      0.18    0.858     -1.105871     1.327703
     shfamw1 |   -.0009812    .0110299     -0.09    0.929     -.0225994      .020637
      shhlw1 |    .0236901    .0186204      1.27    0.203     -.0128052     .0601853
     shjobw1 |    .0162037    .0119225      1.36    0.174     -.0071639     .0395713
    shrelaw1 |   -.0240964    .0119609     -2.01    0.044     -.0475394    -.0006534
     suprtw1 |    .0381166    .0331693      1.15    0.250      -.026894     .1031273
     suchrw1 |   -.0419264     .049205     -0.85    0.394     -.1383664     .0545135
    havmilsq |   -5.12e-06    .0000107     -0.48    0.632     -.0000261     .0000159
       _cons |   -6.454218    1282.606     -0.01    0.996     -2520.316     2507.407
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        26             6  |         32
     -     |        15           241  |        256
-----------+--------------------------+-----------
   Total   |        41           247  |        288

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   63.41%
Specificity                     Pr( -|~D)   97.57%
Positive predictive value       Pr( D| +)   81.25%
Negative predictive value       Pr(~D| -)   94.14%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.43%
False - rate for true D         Pr( -| D)   36.59%
False + rate for classified +   Pr(~D| +)   18.75%
False - rate for classified -   Pr( D| -)    5.86%
--------------------------------------------------
Correctly classified                        92.71%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       288
 number of covariate patterns =       288
            Pearson chi2(244) =       239.99
                  Prob > chi2 =         0.5605

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -117.857     Log-Lik Full Model:          -56.843
D(235):                      113.686     LR(43):                      122.029
                                         Prob > LR:                     0.000
McFadden's R2:                 0.518     McFadden's Adj R2:             0.068
Maximum Likelihood R2:         0.345     Cragg & Uhler's R2:            0.618
McKelvey and Zavoina's R2:     0.804     Efron's R2:                    0.535
Variance of y*:               16.818     Variance of error:             3.290
Count R2:                      0.927     Adj Count R2:                  0.488
AIC:                           0.763     AIC*n:                       219.686
BIC:                       -1217.110     BIC':                        121.479

Full main model for HP2probsoc for wave= 1

chunk 4 H1 test:Gender= 2  model Wave =  1 for HP2probsoc

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 11 obs not used

note: _Ieduc_8 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        347
                                                  LR chi2(49)     =     174.17
                                                  Prob > chi2     =     0.0000
Log likelihood =  -92.74522                       Pseudo R2       =     0.4843

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1339222    .0304099      4.40    0.000        .07432     .1935245
    _Ieduc_2 |    -14.8519    3.844577     -3.86    0.000     -22.38714    -7.316671
    _Ieduc_3 |   -15.07441    3.702435     -4.07    0.000     -22.33105    -7.817769
    _Ieduc_4 |    -15.0354     3.71929     -4.04    0.000     -22.32507    -7.745721
    _Ieduc_5 |   -15.31894    3.642287     -4.21    0.000     -22.45769    -8.180187
    _Ieduc_6 |   -15.97033    3.721806     -4.29    0.000     -23.26493    -8.675722
    _Ieduc_7 |   -14.57197    4.858518     -3.00    0.003     -24.09449    -5.049449
    _Ieduc_8 |           0   (omitted)
      occ1w1 |   -2.855851    2.862357     -1.00    0.318     -8.465967     2.754266
      occ2w1 |   -2.736414    2.877102     -0.95    0.342     -8.375431     2.902603
      occ3w1 |   -3.494041    2.901139     -1.20    0.228     -9.180168     2.192087
      occ4w1 |   -3.424951    2.969387     -1.15    0.249     -9.244843     2.394942
      occ5w1 |   -4.951372    3.138113     -1.58    0.115     -11.10196     1.199216
      occ6w1 |   -4.529022    3.152748     -1.44    0.151     -10.70829     1.650251
      occ7w1 |   -2.040185    2.865556     -0.71    0.476     -7.656572     3.576202
      occ8w1 |   -1.038951    3.012173     -0.34    0.730     -6.942703       4.8648
     marrw11 |   -3.017556    2.506541     -1.20    0.229     -7.930285     1.895174
     marrw12 |   -1.448781    2.689444     -0.54    0.590     -6.719994     3.822432
     marrw13 |   -2.818836    2.317521     -1.22    0.224     -7.361093     1.723421
     marrw15 |   -4.022412    2.774385     -1.45    0.147     -9.460106     1.415282
     marrw16 |   -3.024951     2.89161     -1.05    0.296     -8.692402       2.6425
      inc1w1 |    1.652153    2.826464      0.58    0.559     -3.887614     7.191921
      inc2w1 |    .7523029    2.773835      0.27    0.786     -4.684314     6.188919
      inc3w1 |    .8186418     2.79302      0.29    0.769     -4.655577      6.29286
      inc4w1 |    1.416767    2.932929      0.48    0.629     -4.331668     7.165203
     radhlw1 |    .0078893    .0071763      1.10    0.272     -.0061759     .0219546
      havmil |   -.0016014    .0088347     -0.18    0.856      -.018917     .0157143
avgcumdosew1 |    .9064706    .4019796      2.26    0.024      .1186049     1.694336
         bf1 |     .035394    .0349482      1.01    0.311     -.0331032     .1038912
         bf4 |   -.3079106    .2679557     -1.15    0.251     -.8330942      .217273
         bf9 |   -.0727705     .032505     -2.24    0.025     -.1364792    -.0090617
        bf10 |   -.0269165    .0168597     -1.60    0.110      -.059961     .0061279
        bf11 |   -.0076362    .0541236     -0.14    0.888     -.1137164     .0984441
        bf4m |    .0576549    .2545602      0.23    0.821      -.441274     .5565838
       bf15m |           0   (omitted)
        bf20 |   -.0388067    .0274447     -1.41    0.157     -.0925973     .0149838
        bf22 |    .0001098    .0001019      1.08    0.281     -.0000899     .0003094
        bf30 |    .0003325    .0003748      0.89    0.375      -.000402      .001067
        bf40 |   -.1036356    .1492079     -0.69    0.487     -.3960777     .1888066
       deaw1 |   -.1970026    .3234174     -0.61    0.542      -.830889     .4368837
      dvcew1 |    1.249232    2.862648      0.44    0.663     -4.361455     6.859919
      sepaw1 |   -.7111444    3.235109     -0.22    0.826     -7.051842     5.629553
      accdw1 |   -.7069674    1.124581     -0.63    0.530     -2.911106     1.497171
      movew1 |    .3733727    .7129786      0.52    0.601      -1.02404     1.770785
       illw1 |   -.2000586    .4406407     -0.45    0.650     -1.063699     .6635813
     shfamw1 |    -.014563     .009194     -1.58    0.113     -.0325829      .003457
      shhlw1 |   -.0149441    .0130685     -1.14    0.253     -.0405578     .0106697
     shjobw1 |    .0015703    .0091986      0.17    0.864     -.0164586     .0195992
    shrelaw1 |   -.0082661    .0085598     -0.97    0.334     -.0250429     .0085107
     suprtw1 |    .0056689    .0131922      0.43    0.667     -.0201873     .0315251
     suchrw1 |   -.0127124    .0182568     -0.70    0.486     -.0484951     .0230702
    havmilsq |   -1.64e-06    .0000208     -0.08    0.937     -.0000424     .0000391
       _cons |    15.72467           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 1 failure and 1 success completely determined.


Warning: convergence not achieved

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        46            12  |         58
     -     |        28           261  |        289
-----------+--------------------------+-----------
   Total   |        74           273  |        347

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   62.16%
Specificity                     Pr( -|~D)   95.60%
Positive predictive value       Pr( D| +)   79.31%
Negative predictive value       Pr(~D| -)   90.31%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.40%
False - rate for true D         Pr( -| D)   37.84%
False + rate for classified +   Pr(~D| +)   20.69%
False - rate for classified -   Pr( D| -)    9.69%
--------------------------------------------------
Correctly classified                        88.47%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       347
 number of covariate patterns =       347
            Pearson chi2(296) =       277.13
                  Prob > chi2 =         0.7779

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -179.829     Log-Lik Full Model:          -92.745
D(294):                      185.490     LR(49):                      174.168
                                         Prob > LR:                     0.000
McFadden's R2:                 0.484     McFadden's Adj R2:             0.190
Maximum Likelihood R2:         0.395     Cragg & Uhler's R2:            0.612
McKelvey and Zavoina's R2:     0.757     Efron's R2:                    0.511
Variance of y*:               13.536     Variance of error:             3.290
Count R2:                      0.885     Adj Count R2:                  0.459
AIC:                           0.840     AIC*n:                       291.490
BIC:                       -1534.211     BIC':                        112.449

.
. *-----Chunk 4 dose3 social problem impact--------------no sig dose main effect--
. title4 "Male trimmed models of dose and HP2probsoc relationship in wave 1"
-------------
Male trimmed models of dose and HP2probsoc relationship in wave 1
-------------

. * male models
.         forvalues j=1/1 {
  2. set more off
  3. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  4. title4 "trimmed HP2probsoc main effects models wave 1 for H1 part 2 with dose ns"
  5. title4 "wave 1 dose HP2probsoc relationship but avgcumdosew`j': Dose not signif"
  6. sw, pr(.1): logit HP2probsoc age radhlw1 accdw`j' `w`j'bf'  shjobw`j'  havmilsq ///
>     avgcumdosew`j' shhlw`j'  shrelaw`j' if gender==1
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }
-------------
trimmed HP2probsoc main effects models wave 1 for H1 part 2 with dose ns
-------------
-------------
wave 1 dose HP2probsoc relationship but avgcumdosew1: Dose not signif
-------------
note: bf15m dropped because of estimability
note: o.bf15m dropped because of estimability
note: 21 obs. dropped because of estimability


  begin with full model


p = 0.8569 >= 0.1000  removing accdw1


p = 0.8345 >= 0.1000  removing bf4


p = 0.6090 >= 0.1000  removing havmilsq


p = 0.5895 >= 0.1000  removing radhlw1


p = 0.6078 >= 0.1000  removing bf40


p = 0.5292 >= 0.1000  removing bf20


p = 0.7236 >= 0.1000  removing bf1


p = 0.3440 >= 0.1000  removing bf11


p = 0.3090 >= 0.1000  removing bf10


p = 0.2900 >= 0.1000  removing bf9


p = 0.3215 >= 0.1000  removing bf30


p = 0.2860 >= 0.1000  removing bf22


p = 0.1710 >= 0.1000  removing avgcumdosew1


p = 0.1317 >= 0.1000  removing shhlw1


p = 0.1690 >= 0.1000  removing shrelaw1


p = 0.1067 >= 0.1000  removing shjobw1


Logistic regression                               Number of obs   =        319
                                                  LR chi2(2)      =      71.57
                                                  Prob > chi2     =     0.0000
Log likelihood = -86.576328                       Pseudo R2       =     0.2925

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0381014    .0181494      2.10    0.036      .0025293     .0736736
        bf4m |   -.2064677    .0337163     -6.12    0.000     -.2725504     -.140385
       _cons |   -.2900951    1.272585     -0.23    0.820     -2.784316     2.204126
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        13             6  |         19
     -     |        28           272  |        300
-----------+--------------------------+-----------
   Total   |        41           278  |        319

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   31.71%
Specificity                     Pr( -|~D)   97.84%
Positive predictive value       Pr( D| +)   68.42%
Negative predictive value       Pr(~D| -)   90.67%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.16%
False - rate for true D         Pr( -| D)   68.29%
False + rate for classified +   Pr(~D| +)   31.58%
False - rate for classified -   Pr( D| -)    9.33%
--------------------------------------------------
Correctly classified                        89.34%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       319
 number of covariate patterns =       220
            Pearson chi2(217) =       200.09
                  Prob > chi2 =         0.7885

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -122.361     Log-Lik Full Model:          -86.576
D(316):                      173.153     LR(2):                        71.569
                                         Prob > LR:                     0.000
McFadden's R2:                 0.292     McFadden's Adj R2:             0.268
Maximum Likelihood R2:         0.201     Cragg & Uhler's R2:            0.375
McKelvey and Zavoina's R2:     0.372     Efron's R2:                    0.293
Variance of y*:                5.240     Variance of error:             3.290
Count R2:                      0.893     Adj Count R2:                  0.171
AIC:                           0.562     AIC*n:                       179.153
BIC:                       -1648.648     BIC':                        -60.039

. title4 "Trimmed male main effects model"
-------------
Trimmed male main effects model
-------------

. forvalues j=1/1 {
  2. title "trimmed HP2probsoc main effects models wave `j'" " for H1 part 2 with dose ns"
  3. title2 "Wave `j dose HP2work relationship but avgcumdosew`j': Dose not signif"
  4. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****           trimmed HP2probsoc main effects models wave 1             *****
*****                     for H1 part 2 with dose ns                      *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:14:47  *****
*******************************************************************************
*******************************************************************************


-------------
title2: Wave `j dose HP2work relationship but avgcumdosew1: Dose not signif
                                       Date and time:  18 Jun 2012    18:14:47
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
                                       Stata data file:  chwide16june2012.dta  has  2382  variables and  703  observations

Wave `j dose HP2work relationship but avgcumdosew1: Dose not signif
-------------

.
. logit HP2probsoc age radhlw1 bf4m  if gender==1

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -98.286147
Iteration 2:   log likelihood = -88.284687
Iteration 3:   log likelihood = -87.790699
Iteration 4:   log likelihood = -87.789842
Iteration 5:   log likelihood = -87.789842

Logistic regression                               Number of obs   =        340
                                                  LR chi2(3)      =      74.73
                                                  Prob > chi2     =     0.0000
Log likelihood = -87.789842                       Pseudo R2       =     0.2985

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0408433    .0180763      2.26    0.024      .0054145     .0762722
     radhlw1 |    .0025885    .0057387      0.45    0.652     -.0086592     .0138361
        bf4m |   -.1982136    .0358985     -5.52    0.000     -.2685733    -.1278538
       _cons |   -.7777696    1.352662     -0.57    0.565     -3.428938     1.873399
-------------+----------------------------------------------------------------

.
.
. scalar SigdoseMw1 = "no"

. scalar MainEffPrbsocMw1 = "age bf4m"

.
.
. foreach var in bf4 age radhlw1 shjobw1 shrelaw1 {
  2.  cap gen `var'Xd1= `var'*avgcumdosew1
  3.  }

.
.
.
. forvalues j=1/1 {
  2.   set more off
  3.   title "Main effects Dose ProbSoc model for males"
  4.   logit HP2probsoc age avgcumdosew1 radhlw1 shjobw`j' ///
>        ageXd1 radhlw1Xd1 shjobw1Xd1 shrelaw1Xd1 if gender==1
  5.                         estat class
  6.                         estat gof
  7.                         fitstat
  8. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****             Main effects Dose ProbSoc model for males               *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:14:48  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -96.957486
Iteration 2:   log likelihood =    -91.634
Iteration 3:   log likelihood = -90.570723
Iteration 4:   log likelihood = -90.307985
Iteration 5:   log likelihood = -90.296231
Iteration 6:   log likelihood = -90.296206
Iteration 7:   log likelihood = -90.296206

Logistic regression                               Number of obs   =        340
                                                  LR chi2(8)      =      69.71
                                                  Prob > chi2     =     0.0000
Log likelihood = -90.296206                       Pseudo R2       =     0.2785

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0348678    .0289544      1.20    0.229     -.0218818     .0916174
avgcumdosew1 |   -13.34838    6.796946     -1.96    0.050     -26.67015    -.0266126
     radhlw1 |    .0078565    .0063701      1.23    0.217     -.0046287     .0203416
     shjobw1 |    .0100379     .010521      0.95    0.340     -.0105828     .0306587
      ageXd1 |    .1331427    .1074383      1.24    0.215     -.0774326     .3437179
  radhlw1Xd1 |    .0060028    .0144906      0.41    0.679     -.0223983     .0344039
  shjobw1Xd1 |    .0795578    .0390013      2.04    0.041      .0031166      .155999
 shrelaw1Xd1 |   -.0381989     .015358     -2.49    0.013        -.0683    -.0080977
       _cons |   -4.518141     1.78078     -2.54    0.011     -8.008406    -1.027877
-------------+----------------------------------------------------------------


Note: 2 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        10             3  |         13
     -     |        31           296  |        327
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   24.39%
Specificity                     Pr( -|~D)   99.00%
Positive predictive value       Pr( D| +)   76.92%
Negative predictive value       Pr(~D| -)   90.52%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.00%
False - rate for true D         Pr( -| D)   75.61%
False + rate for classified +   Pr(~D| +)   23.08%
False - rate for classified -   Pr( D| -)    9.48%
--------------------------------------------------
Correctly classified                        90.00%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       331
            Pearson chi2(322) =       260.41
                  Prob > chi2 =         0.9950

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -90.296
D(331):                      180.592     LR(8):                        69.712
                                         Prob > LR:                     0.000
McFadden's R2:                 0.279     McFadden's Adj R2:             0.207
Maximum Likelihood R2:         0.185     Cragg & Uhler's R2:            0.356
McKelvey and Zavoina's R2:     0.588     Efron's R2:                    0.248
Variance of y*:                7.976     Variance of error:             3.290
Count R2:                      0.900     Adj Count R2:                  0.171
AIC:                           0.584     AIC*n:                       198.592
BIC:                       -1748.789     BIC':                        -23.081

.
. title4 "male wave 1 moderators of dose and hmcare"
-------------
male wave 1 moderators of dose and hmcare
-------------

. scalar PrbsocModMw1 = "shjobw1Xd1 shrelaw1Xd1"

.
. forvalues j=1/1 {
  2. set more off
  3.   logit HP2probsoc age  radhlw1 shjobw`j' shrelaw1 ///
>       avgcumdosew`j'  shrelaw`j'Xd1 ///
>        shjobw1Xd1 if gender==1
  4.                         estat class
  5.                         estat gof
  6.                         fitstat
  7. }

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -98.199364
Iteration 2:   log likelihood = -91.871369
Iteration 3:   log likelihood = -91.382931
Iteration 4:   log likelihood = -91.279919
Iteration 5:   log likelihood = -91.277661
Iteration 6:   log likelihood = -91.277658

Logistic regression                               Number of obs   =        340
                                                  LR chi2(7)      =      67.75
                                                  Prob > chi2     =     0.0000
Log likelihood = -91.277658                       Pseudo R2       =     0.2707

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .065245    .0168011      3.88    0.000      .0323155     .0981744
     radhlw1 |    .0097595    .0055022      1.77    0.076     -.0010247     .0205437
     shjobw1 |    .0098453    .0120807      0.81    0.415     -.0138324      .033523
    shrelaw1 |    .0002189    .0069348      0.03    0.975     -.0133731     .0138109
avgcumdosew1 |   -5.108591    3.138225     -1.63    0.104      -11.2594     1.042216
 shrelaw1Xd1 |   -.0269782    .0164348     -1.64    0.101     -.0591898     .0052334
  shjobw1Xd1 |    .0726131    .0410722      1.77    0.077     -.0078869     .1531132
       _cons |   -6.378223    1.306394     -4.88    0.000     -8.938707    -3.817739
-------------+----------------------------------------------------------------


Note: 2 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         9             4  |         13
     -     |        32           295  |        327
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.95%
Specificity                     Pr( -|~D)   98.66%
Positive predictive value       Pr( D| +)   69.23%
Negative predictive value       Pr(~D| -)   90.21%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.34%
False - rate for true D         Pr( -| D)   78.05%
False + rate for classified +   Pr(~D| +)   30.77%
False - rate for classified -   Pr( D| -)    9.79%
--------------------------------------------------
Correctly classified                        89.41%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       331
            Pearson chi2(323) =       280.63
                  Prob > chi2 =         0.9572

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -91.278
D(332):                      182.555     LR(7):                        67.750
                                         Prob > LR:                     0.000
McFadden's R2:                 0.271     McFadden's Adj R2:             0.207
Maximum Likelihood R2:         0.181     Cragg & Uhler's R2:            0.347
McKelvey and Zavoina's R2:     0.590     Efron's R2:                    0.242
Variance of y*:                8.026     Variance of error:             3.290
Count R2:                      0.894     Adj Count R2:                  0.122
AIC:                           0.584     AIC*n:                       198.555
BIC:                       -1752.655     BIC':                        -26.947

. scalar SigDoseProbsocMw1 = "no"

. * xx  no signific radhwl3 by dose effect
. * xx  for males no signif dose social problem effect
. * xx  for males no significant moderator in dose social problem effect
.
. * female models
.
.
.
.
.
. title4 "H1 pt2 wave 1 trimmed female moderator model with basis functions"
-------------
H1 pt2 wave 1 trimmed female moderator model with basis functions
-------------

. forvalues j=1/1 {
  2. set more off
  3. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  4. title "trimmed HP2probsoc main effects models wave 1 for H1 part 2 " "Dose is signif Females"
  5. title "wave 1 dose HP2probsoc relationship but avgcumdosew`j': Dose signif"
  6. sw, pr(.1): logit HP2probsoc age radhlw1  illw`j' `w1bf' ////
>   shrelaw`j' avgcumdosew`j' if gender==2
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****    trimmed HP2probsoc main effects models wave 1 for H1 part 2      *****
*****                       Dose is signif Females                        *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:14:51  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
***** wave 1 dose HP2probsoc relationship but avgcumdosew1: Dose signif   *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:14:51  *****
*******************************************************************************
*******************************************************************************


note: bf15m dropped because of estimability
note: o.bf15m dropped because of estimability
note: 11 obs. dropped because of estimability


  begin with full model


p = 0.5688 >= 0.1000  removing illw1


p = 0.4993 >= 0.1000  removing bf40


p = 0.5410 >= 0.1000  removing bf22


p = 0.4121 >= 0.1000  removing bf11


p = 0.4390 >= 0.1000  removing bf10


p = 0.2876 >= 0.1000  removing bf1


p = 0.4202 >= 0.1000  removing bf20


p = 0.3289 >= 0.1000  removing bf30


p = 0.2425 >= 0.1000  removing bf9


p = 0.1125 >= 0.1000  removing bf4m


Logistic regression                               Number of obs   =        351
                                                  LR chi2(5)      =     134.88
                                                  Prob > chi2     =     0.0000
Log likelihood = -113.34071                       Pseudo R2       =     0.3731

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0966615    .0183518      5.27    0.000      .0606925     .1326304
     radhlw1 |    .0116609     .004855      2.40    0.016      .0021453     .0211765
avgcumdosew1 |    .6600342    .2959902      2.23    0.026      .0799041     1.240164
    shrelaw1 |   -.0108373     .005085     -2.13    0.033     -.0208036    -.0008709
         bf4 |   -.1838833    .0354969     -5.18    0.000     -.2534559    -.1143107
       _cons |   -5.736784    1.146357     -5.00    0.000     -7.983602    -3.489965
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        41            14  |         55
     -     |        33           263  |        296
-----------+--------------------------+-----------
   Total   |        74           277  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   55.41%
Specificity                     Pr( -|~D)   94.95%
Positive predictive value       Pr( D| +)   74.55%
Negative predictive value       Pr(~D| -)   88.85%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.05%
False - rate for true D         Pr( -| D)   44.59%
False + rate for classified +   Pr(~D| +)   25.45%
False - rate for classified -   Pr( D| -)   11.15%
--------------------------------------------------
Correctly classified                        86.61%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       350
            Pearson chi2(344) =       376.81
                  Prob > chi2 =         0.1078

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -180.782     Log-Lik Full Model:         -113.341
D(345):                      226.681     LR(5):                       134.883
                                         Prob > LR:                     0.000
McFadden's R2:                 0.373     McFadden's Adj R2:             0.340
Maximum Likelihood R2:         0.319     Cragg & Uhler's R2:            0.496
McKelvey and Zavoina's R2:     0.548     Efron's R2:                    0.411
Variance of y*:                7.277     Variance of error:             3.290
Count R2:                      0.866     Adj Count R2:                  0.365
AIC:                           0.680     AIC*n:                       238.681
BIC:                       -1795.290     BIC':                       -105.579

.
.
. scalar SigDoseProbsocFw1 = "yes"

. scalar MainEffProbSocFw1 = "age radhlw1 avgcumdosew1 shrelaw1 bf4"

.
. foreach var in b4 shrelaw1  {
  2.  cap   gen `var'Xd1 = `var'*avgcumdosew1
  3. }

.
. * testing the female moderator model with basis functions
. forvalues j=1/1 {
  2. set more off
  3. local w1bf bf1 bf4 bf9 bf10 bf11 bf14 bf15m bf20 bf22 bf30 bf40
  4. title "trimmed HP2socprob main effects  wv 1 for Hyp1 pt 2" "dose is signif for females"
  5. title "wave 1 dose HP2socprob relationship but avgcumdosew`j'" " Dose is signif for females"
  6. sw, pr(.1): logit HP2probsoc age radhlw1  illw`j' `w1bf' ////
>   shrelaw`j' avgcumdosew`j' bf4Xd1 shrelaw1Xd1 ///
>     if gender==2
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        trimmed HP2socprob main effects  wv 1 for Hyp1 pt 2          *****
*****                     dose is signif for females                      *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:15:08  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        wave 1 dose HP2socprob relationship but avgcumdosew1         *****
*****                     Dose is signif for females                      *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:15:08  *****
*******************************************************************************
*******************************************************************************


note: bf15m dropped because of estimability
note: o.bf15m dropped because of estimability
note: 11 obs. dropped because of estimability


  begin with full model


p = 0.8198 >= 0.1000  removing shrelaw1Xd1


p = 0.4967 >= 0.1000  removing illw1


p = 0.4970 >= 0.1000  removing bf14


p = 0.4352 >= 0.1000  removing bf1


p = 0.4028 >= 0.1000  removing bf11


p = 0.3720 >= 0.1000  removing bf10


p = 0.3228 >= 0.1000  removing bf20


p = 0.3123 >= 0.1000  removing bf30


p = 0.2761 >= 0.1000  removing bf9


p = 0.1462 >= 0.1000  removing bf4Xd1


p = 0.1528 >= 0.1000  removing bf40


p = 0.3685 >= 0.1000  removing bf22


Logistic regression                               Number of obs   =        351
                                                  LR chi2(5)      =     134.88
                                                  Prob > chi2     =     0.0000
Log likelihood = -113.34071                       Pseudo R2       =     0.3731

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0966615    .0183518      5.27    0.000      .0606925     .1326304
     radhlw1 |    .0116609     .004855      2.40    0.016      .0021453     .0211765
avgcumdosew1 |    .6600342    .2959902      2.23    0.026      .0799041     1.240164
    shrelaw1 |   -.0108373     .005085     -2.13    0.033     -.0208036    -.0008709
         bf4 |   -.1838833    .0354969     -5.18    0.000     -.2534559    -.1143107
       _cons |   -5.736784    1.146357     -5.00    0.000     -7.983602    -3.489965
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        41            14  |         55
     -     |        33           263  |        296
-----------+--------------------------+-----------
   Total   |        74           277  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   55.41%
Specificity                     Pr( -|~D)   94.95%
Positive predictive value       Pr( D| +)   74.55%
Negative predictive value       Pr(~D| -)   88.85%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.05%
False - rate for true D         Pr( -| D)   44.59%
False + rate for classified +   Pr(~D| +)   25.45%
False - rate for classified -   Pr( D| -)   11.15%
--------------------------------------------------
Correctly classified                        86.61%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       350
            Pearson chi2(344) =       376.81
                  Prob > chi2 =         0.1078

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -180.782     Log-Lik Full Model:         -113.341
D(345):                      226.681     LR(5):                       134.883
                                         Prob > LR:                     0.000
McFadden's R2:                 0.373     McFadden's Adj R2:             0.340
Maximum Likelihood R2:         0.319     Cragg & Uhler's R2:            0.496
McKelvey and Zavoina's R2:     0.548     Efron's R2:                    0.411
Variance of y*:                7.277     Variance of error:             3.290
Count R2:                      0.866     Adj Count R2:                  0.365
AIC:                           0.680     AIC*n:                       238.681
BIC:                       -1795.290     BIC':                       -105.579

.
. scalar ProbsocModFw1 = "none"

.
.
. title4 "H1 pt 2 wave 1 testing for mediators for males"
-------------
H1 pt 2 wave 1 testing for mediators for males
-------------

. * Male mediator dose social problem response models
.
.
.
.
. glm age avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm HP2probsoc age if gender==1, fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  230.0069
Iteration 2:   deviance =  223.5454
Iteration 3:   deviance =  223.2469
Iteration 4:   deviance =  223.2456
Iteration 5:   deviance =  223.2456

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  223.2456447                    (1/df) Deviance =  .6604901
Pearson          =  331.0340472                    (1/df) Pearson  =  .9793907

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1746.938

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0392343    .0064286      6.10    0.000      .0266344     .0518342
       _cons |   -3.234772    .3587306     -9.02    0.000     -3.937871    -2.531673
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm radhlw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1710.3417

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1378.645
Deviance         =  465981.8893                    (1/df) Deviance =  1378.645
Pearson          =  465981.8893                    (1/df) Pearson  =  1378.645

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   10.0726
Log likelihood   = -1710.341694                    BIC             =  464011.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    2.398285    1.208412      1.98    0.047      .0298407     4.766729
       _cons |    44.66477    2.079384     21.48    0.000      40.58925     48.74029
-------------+----------------------------------------------------------------

. glm HP2probsoc radhlw1 if gender==1,fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  234.6563
Iteration 2:   deviance =  229.8984
Iteration 3:   deviance =  229.7634
Iteration 4:   deviance =  229.7633
Iteration 5:   deviance =  229.7633

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  229.7632837                    (1/df) Deviance =   .679773
Pearson          =  344.9083225                    (1/df) Pearson  =  1.020439

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             =  -1740.42

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0108869    .0020577      5.29    0.000      .0068539     .0149198
       _cons |   -1.765962    .1445027    -12.22    0.000     -2.049182    -1.482742
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm shjobw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1710.378

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1378.939
Deviance         =  466081.3297                    (1/df) Deviance =  1378.939
Pearson          =  466081.3297                    (1/df) Pearson  =  1378.939

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.07281
Log likelihood   = -1710.377969                    BIC             =  464111.1

-------------+----------------------------------------------------------------
             |                 OIM
      shjobw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    1.461274    1.208541      1.21    0.227      -.907423      3.82997
       _cons |    48.94341    2.079606     23.53    0.000      44.86746     53.01936
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw1 if gender==1,fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  227.0059
Iteration 2:   deviance =  218.5961
Iteration 3:   deviance =   218.011
Iteration 4:   deviance =  218.0073
Iteration 5:   deviance =  218.0072
Iteration 6:   deviance =  218.0072

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  218.0072484                    (1/df) Deviance =  .6449919
Pearson          =  380.0066656                    (1/df) Pearson  =   1.12428

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1752.176

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw1 |    .0149051    .0023429      6.36    0.000       .010313     .0194971
       _cons |   -2.086099    .1780182    -11.72    0.000     -2.435009     -1.73719
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm shrelaw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1715.4166

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1420.421
Deviance         =  480102.3567                    (1/df) Deviance =  1420.421
Pearson          =  480102.3567                    (1/df) Pearson  =  1420.421

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.10245
Log likelihood   = -1715.416629                    BIC             =  478132.2

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.0649405    1.226584     -0.05    0.958     -2.469002     2.339121
       _cons |    29.57199    2.110654     14.01    0.000      25.43518      33.7088
-------------+----------------------------------------------------------------

. glm HP2probsoc shrelaw1 if gender==1,fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  250.4419
Iteration 2:   deviance =  249.8324
Iteration 3:   deviance =  249.8314
Iteration 4:   deviance =  249.8314

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  249.8314263                    (1/df) Deviance =  .7391462
Pearson          =  340.1867245                    (1/df) Pearson  =   1.00647

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1720.352

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw1 |    .0015698    .0019726      0.80    0.426     -.0022964     .0054361
       _cons |   -1.220468    .0980174    -12.45    0.000     -1.412578    -1.028357
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. title4 "Shjobw1 can be a mediator with others"
-------------
Shjobw1 can be a mediator with others
-------------

. glm radhlw1 shjobw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1679.4377

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       337
                                                   Scale parameter =  1152.894
Deviance         =  388525.4251                    (1/df) Deviance =  1152.894
Pearson          =  388525.4251                    (1/df) Pearson  =  1152.894

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  9.896692
Log likelihood   = -1679.437708                    BIC             =  386561.1

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw1 |    .4076599    .0497352      8.20    0.000      .3101807     .5051391
avgcumdosew1 |    1.802582    1.107442      1.63    0.104     -.3679637     3.973128
       _cons |    24.71251    3.088883      8.00    0.000      18.65841     30.76661
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw1 avgcumdosew1 shjobw1Xd1 radhlw1 if gender==1,fam(bin) ///
>   irls scale(dev) link(probit)

Iteration 1:   deviance =  219.4001
Iteration 2:   deviance =  209.1683
Iteration 3:   deviance =  208.2026
Iteration 4:   deviance =  208.1798
Iteration 5:   deviance =  208.1796
Iteration 6:   deviance =  208.1796
Iteration 7:   deviance =  208.1796

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   208.179583                    (1/df) Deviance =  .6214316
Pearson          =  348.7623267                    (1/df) Pearson  =  1.041082

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1744.517

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw1 |    .0101989    .0030577      3.34    0.001       .004206     .0161918
avgcumdosew1 |   -.5046729     .500832     -1.01    0.314     -1.486286     .4769398
  shjobw1Xd1 |    .0071158    .0061813      1.15    0.250     -.0049993     .0192309
     radhlw1 |    .0070111    .0022234      3.15    0.002      .0026533     .0113688
       _cons |   -2.183344    .2368622     -9.22    0.000     -2.647586    -1.719103
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar ProbsocMedMw1 = "radhlw1"

.
. title4 "H1 pt2 wave 1 HP2probsoc female mediator tests"
-------------
H1 pt2 wave 1 HP2probsoc female mediator tests
-------------

.
. // age is a possible female mediator
. glm age avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1406.325

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =   136.455
Deviance         =  49260.25928                    (1/df) Deviance =   136.455
Pearson          =  49260.25928                    (1/df) Pearson  =   136.455

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.759366
Log likelihood   = -1406.325011                    BIC             =  47132.38

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.783267      6.16449
       _cons |    48.88157    .7187038     68.01    0.000      47.47293      50.2902
-------------+----------------------------------------------------------------

. glm HP2probsoc age if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  289.3253
Iteration 2:   deviance =  280.9528
Iteration 3:   deviance =  280.5176
Iteration 4:   deviance =  280.5162
Iteration 5:   deviance =  280.5162

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  280.5161869                    (1/df) Deviance =  .7770531
Pearson          =  406.2926804                    (1/df) Pearson  =  1.125464

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1847.363

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0683554     .007474      9.15    0.000      .0537067      .083004
       _cons |   -4.505136     .424587    -10.61    0.000     -5.337311    -3.672961
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. // radhlw1 is a possible female mediator
. glm radhlw1 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1821.9477

Generalized linear models                          No. of obs      =       362
Optimization     : ML                              Residual df     =       360
                                                   Scale parameter =  1385.301
Deviance         =  498708.3025                    (1/df) Deviance =  1385.301
Pearson          =  498708.3025                    (1/df) Pearson  =  1385.301

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.07706
Log likelihood   = -1821.947718                    BIC             =  496587.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.789972    3.562254      1.06    0.287     -3.191917     10.77186
       _cons |    55.44948    2.293757     24.17    0.000       50.9538     59.94516
-------------+----------------------------------------------------------------

. glm HP2probsoc radhlw1 if gender==2,fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  347.1581
Iteration 2:   deviance =  346.2367
Iteration 3:   deviance =  346.2357
Iteration 4:   deviance =  346.2357

Generalized linear models                          No. of obs      =       362
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  346.2357277                    (1/df) Deviance =  .9617659
Pearson          =  365.2532496                    (1/df) Pearson  =  1.014592

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1774.756

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0094598    .0021222      4.46    0.000      .0053004     .0136191
       _cons |   -1.413461    .1575297     -8.97    0.000     -1.722213    -1.104708
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. // bf4 is a possible female mediator
. glm bf4 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.0162

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  26.52082
Deviance         =  9574.015672                    (1/df) Deviance =  26.52082
Pearson          =  9574.015672                    (1/df) Pearson  =  26.52082

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.121302
Log likelihood   = -1109.016226                    BIC             =  7446.136

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.474583    -.5430862
       _cons |    10.99384    .3168463     34.70    0.000      10.37284     11.61485
-------------+----------------------------------------------------------------

. glm HP2probsoc bf4 if gender==2,fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  295.3213
Iteration 2:   deviance =  289.8751
Iteration 3:   deviance =  289.6607
Iteration 4:   deviance =  289.6591
Iteration 5:   deviance =  289.6591
Iteration 6:   deviance =  289.6591

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  289.6591069                    (1/df) Deviance =  .8023798
Pearson          =  306.7680355                    (1/df) Pearson  =   .849773

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             =  -1838.22

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1364145    .0148745     -9.17    0.000      -.165568     -.107261
       _cons |    .3956217    .1443369      2.74    0.006      .1127267     .6785167
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm shrelaw1 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1801.2674

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  1202.293
Deviance         =  434027.9437                    (1/df) Deviance =  1202.293
Pearson          =  434027.9437                    (1/df) Pearson  =  1202.293

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  9.935358
Log likelihood   = -1801.267425                    BIC             =  431900.1

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    5.240218    3.317628      1.58    0.114     -1.262215     11.74265
       _cons |    26.01592    2.133342     12.19    0.000      21.83464     30.19719
-------------+----------------------------------------------------------------

. glm HP2probsoc shrelaw1  if gender==2,fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  367.3685
Iteration 2:   deviance =   367.117
Iteration 3:   deviance =   367.117
Iteration 4:   deviance =   367.117

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  367.1169775                    (1/df) Deviance =  1.016945
Pearson          =  362.9967567                    (1/df) Pearson  =  1.005531

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1760.762

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw1 |   -.0003307    .0021782     -0.15    0.879     -.0045998     .0039385
       _cons |   -.8187957    .0962545     -8.51    0.000     -1.007451    -.6301402
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. glm radhlw1 shjobw1 avgcumdosew1 shjobw1Xd1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1821.765

Generalized linear models                          No. of obs      =       362
Optimization     : ML                              Residual df     =       358
                                                   Scale parameter =  1391.635
Deviance         =  498205.2021                    (1/df) Deviance =  1391.635
Pearson          =  498205.2021                    (1/df) Pearson  =  1391.635

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   10.0871
Log likelihood   = -1821.765032                    BIC             =    496096

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw1 |    .0182877    .0685464      0.27    0.790     -.1160606     .1526361
avgcumdosew1 |    12.32024    14.83908      0.83    0.406     -16.76382      41.4043
  shjobw1Xd1 |   -.1018921    .1735559     -0.59    0.557     -.4420555     .2382713
       _cons |    53.68631    4.758015     11.28    0.000      44.36077     63.01185
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw1 avgcumdosew1 shjobw1Xd1  if gender==2,fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  341.3502
Iteration 2:   deviance =  340.0594
Iteration 3:   deviance =   340.039
Iteration 4:   deviance =  340.0389
Iteration 5:   deviance =  340.0389

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  340.0389343                    (1/df) Deviance =  .9471837
Pearson          =  349.6343388                    (1/df) Pearson  =  .9739118

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1776.052

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw1 |    .0078885    .0028001      2.82    0.005      .0024004     .0133767
avgcumdosew1 |    2.042963     .654931      3.12    0.002      .7593215     3.326604
  shjobw1Xd1 |   -.0171602      .00714     -2.40    0.016     -.0311544    -.0031661
       _cons |   -1.586799    .2154854     -7.36    0.000     -2.009142    -1.164455
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. scalar SigDoseProbsocFw1 = "yes"

. scalar SigDoseProbsocMw1 = "no"

.
.
. scalar MainEffPrbsocMw1 = "age bf4m"

. scalar MainEffProbSocFw1 = "age radhlw1 avgcumdosew1 shrelaw1 bf4"

.
. scalar PrbsocModMw1 = "shjobw1Xd1 shrelaw1Xd1"

. scalar ProbsocModFw1 = "none"

.
.
. scalar ProbsocMedMw1 = "radhlw1"

. scalar ProbsocMedFw1 = "age bf4 "

.
.
. * male hp2spM w1  mediators: age
. * dose is not significant main effect for males
. * female hp2spF w1 mediators: age radhlw1
. * dose is not sig main effect for males
.
.
.
.
.
. title4 "3. Matrix summary for H1 pt2 wave 1 HP2probsoc Impact"
-------------
3. Matrix summary for H1 pt2 wave 1 HP2probsoc Impact
-------------

.     matrix define  spMw1 = J(1,8, 0)

.         matrix define  spFw1 = J(1,8, 0)

. matrix colnames  spMw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

. matrix colnames  spFw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.
.         matrix define  spMw1= (1, 2, 1, 1, 1, 2, 2, 1 )

.         matrix define  spFw1= (1, 2, 1, 2, 0, 5, 0, 2 )

.     matrix rowname  spMw1 =  spMw1

.         matrix rowname  spFw1 =  spFw1

.         matlist  spMw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
spMw1   |         1            2            1            1            1            2            2            1

.         matlist  spFw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
spFw1   |         1            2            1            2            0            5            0            2

.         matrix define H1pt2w1 = (  wkMw1 \  wkFw1 \  hmcrMw1 \  hmcrFw1 \  spMw1 \  spFw1 )

.
.         matlist H1pt2w1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            1            1            2
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            2            0            2
spMw1   |         1            2            1            1            1            2            2            1
spFw1   |         1            2            1            2            0            5            0            2

.     matrix colnames H1pt2w1 =  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix rownames H1pt2w1 =   wkMw1 wkFw1 hmcrMw1 hmcrFw1 socprbMw1 socprbFw1

.     matlist H1pt2w1

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
wkMw1   |         1            2            1            1            0            2            0            1
wkFw1   |         1            2            1            2            0            1            1            2
hmcrMw1   |         1            2            1            1            0            2            0            1
hmcrFw1   |         1            2            1            2            0            2            0            2
socprbMw1   |         1            2            1            1            1            2            2            1
socprbFw1   |         1            2            1            2            0            5            0            2

.
.
.
. *xx  significant dose effect for females
.
. *xx  no female moderators for Dose Social problem impact relationship
. scalar list
MainEffhmcrFw1 = age
MainEffhmcrMw1 = age
hmcrMedFw1 = age bf4
hmcrMedMw1 = radhlw1
MainEffwkFw1 = age
MainEffwkMw1 = age
MainEffVactnMw1 = age radhlw1
VactnMedFw1 = age illw1 radhlw1
VactnMedMw1 = age
VacatnModFw1 = none
MainEffVactnFw1 = age radhlw1 bf7m
SigDoseVactnFw1 = no
VactnModMw1 = none
inthobMedFw1 = age bf4 illw1 bf4m
inthobMedMw1 = age
 inthobMw1 = age
InthbModFw1 = none
MainEffInthbFw1 = age radhlw1 bf4
SigdoseInthbFw1 = no
InthbModMw1 = none
MainEffInthbMw1 = age radhlw1 shfamw1
SigDoseInthbMw1 = no
MainEffMw1 = radhlw1 bf4 bf40
sxlifeMedMw1 = radhlw1
sxlifeMedFw1 = age illw1 radhlw1 bf4 bf4m
MainEffsxlifeFw1 = age bf4 bf4m
SigDoseSxlifeFw1 = no
SigDosesxlifeMw1 = no
MainEffsxlifeMw1 = age bf4 bf40
SigDosePrbfmhmMw1 = no
vactnModMw1 = none
SigDoseVactnMw1 = no
SxLifeModFw1 = no
sxlifeModFw1 = none
sxlifeModMw1 = none
MaineffhmcrMw1 = age bf4 bf40
SigDoseMEhmcrW1 = no
PrbfmhmMedFw1 = age bf4
PrbfmhmMedMw1 = age
MainEffPrbfmhmFw1 = age radhlw1 bf4
MainEffPrbfmhmMw1 = age bf4
PrbfmhmModFw1 = none
PrbfmhmModMw1 = none
SigDosePrbfmhmFw1 = no
SigDosePrbfhmMw1 = no
MainEffPrbfhmMw1 = age bf4
MainEffVactnMw2 = age radhlw2
sxlifeMedMw2 = age illw2
SigDoseSxlifeFw2 = no
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m
MainEffPrbsocMw2 = age radhlw2 shjobw2
MainEffhmcrFw2 = age
hmcrMedFw2 = age bf4
MainEffwkFw2 = age
MainEffwkMw2 = age
MainEffPrbsocMw1 = age bf4m
SigdoseMw1 = no
ProbsocMedFw1 = age bf4
ProbsocMedMw1 = radhlw1
ProbsocModFw1 = none
SigDoseProbsocMw1 = no
hmcrmedMw1 = radhlw1
hmcrmedFw1 = age b4 b40
SigdosehmcrFw1 = no
MainEffProbSocFw1 = age radhlw1 avgcumdosew1 shrelaw1 bf4
SigDoseProbsocFw1 = yes
PrbsocModMw1 = shjobw1Xd1 shrelaw1Xd1
 WkhmcrMw1 = age b4
  WkModFw1 = ageXd1
hmcareMedFw1 = age illw1
hmcareMedMw1 = age
SigDosehmcrFw1 = no
  wkMedMw1 = bf40
hmcrModFw1 = none
SigDoseHmcrFw1 = yes
  WkMedMw1 = bf40
hmcrModMw1 = none
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
VactnMedMw2 = age
inthobMedMw2 = age
 inthobMw2 = age
PrbfmhmModMw2 = none
MainEffProbSocFw2 = age radhlw2 avgcumdosew2 bf4
hmcrModMw2 = none
MainEffhmcrMw2 = age
  wkMedFw2 = age b4
  wkMedMw2 = age bf4
MainEffsxlifeMw2 = age bf4 bf40 shjobw2 shrelaw2 radhlw2
MainEffPrbfmhmMw2 = bf4 bf6 bf7
ProbsocMedFw2 = age bf4 radhlw2
hmcareMedFw2 = age bf4
 WkhmcrMw2 = age b4
MainEffhmcrw2 = age
hmcrModFw2 = none
SigDoseHmcrFw2 = yes
NumhmcrModMw2 = none
SigDosehmcrMw2 = no
SigdosehmcrFw2 = yes
hmcrMedMw2 = age ageXillw2
SigDosehmcrFw2 = no
MainEffhmcareMw2 = age
  WkMedMw2 = age ageXillw2
  wkMedFw3 = radhlw3 age ageXillw3 bf40 bf4m bf1
VactnMedFw2 = age illw2 radhlw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 bf7m
SigDoseVactnFw2 = no
VactnModMw2 = none
vactnModMw2 = none
SigDoseVactnMw2 = no
inthobMedFw2 = age bf4 illw2 bf4m
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
InthbModMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
MainEffMw2 = radhlw2 bf4 bf40
SigdoseMEinthob = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
SxLifeModFw2 = no
sxlifeModFw2 = none
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf4 bf6 bf7
ProbsocMedMw2 = age
ProbsocModFw2 = none
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
PrbsocModMw2 = none
SigdoseMw2 = none
hmcareMedMw2 = age
hmcareModFw2 = none
MainEffhmcarew2 = age
SigdoseHmcareFw2 = no
hmcareModMw2 = none
SigDoseHmcareMw2 = no
NameMedMw2 = age ageXillw2
 NumModMw2 = none
SigDosehmcareMw2 = no
SigDoseWKMw2 = no
  WkMedFw2 = age bf4
  WkModFw2 = none
  WKModMw2 = none
SigDoseWkMw2 = no
SigDoseWkFw2 = no
SigDoseFw2 = no
  wkModFw2 = none
  wkModMw2 = none
VactnMedFw3 = age illw3 radhlw3
VactnMedMw3 = age illw3
VacatnModFw3 = none
MainEffVactnFw3 = age radhlw3 deaw3
SigDoseVactnFw3 = no
vactnModMw3 = none
MainEffVactnMw3 = age bf7m radhlw3
SigDoseVactnMw3 = no
sxLifeMedFw3 = age bf4 bf4m
sxLifeMedMw3 = age illw3
InthbModFw3 = none
MainEffInthbFw3 = age radhlw3 bf4
SigdoseInthbFw3 = no
  InthbMw3 = none
MainEffInthbMw3 = age radhlw3 shfamw3
SigDoseInthbMw3 = no
sxlifeMedFw3 = age illw3 radhlw3 bf4 bf4m
sxlifeMedMw3 = age illw3
sxlifeModFw3 = none
MainEffsxlifeFw3 = age radhlw3 bf4 bf4m shrelaw3 shfamw3
SigDoseSxlifeFw3 = no
sxlifeModMw3 = none
SigDosesxlifeMw3 = no
MainEffsxlifeMw3 = age bf4 illw3 radhlw3
PrbfmhmMedFw3 = age bf4
PrbfmhmMedMw3 = age
PrbfmhmModFw3 = none
MainEffPrbfmhmFw3 = age bf4 bf40
SigDosePrbfmhmFw3 = no
PrbfmhmModw3 = none
SigDosePrbfmhmMw3 = no
SigDosePrbfhmMw3 = no
MainEffPrbfhmMw3 = bf1 bf4 dvcew3 bf7m
ProbsocMedFw3 = age radhlw3
ProbsocMedMw3 = age
ProbsocModFw3 = none
MainEffProbSocFw3 = age radhlw3 illw3 Shrelaw3 avgcumodsew3
SigDoseProbsocFw3 = yes
ProbSocModMw3 = none
SigDoseProbsocMw3 = no
MainEffPrbsocMw3 = age radhlw3 shjobw3
hmcareMedFw3 = age illw3
hmcareMedMw3 = age illw3
hmcareModFw3 = none
SigdoseHmcareFw3 = no
hmcareModMw3 = none
MainEffhmcareMw3 = none
SigDoseHmcareMw3 = no
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

.
.
.
. *----------- Chunk 5   Dose => Problems with the Family at home Impact
. title "4. H1 pt 2 wave 1  Dose = Fam Problems at home impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       4. H1 pt 2 wave 1  Dose = Fam Problems at home impact         *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:15:56  *****
*******************************************************************************
*******************************************************************************


. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
.   foreach var in  HP2pbfhm  {
  5.       forvalues k=1/2 {
  6. local w1bf bf1 bf4 bf9 bf10 bf11 bf14 bf15m bf20 bf22 bf30 bf40
  7.
. di as input "Full main model for `var' for wave= `j' "
  8. di _skip(4)
  9. di as input  "chunk 5 H1 test:Gender= `k'  model Wave =  `j' for `e(depvar)' "
 10. di _skip(4)
 11.
.       xi: logistic `var' age i.educ occ1w`j'-occ8w`j' ///
>                 marrw`j'1- marrw`j'3 marrw`j'5-marrw`j'6 inc1w`j'-inc4w`j' ///
>                 radhlw`j' havmil avgcumdosew`j' `w`j'bf'  ///
>                  deaw`j' dvcew`j' sepaw`j' accdw`j' movew`j' ///
>                 illw`j' shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j' ///
>                  havmilsq if gender==`k', coef  difficult iterate(50)
 12.                         estat class
 13.                         estat gof
 14.                         fitstat
 15. }
 16. }
 17. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


Full main model for HP2pbfhm for wave= 1

chunk 5 H1 test:Gender= 1  model Wave =  1 for HP2probsoc

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_2 != 0 predicts failure perfectly
      _Ieduc_2 dropped and 10 obs not used

note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 12 obs not used

note: _Ieduc_7 != 0 predicts failure perfectly
      _Ieduc_7 dropped and 4 obs not used

note: _Ieduc_8 != 0 predicts failure perfectly
      _Ieduc_8 dropped and 2 obs not used

note: occ5w1 != 0 predicts failure perfectly
      occ5w1 dropped and 8 obs not used

note: occ6w1 != 0 predicts failure perfectly
      occ6w1 dropped and 4 obs not used

note: occ7w1 != 0 predicts failure perfectly
      occ7w1 dropped and 4 obs not used

note: marrw12 != 0 predicts failure perfectly
      marrw12 dropped and 4 obs not used

note: marrw15 != 0 predicts success perfectly
      marrw15 dropped and 1 obs not used

note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 17 obs not used

note: dvcew1 != 0 predicts failure perfectly
      dvcew1 dropped and 1 obs not used

note: sepaw1 != 0 predicts failure perfectly
      sepaw1 dropped and 1 obs not used

note: accdw1 != 0 predicts failure perfectly
      accdw1 dropped and 6 obs not used

note: _Ieduc_6 omitted because of collinearity
note: marrw16 omitted because of collinearity

Logistic regression                               Number of obs   =        259
                                                  LR chi2(37)     =      58.78
                                                  Prob > chi2     =     0.0128
Log likelihood = -41.036775                       Pseudo R2       =     0.4173

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1140333    .0507477      2.25    0.025      .0145697     .2134969
    _Ieduc_2 |           0   (omitted)
    _Ieduc_3 |   -.0489809    .8274219     -0.06    0.953     -1.670698     1.572736
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.3717243    1.234713     -0.30    0.763     -2.791717     2.048268
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w1 |    .0549567     3.40443      0.02    0.987     -6.617603     6.727516
      occ2w1 |   -.6561172    3.427034     -0.19    0.848     -7.372981     6.060747
      occ3w1 |    1.845881    3.621761      0.51    0.610      -5.25264     8.944401
      occ4w1 |    -.738871    3.594017     -0.21    0.837     -7.783015     6.305273
      occ5w1 |           0   (omitted)
      occ6w1 |           0   (omitted)
      occ7w1 |           0   (omitted)
      occ8w1 |    .7397449    3.652989      0.20    0.840     -6.419982     7.899471
     marrw11 |    9.984281    2273.716      0.00    0.996     -4446.417     4466.386
     marrw12 |           0   (omitted)
     marrw13 |    9.475183    2273.716      0.00    0.997     -4446.927     4465.877
     marrw15 |           0   (omitted)
     marrw16 |           0   (omitted)
      inc1w1 |   -2.098091    3.351876     -0.63    0.531     -8.667648     4.471466
      inc2w1 |   -1.263123    3.216941     -0.39    0.695     -7.568212     5.041965
      inc3w1 |   -1.666932    3.248691     -0.51    0.608     -8.034249     4.700384
      inc4w1 |   -2.798082    3.810066     -0.73    0.463     -10.26567     4.669509
     radhlw1 |    .0221794     .012356      1.80    0.073     -.0020379     .0463968
      havmil |   -.0042208    .0093253     -0.45    0.651     -.0224981     .0140566
avgcumdosew1 |   -1.041178    .9206409     -1.13    0.258     -2.845601     .7632452
         bf1 |   -.0255316    .0778527     -0.33    0.743     -.1781201      .127057
         bf4 |   -.2441414    .1077011     -2.27    0.023     -.4552317    -.0330512
         bf9 |   -.0547201     .051475     -1.06    0.288     -.1556092      .046169
        bf10 |   -.2223925    .2030607     -1.10    0.273     -.6203843     .1755992
        bf11 |   -.0227027    .1366459     -0.17    0.868     -.2905237     .2451183
        bf14 |    .0001079    .0001172      0.92    0.357     -.0001219     .0003377
       bf15m |           0   (omitted)
        bf20 |    .0093433    .0710822      0.13    0.895     -.1299752     .1486619
        bf22 |     .000374    .0002074      1.80    0.071     -.0000324     .0007805
        bf30 |   -.0000361    .0007108     -0.05    0.959     -.0014293      .001357
        bf40 |   -.5322776    .3877192     -1.37    0.170     -1.292193      .227638
       deaw1 |     .139745    .7195497      0.19    0.846     -1.270547     1.550036
      dvcew1 |           0   (omitted)
      sepaw1 |           0   (omitted)
      accdw1 |           0   (omitted)
      movew1 |   -.9959846    2.338912     -0.43    0.670     -5.580168     3.588199
       illw1 |    .0424127    .9714262      0.04    0.965     -1.861548     1.946373
     shfamw1 |    .0013379    .0148676      0.09    0.928     -.0278022     .0304779
      shhlw1 |    -.002734    .0255506     -0.11    0.915     -.0528123     .0473444
     shjobw1 |   -.0385947    .0207074     -1.86    0.062     -.0791804     .0019911
    shrelaw1 |     .004462    .0134181      0.33    0.739     -.0218371     .0307611
     suprtw1 |    .0496362    .0609811      0.81    0.416     -.0698846      .169157
     suchrw1 |   -.0362505    .1014181     -0.36    0.721     -.2350263     .1625254
    havmilsq |    4.65e-06    9.99e-06      0.46    0.642     -.0000149     .0000242
       _cons |   -11.63773    2273.725     -0.01    0.996     -4468.057     4444.781
-------------+----------------------------------------------------------------


Note: 8 failures and 0 successes completely determined.


Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         9             2  |         11
     -     |        11           237  |        248
-----------+--------------------------+-----------
   Total   |        20           239  |        259

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   45.00%
Specificity                     Pr( -|~D)   99.16%
Positive predictive value       Pr( D| +)   81.82%
Negative predictive value       Pr(~D| -)   95.56%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.84%
False - rate for true D         Pr( -| D)   55.00%
False + rate for classified +   Pr(~D| +)   18.18%
False - rate for classified -   Pr( D| -)    4.44%
--------------------------------------------------
Correctly classified                        94.98%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       259
 number of covariate patterns =       259
            Pearson chi2(221) =       143.82
                  Prob > chi2 =         1.0000

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:      -70.429     Log-Lik Full Model:          -41.037
D(206):                       82.074     LR(37):                       58.785
                                         Prob > LR:                     0.013
McFadden's R2:                 0.417     McFadden's Adj R2:            -0.335
Maximum Likelihood R2:         0.203     Cragg & Uhler's R2:            0.484
McKelvey and Zavoina's R2:     0.857     Efron's R2:                    0.352
Variance of y*:               23.001     Variance of error:             3.290
Count R2:                      0.950     Adj Count R2:                  0.350
AIC:                           0.726     AIC*n:                       188.074
BIC:                       -1062.633     BIC':                        146.818
Full main model for HP2pbfhm for wave= 1

chunk 5 H1 test:Gender= 2  model Wave =  1 for HP2pbfhm

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: marrw12 != 0 predicts failure perfectly
      marrw12 dropped and 4 obs not used

note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 11 obs not used

note: _Ieduc_8 omitted because of collinearity

Logistic regression                               Number of obs   =        343
                                                  LR chi2(49)     =     131.00
                                                  Prob > chi2     =     0.0000
Log likelihood =  -71.53941                       Pseudo R2       =     0.4780

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1418493    .0387097      3.66    0.000      .0659796      .217719
    _Ieduc_2 |    17.22542    4534.447      0.00    0.997     -8870.128     8904.579
    _Ieduc_3 |    17.37005    4534.447      0.00    0.997     -8869.983     8904.723
    _Ieduc_4 |     17.2893    4534.447      0.00    0.997     -8870.064     8904.643
    _Ieduc_5 |    17.58061    4534.447      0.00    0.997     -8869.773     8904.934
    _Ieduc_6 |    17.54436    4534.447      0.00    0.997     -8869.809     8904.898
    _Ieduc_7 |    19.56629    4534.448      0.00    0.997     -8867.789     8906.922
    _Ieduc_8 |           0   (omitted)
      occ1w1 |   -2.933908    3.752469     -0.78    0.434     -10.28861     4.420796
      occ2w1 |   -3.629362    3.805266     -0.95    0.340     -11.08755     3.828822
      occ3w1 |   -2.149571    3.775043     -0.57    0.569      -9.54852     5.249378
      occ4w1 |    -3.08403    3.884516     -0.79    0.427     -10.69754     4.529481
      occ5w1 |    -1.54127    3.940317     -0.39    0.696     -9.264149     6.181609
      occ6w1 |   -4.518852    4.376561     -1.03    0.302     -13.09675      4.05905
      occ7w1 |   -.5209646    3.827304     -0.14    0.892     -8.022342     6.980413
      occ8w1 |   -.6982657    3.788908     -0.18    0.854     -8.124388     6.727857
     marrw11 |    6.563183    2.259003      2.91    0.004      2.135619     10.99075
     marrw12 |           0   (omitted)
     marrw13 |    3.664968    1.807756      2.03    0.043      .1218322     7.208105
     marrw15 |    4.919489    2.358945      2.09    0.037      .2960419     9.542936
     marrw16 |     3.80604    2.237487      1.70    0.089     -.5793546     8.191435
      inc1w1 |    .8452115    3.777625      0.22    0.823     -6.558798     8.249221
      inc2w1 |    2.888908    3.720317      0.78    0.437     -4.402779     10.18059
      inc3w1 |    2.900029    3.700306      0.78    0.433     -4.352438      10.1525
      inc4w1 |    3.648558    4.001972      0.91    0.362     -4.195162     11.49228
     radhlw1 |    .0284271    .0105574      2.69    0.007      .0077349     .0491194
      havmil |   -.0074706    .0174749     -0.43    0.669     -.0417209     .0267796
avgcumdosew1 |    -.072348    .4728314     -0.15    0.878     -.9990805     .8543844
         bf1 |    .0059636    .0469599      0.13    0.899      -.086076     .0980033
         bf4 |   -.4047147    .0856612     -4.72    0.000     -.5726076    -.2368217
         bf9 |   -.0595004    .0425833     -1.40    0.162     -.1429621     .0239614
        bf10 |   -.0062201    .0202319     -0.31    0.759      -.045874     .0334338
        bf11 |   -.0101918    .0656234     -0.16    0.877     -.1388112     .1184277
        bf14 |   -.0003249    .0001287     -2.52    0.012     -.0005772    -.0000727
       bf15m |           0   (omitted)
        bf20 |   -.0168987    .0398949     -0.42    0.672     -.0950913     .0612938
        bf22 |    .0003491    .0001303      2.68    0.007      .0000938     .0006044
        bf30 |    .0000363    .0004332      0.08    0.933     -.0008127     .0008853
        bf40 |   -.6041257     .200322     -3.02    0.003     -.9967496    -.2115017
       deaw1 |   -.2106609    .3829692     -0.55    0.582     -.9612668      .539945
      dvcew1 |    3.227642    1.990455      1.62    0.105     -.6735776     7.128863
      sepaw1 |   -1.961135    2.530088     -0.78    0.438     -6.920017     2.997746
      accdw1 |    -1.15855    1.327999     -0.87    0.383      -3.76138      1.44428
      movew1 |    .8502008    .7012493      1.21    0.225     -.5242225     2.224624
       illw1 |    1.167312    .5375125      2.17    0.030      .1138066     2.220817
     shfamw1 |   -.0177543    .0110296     -1.61    0.107      -.039372     .0038633
      shhlw1 |   -.0133242    .0167146     -0.80    0.425     -.0460843     .0194358
     shjobw1 |    .0113593    .0116917      0.97    0.331     -.0115561     .0342746
    shrelaw1 |    .0021827    .0102849      0.21    0.832     -.0179754     .0223408
     suprtw1 |    .0039965    .0137794      0.29    0.772     -.0230105     .0310036
     suchrw1 |   -.0313303    .0297859     -1.05    0.293     -.0897095      .027049
    havmilsq |   -5.84e-06    .0000521     -0.11    0.911     -.0001079     .0000962
       _cons |   -26.74862     4534.45     -0.01    0.995     -8914.107     8860.609
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        26             5  |         31
     -     |        21           291  |        312
-----------+--------------------------+-----------
   Total   |        47           296  |        343

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   55.32%
Specificity                     Pr( -|~D)   98.31%
Positive predictive value       Pr( D| +)   83.87%
Negative predictive value       Pr(~D| -)   93.27%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.69%
False - rate for true D         Pr( -| D)   44.68%
False + rate for classified +   Pr(~D| +)   16.13%
False - rate for classified -   Pr( D| -)    6.73%
--------------------------------------------------
Correctly classified                        92.42%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       343
 number of covariate patterns =       343
            Pearson chi2(293) =       979.77
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:     -137.038     Log-Lik Full Model:          -71.539
D(290):                      143.079     LR(49):                      130.998
                                         Prob > LR:                     0.000
McFadden's R2:                 0.478     McFadden's Adj R2:             0.091
Maximum Likelihood R2:         0.317     Cragg & Uhler's R2:            0.577
McKelvey and Zavoina's R2:     0.915     Efron's R2:                    0.495
Variance of y*:               38.594     Variance of error:             3.290
Count R2:                      0.924     Adj Count R2:                  0.447
AIC:                           0.726     AIC*n:                       249.079
BIC:                       -1549.863     BIC':                        155.051

.
.
. title4 "Partly Trimmed male wave 1  Dose => Problems with Family at home models"
-------------
Partly Trimmed male wave 1  Dose => Problems with Family at home models
-------------

. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40

. logit HP2pbfhm age bf4 bf22  radhlw1 avgcumdosew1  shjobw1 suprtw1 ///
>    illw1 if gender==1, iterate(50)

Iteration 0:   log likelihood = -81.506236
Iteration 1:   log likelihood =  -70.36767
Iteration 2:   log likelihood = -63.735881
Iteration 3:   log likelihood = -63.262978
Iteration 4:   log likelihood = -63.251084
Iteration 5:   log likelihood = -63.251044
Iteration 6:   log likelihood = -63.251044

Logistic regression                               Number of obs   =        340
                                                  LR chi2(8)      =      36.51
                                                  Prob > chi2     =     0.0000
Log likelihood = -63.251044                       Pseudo R2       =     0.2240

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0417694    .0232436      1.80    0.072     -.0037872     .0873261
         bf4 |   -.1944454    .0674328     -2.88    0.004     -.3266114    -.0622795
        bf22 |    .0001979    .0001096      1.81    0.071     -.0000169     .0004126
     radhlw1 |    .0156873    .0077256      2.03    0.042      .0005455     .0308292
avgcumdosew1 |   -.7288118    .6058279     -1.20    0.229     -1.916213     .4585891
     shjobw1 |   -.0246328    .0097441     -2.53    0.011     -.0437309    -.0055347
     suprtw1 |   -.0367192    .0154384     -2.38    0.017     -.0669779    -.0064605
       illw1 |    1.081626    .5960837      1.81    0.070     -.0866765     2.249929
       _cons |    -2.68461    1.769319     -1.52    0.129     -6.152411     .7831919
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         1             1  |          2
     -     |        21           317  |        338
-----------+--------------------------+-----------
   Total   |        22           318  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    4.55%
Specificity                     Pr( -|~D)   99.69%
Positive predictive value       Pr( D| +)   50.00%
Negative predictive value       Pr(~D| -)   93.79%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.31%
False - rate for true D         Pr( -| D)   95.45%
False + rate for classified +   Pr(~D| +)   50.00%
False - rate for classified -   Pr( D| -)    6.21%
--------------------------------------------------
Correctly classified                        93.53%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       337
            Pearson chi2(328) =       247.99
                  Prob > chi2 =         0.9997

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -81.506     Log-Lik Full Model:          -63.251
D(331):                      126.502     LR(8):                        36.510
                                         Prob > LR:                     0.000
McFadden's R2:                 0.224     McFadden's Adj R2:             0.114
Maximum Likelihood R2:         0.102     Cragg & Uhler's R2:            0.267
McKelvey and Zavoina's R2:     0.537     Efron's R2:                    0.137
Variance of y*:                7.110     Variance of error:             3.290
Count R2:                      0.935     Adj Count R2:                  0.000
AIC:                           0.425     AIC*n:                       144.502
BIC:                       -1802.879     BIC':                         10.121

.
. title4 "trimmed male main effects wv 1" " Dose => Problems with Family at home models"
-------------
trimmed male main effects wv 1
-------------

. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40

. sw, pr(.1):logit HP2pbfhm age sepaw1 dvcew1 radhlw1 avgcumdosew1 bf4  suprtw1 ///
>    havmilsq illw1 if gender==1, iterate(50)
note: sepaw1 dropped because of estimability
note: dvcew1 dropped because of estimability
note: o.sepaw1 dropped because of estimability
note: o.dvcew1 dropped because of estimability
note: 6 obs. dropped because of estimability


  begin with full model


p = 0.7261 >= 0.1000  removing havmilsq


p = 0.3270 >= 0.1000  removing avgcumdosew1


p = 0.1493 >= 0.1000  removing radhlw1


p = 0.1420 >= 0.1000  removing suprtw1


p = 0.5106 >= 0.1000  removing illw1


Logistic regression                               Number of obs   =        334
                                                  LR chi2(2)      =      19.70
                                                  Prob > chi2     =     0.0001
Log likelihood = -65.847499                       Pseudo R2       =     0.1301

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .043747    .0220586      1.98    0.047      .0005129     .0869811
         bf4 |   -.1234479    .0425264     -2.90    0.004     -.2067982    -.0400977
       _cons |   -3.800943       1.442     -2.64    0.008     -6.627212    -.9746754
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             0  |          0
     -     |        20           314  |        334
-----------+--------------------------+-----------
   Total   |        20           314  |        334

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    0.00%
Specificity                     Pr( -|~D)  100.00%
Positive predictive value       Pr( D| +)       .%
Negative predictive value       Pr(~D| -)   94.01%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.00%
False - rate for true D         Pr( -| D)  100.00%
False + rate for classified +   Pr(~D| +)       .%
False - rate for classified -   Pr( D| -)    5.99%
--------------------------------------------------
Correctly classified                        94.01%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       334
 number of covariate patterns =       219
            Pearson chi2(216) =       205.20
                  Prob > chi2 =         0.6901

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -75.697     Log-Lik Full Model:          -65.847
D(331):                      131.695     LR(2):                        19.699
                                         Prob > LR:                     0.000
McFadden's R2:                 0.130     McFadden's Adj R2:             0.090
Maximum Likelihood R2:         0.057     Cragg & Uhler's R2:            0.157
McKelvey and Zavoina's R2:     0.221     Efron's R2:                    0.091
Variance of y*:                4.225     Variance of error:             3.290
Count R2:                      0.940     Adj Count R2:                  0.000
AIC:                           0.412     AIC*n:                       137.695
BIC:                       -1791.793     BIC':                         -8.077

.
. scalar MainEffPrbfhmMw1 = "age bf4"

. scalar SigDosePrbfhmMw1 = "no"

. // construction of moderators for male model
.
. foreach var in age bf4  {
  2.  cap gen `var'Xd1 = `var'*avgcumdosew1
  3.   }

.
.
.
.
. ******************************************************************************
. *-------chunk 6  continued -testing moderators and none found for males
. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40

.
.
. title4 "fully Trimmed male main effects wv 1" ///
>   "Dose => Problems with Family at home models"
-------------
fully Trimmed male main effects wv 1
-------------

. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40

. logit HP2pbfhm age radhlw1 avgcumdosew1  ///
>   bf4Xd1  ageXd1  if ///
>     gender==1, iterate(50)

Iteration 0:   log likelihood = -81.506236
Iteration 1:   log likelihood = -73.611243
Iteration 2:   log likelihood = -71.601053
Iteration 3:   log likelihood = -71.266265
Iteration 4:   log likelihood = -71.252753
Iteration 5:   log likelihood = -71.252739
Iteration 6:   log likelihood = -71.252739

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      20.51
                                                  Prob > chi2     =     0.0010
Log likelihood = -71.252739                       Pseudo R2       =     0.1258

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0372929    .0360915      1.03    0.301     -.0334452      .108031
     radhlw1 |    .0167822    .0070862      2.37    0.018      .0028936     .0306709
avgcumdosew1 |    -1.15754    8.877823     -0.13    0.896     -18.55775     16.24267
      bf4Xd1 |   -.1079495    .1337235     -0.81    0.420     -.3700428     .1541438
      ageXd1 |     .024333      .13587      0.18    0.858     -.2419673     .2906334
       _cons |   -5.341428    2.129704     -2.51    0.012     -9.515572    -1.167284
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             0  |          0
     -     |        22           318  |        340
-----------+--------------------------+-----------
   Total   |        22           318  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    0.00%
Specificity                     Pr( -|~D)  100.00%
Positive predictive value       Pr( D| +)       .%
Negative predictive value       Pr(~D| -)   93.53%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.00%
False - rate for true D         Pr( -| D)  100.00%
False + rate for classified +   Pr(~D| +)       .%
False - rate for classified -   Pr( D| -)    6.47%
--------------------------------------------------
Correctly classified                        93.53%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       328
            Pearson chi2(322) =       344.70
                  Prob > chi2 =         0.1839

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -81.506     Log-Lik Full Model:          -71.253
D(334):                      142.505     LR(5):                        20.507
                                         Prob > LR:                     0.001
McFadden's R2:                 0.126     McFadden's Adj R2:             0.052
Maximum Likelihood R2:         0.059     Cragg & Uhler's R2:            0.154
McKelvey and Zavoina's R2:     0.526     Efron's R2:                    0.077
Variance of y*:                6.942     Variance of error:             3.290
Count R2:                      0.935     Adj Count R2:                  0.000
AIC:                           0.454     AIC*n:                       154.505
BIC:                       -1804.362     BIC':                          8.638

.
. scalar SigDosePrbfmhmMw1 = "no"

. scalar PrbfmhmModMw1 = "none"

. scalar MainEffPrbfmhmMw1= "age bf4"

. * 3 main effects signif   no main effect for dose  for males
.
.
. *-------Chunk 6  continued -testing meditors for females
. title4 "Partly Trimmed female wave 1"  "Dose => Problems with Family at home models"
-------------
Partly Trimmed female wave 1
-------------

. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40

. logit HP2pbfhm age  radhlw1 avgcumdosew1 bf4  if gender==2, iterate(50)

Iteration 0:   log likelihood = -139.75789
Iteration 1:   log likelihood = -110.07066
Iteration 2:   log likelihood = -103.23731
Iteration 3:   log likelihood = -103.06224
Iteration 4:   log likelihood =  -103.0617
Iteration 5:   log likelihood =  -103.0617

Logistic regression                               Number of obs   =        362
                                                  LR chi2(4)      =      73.39
                                                  Prob > chi2     =     0.0000
Log likelihood =  -103.0617                       Pseudo R2       =     0.2626

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0490304    .0173334      2.83    0.005      .0150575     .0830032
     radhlw1 |    .0175548    .0055923      3.14    0.002      .0065942     .0285154
avgcumdosew1 |   -.0824579    .2858577     -0.29    0.773     -.6427286     .4778129
         bf4 |   -.1768305    .0371748     -4.76    0.000     -.2496918    -.1039692
       _cons |   -4.266136    1.122392     -3.80    0.000     -6.465984    -2.066287
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        14             5  |         19
     -     |        33           310  |        343
-----------+--------------------------+-----------
   Total   |        47           315  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   29.79%
Specificity                     Pr( -|~D)   98.41%
Positive predictive value       Pr( D| +)   73.68%
Negative predictive value       Pr(~D| -)   90.38%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.59%
False - rate for true D         Pr( -| D)   70.21%
False + rate for classified +   Pr(~D| +)   26.32%
False - rate for classified -   Pr( D| -)    9.62%
--------------------------------------------------
Correctly classified                        89.50%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       360
            Pearson chi2(355) =       358.55
                  Prob > chi2 =         0.4373

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:     -139.758     Log-Lik Full Model:         -103.062
D(357):                      206.123     LR(4):                        73.392
                                         Prob > LR:                     0.000
McFadden's R2:                 0.263     McFadden's Adj R2:             0.227
Maximum Likelihood R2:         0.184     Cragg & Uhler's R2:            0.341
McKelvey and Zavoina's R2:     0.420     Efron's R2:                    0.242
Variance of y*:                5.668     Variance of error:             3.290
Count R2:                      0.895     Adj Count R2:                  0.191
AIC:                           0.597     AIC*n:                       216.123
BIC:                       -1897.194     BIC':                        -49.826

.
. scalar SigDosePrbfmhmFw1="no"

.
. *-------Chunk 6  continued -testing meditors for females
. title4 "More partly female Trimmed wave 1"  "Dose => Problems with Family at home models"
-------------
More partly female Trimmed wave 1
-------------

. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40

. logit HP2pbfhm age  bf4 bf40  if gender==2, iterate(50)

Iteration 0:   log likelihood = -139.89675
Iteration 1:   log likelihood = -112.36921
Iteration 2:   log likelihood = -106.24923
Iteration 3:   log likelihood = -106.12137
Iteration 4:   log likelihood = -106.12091
Iteration 5:   log likelihood = -106.12091

Logistic regression                               Number of obs   =        363
                                                  LR chi2(3)      =      67.55
                                                  Prob > chi2     =     0.0000
Log likelihood = -106.12091                       Pseudo R2       =     0.2414

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0636233     .017269      3.68    0.000      .0297767     .0974699
         bf4 |   -.2029758    .0392585     -5.17    0.000     -.2799211    -.1260305
        bf40 |   -.1942568     .091411     -2.13    0.034      -.373419    -.0150946
       _cons |   -3.085643    1.113267     -2.77    0.006     -5.267607    -.9036792
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        12             3  |         15
     -     |        35           313  |        348
-----------+--------------------------+-----------
   Total   |        47           316  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   25.53%
Specificity                     Pr( -|~D)   99.05%
Positive predictive value       Pr( D| +)   80.00%
Negative predictive value       Pr(~D| -)   89.94%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.95%
False - rate for true D         Pr( -| D)   74.47%
False + rate for classified +   Pr(~D| +)   20.00%
False - rate for classified -   Pr( D| -)   10.06%
--------------------------------------------------
Correctly classified                        89.53%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       341
            Pearson chi2(337) =       366.00
                  Prob > chi2 =         0.1331

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:     -139.897     Log-Lik Full Model:         -106.121
D(359):                      212.242     LR(3):                        67.552
                                         Prob > LR:                     0.000
McFadden's R2:                 0.241     McFadden's Adj R2:             0.213
Maximum Likelihood R2:         0.170     Cragg & Uhler's R2:            0.316
McKelvey and Zavoina's R2:     0.399     Efron's R2:                    0.224
Variance of y*:                5.470     Variance of error:             3.290
Count R2:                      0.895     Adj Count R2:                  0.191
AIC:                           0.607     AIC*n:                       220.242
BIC:                       -1903.849     BIC':                        -49.868

.
. scalar SigDosePrbfmhmFw1="no"

. scalar MainEffPrbfmhmFw1 = "age radhlw1 bf4"

. * 3 significant main effects for females
. * no significant main effect for dose
.
. * constructing moderators
.
. foreach var in bf4 bf40 {
  2. cap  gen `var'Xd1 = `var'*avgcumdosew1
  3.  }

.
.
. title4 "testing female moderator effects:  no moderator effects for females"
-------------
testing female moderator effects:  no moderator effects for females
-------------

.
. logit HP2pbfhm age bf4 bf40 ageXd1 bf4Xd1 bf40Xd1 if gender==2, iterate(50)

Iteration 0:   log likelihood = -139.89675
Iteration 1:   log likelihood = -112.27547
Iteration 2:   log likelihood = -106.13405
Iteration 3:   log likelihood = -105.51351
Iteration 4:   log likelihood = -105.50804
Iteration 5:   log likelihood = -105.50803
Iteration 6:   log likelihood = -105.50803

Logistic regression                               Number of obs   =        363
                                                  LR chi2(6)      =      68.78
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.50803                       Pseudo R2       =     0.2458

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0608384    .0177875      3.42    0.001      .0259756     .0957012
         bf4 |   -.2060931    .0500059     -4.12    0.000      -.304103    -.1080832
        bf40 |   -.1074502    .1266208     -0.85    0.396     -.3556225      .140722
      ageXd1 |    .0103515    .0150265      0.69    0.491     -.0190999      .039803
      bf4Xd1 |    .0257937    .0948566      0.27    0.786     -.1601219     .2117093
     bf40Xd1 |   -.2219543    .2551348     -0.87    0.384     -.7220092     .2781007
       _cons |   -3.197134    1.118642     -2.86    0.004     -5.389632    -1.004635
-------------+----------------------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       359
            Pearson chi2(352) =       359.71
                  Prob > chi2 =         0.3769

. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        13             4  |         17
     -     |        34           312  |        346
-----------+--------------------------+-----------
   Total   |        47           316  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   27.66%
Specificity                     Pr( -|~D)   98.73%
Positive predictive value       Pr( D| +)   76.47%
Negative predictive value       Pr(~D| -)   90.17%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.27%
False - rate for true D         Pr( -| D)   72.34%
False + rate for classified +   Pr(~D| +)   23.53%
False - rate for classified -   Pr( D| -)    9.83%
--------------------------------------------------
Correctly classified                        89.53%
--------------------------------------------------

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:     -139.897     Log-Lik Full Model:         -105.508
D(356):                      211.016     LR(6):                        68.777
                                         Prob > LR:                     0.000
McFadden's R2:                 0.246     McFadden's Adj R2:             0.196
Maximum Likelihood R2:         0.173     Cragg & Uhler's R2:            0.321
McKelvey and Zavoina's R2:     0.404     Efron's R2:                    0.226
Variance of y*:                5.517     Variance of error:             3.290
Count R2:                      0.895     Adj Count R2:                  0.191
AIC:                           0.620     AIC*n:                       225.016
BIC:                       -1887.391     BIC':                        -33.411

.
. scalar PrbfmhmModFw1="none"

.
. ********************************************************************************
. *---------Chunk 6 continued testing mediating effects for Problems with family
.  *  at home
.
.
. des bf4 bf40

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


. glm age avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm HP2pbfhm age  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  163.1004
Iteration 2:   deviance =  152.8997
Iteration 3:   deviance =  151.9532
Iteration 4:   deviance =  151.9347
Iteration 5:   deviance =  151.9347
Iteration 6:   deviance =  151.9347

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  151.9346518                    (1/df) Deviance =  .4495108
Pearson          =  324.8005072                    (1/df) Pearson  =  .9609482

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1818.249

-------------+----------------------------------------------------------------
             |                 EIM
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0296385    .0061334      4.83    0.000      .0176173     .0416597
       _cons |   -3.073816    .3430721     -8.96    0.000     -3.746225    -2.401407
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm bf4  avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1026.9659

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  24.75428
Deviance         =  8366.946191                    (1/df) Deviance =  24.75428
Pearson          =  8366.946191                    (1/df) Pearson  =  24.75428

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   6.05274
Log likelihood   = -1026.965868                    BIC             =  6396.763

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.1031788     .161925     -0.64    0.524     -.4205461     .2141884
       _cons |    12.54134    .2786337     45.01    0.000      11.99523     13.08746
-------------+----------------------------------------------------------------

. glm HP2pbfhm bf4  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  160.0024
Iteration 2:   deviance =  148.9095
Iteration 3:   deviance =  148.0472
Iteration 4:   deviance =  148.0358
Iteration 5:   deviance =  148.0358
Iteration 6:   deviance =  148.0358

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  148.0358223                    (1/df) Deviance =  .4379758
Pearson          =  318.8927909                    (1/df) Pearson  =  .9434698

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1822.148

-------------+----------------------------------------------------------------
             |                 EIM
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0752171    .0127773     -5.89    0.000     -.1002602    -.0501741
       _cons |   -.6910419    .1483563     -4.66    0.000     -.9818149     -.400269
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * age is a mediating effect for females for Dose=> Problems with family at home
. glm age avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1406.325

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =   136.455
Deviance         =  49260.25928                    (1/df) Deviance =   136.455
Pearson          =  49260.25928                    (1/df) Pearson  =   136.455

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.759366
Log likelihood   = -1406.325011                    BIC             =  47132.38

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.783267      6.16449
       _cons |    48.88157    .7187038     68.01    0.000      47.47293      50.2902
-------------+----------------------------------------------------------------

. glm HP2pbfhm age  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  252.4902
Iteration 2:   deviance =  245.4181
Iteration 3:   deviance =  245.1325
Iteration 4:   deviance =  245.1321
Iteration 5:   deviance =  245.1321

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  245.1320769                    (1/df) Deviance =  .6790362
Pearson          =  382.7456824                    (1/df) Pearson  =  1.060237

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1882.747

-------------+----------------------------------------------------------------
             |                 EIM
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .043836    .0066445      6.60    0.000       .030813      .056859
       _cons |   -3.477625    .3761287     -9.25    0.000     -4.214824    -2.740426
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * bf4 is a mediting effect for females for Dose=> Problems with family at home
. glm bf4  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.0162

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  26.52082
Deviance         =  9574.015672                    (1/df) Deviance =  26.52082
Pearson          =  9574.015672                    (1/df) Pearson  =  26.52082

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.121302
Log likelihood   = -1109.016226                    BIC             =  7446.136

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.474583    -.5430862
       _cons |    10.99384    .3168463     34.70    0.000      10.37284     11.61485
-------------+----------------------------------------------------------------

. glm HP2pbfhm bf4  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  240.0481
Iteration 2:   deviance =  229.4916
Iteration 3:   deviance =  228.6166
Iteration 4:   deviance =  228.5986
Iteration 5:   deviance =  228.5985
Iteration 6:   deviance =  228.5985

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  228.5985175                    (1/df) Deviance =  .6332369
Pearson          =  299.6186696                    (1/df) Pearson  =  .8299686

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1899.281

-------------+----------------------------------------------------------------
             |                 EIM
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1229375    .0145262     -8.46    0.000     -.1514083    -.0944667
       _cons |   -.0739521    .1322299     -0.56    0.576     -.3331179     .1852138
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. glm bf6  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1783.6957

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  1091.352
Deviance         =  393977.8948                    (1/df) Deviance =  1091.352
Pearson          =  393977.8948                    (1/df) Pearson  =  1091.352

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  9.838544
Log likelihood   = -1783.695663                    BIC             =    391850

-------------+----------------------------------------------------------------
             |                 OIM
          bf6 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    4.907676    3.160857      1.55    0.121     -1.287489     11.10284
       _cons |    53.46082    2.032533     26.30    0.000      49.47713     57.44452
-------------+----------------------------------------------------------------

. glm HP2pbfhm bf6  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =   270.845
Iteration 2:   deviance =  267.9149
Iteration 3:   deviance =  267.8425
Iteration 4:   deviance =  267.8424
Iteration 5:   deviance =  267.8424

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  267.8424366                    (1/df) Deviance =  .7419458
Pearson          =  362.9777402                    (1/df) Pearson  =  1.005479

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1860.037

-------------+----------------------------------------------------------------
             |                 EIM
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf6 |    .0094515    .0024584      3.84    0.000      .0046331     .0142698
       _cons |   -1.703802    .1741973     -9.78    0.000     -2.045223    -1.362382
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. glm bf7  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -902.44388

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  8.497656
Deviance         =   3067.65399                    (1/df) Deviance =  8.497656
Pearson          =   3067.65399                    (1/df) Pearson  =  8.497656

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  4.983162
Log likelihood   = -902.4438834                    BIC             =  939.7746

-------------+----------------------------------------------------------------
             |                 OIM
          bf7 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.3565771    .2789151     -1.28    0.201     -.9032407     .1900865
       _cons |    1.056277    .1793514      5.89    0.000      .7047548     1.407799
-------------+----------------------------------------------------------------

. glm HP2pbfhm bf7  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  277.1289
Iteration 2:   deviance =  275.4145
Iteration 3:   deviance =  275.2733
Iteration 4:   deviance =  275.2711
Iteration 5:   deviance =  275.2711

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  275.2710641                    (1/df) Deviance =  .7625237
Pearson          =  362.9709778                    (1/df) Pearson  =   1.00546

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1852.608

-------------+----------------------------------------------------------------
             |                 EIM
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf7 |   -.0808371    .0385299     -2.10    0.036     -.1563543    -.0053198
       _cons |   -1.081139    .0750775    -14.40    0.000     -1.228288    -.9339898
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar MainEffPrbfhmMw1 = "age bf4"

. scalar SigDosePrbfhmMw1 = "no"

. scalar SigDosePrbfmhmFw1="no"         // fix in others

. scalar PrbfmhmModMw1 = "none"

. scalar PrbfmhmModFw1="none"

. scalar MainEffPrbfmhmMw1= "age bf4"

.
. scalar MainEffPrbfmhmFw1 = "age radhlw1 bf4"

.
. scalar PrbfmhmMedMw1 = "age"

. scalar PrbfmhmMedFw1 = "age bf4"

. * Summary of dose=problems with family at home  mediating effects
. * males mediators age 1
. * females mediators age and BSIsoma rescaled (bf4) 2
.
. title4 "4. Summary matrix for problems with family at home"
-------------
4. Summary matrix for problems with family at home
-------------

.    matrix define prbfamMw1 = J(1,8, 0)

.         matrix define prbfamFw1 = J(1,8, 0)

. matrix colnames prbfamMw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.         matrix colnames prbfamFw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix define prbfamMw1= (1, 2, 1, 1, 0, 2, 0, 0 )

.         matrix define prbfamFw1= (1, 2, 1, 2, 0, 3, 0, 2)

.         matrix rowname prbfamMw1 = prbfamMw1

.         matrix rowname prbfamFw1 = prbfamFw1

.         matlist prbfamMw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
prbfamMw1   |         1            2            1            1            0            2            0            0

.         matlist prbfamFw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
prbfamFw1   |         1            2            1            2            0            3            0            2

.         matrix define H1pt2w1 = ( wkMw1 \ wkFw1 \ hmcrMw1 \ hmcrFw1 \ spMw1 \ spFw1 \ prbfamMw1 \ prbfamFw1)

.
.         matlist H1pt2w1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            1            1            2
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            2            0            2
spMw1   |         1            2            1            1            1            2            2            1
spFw1   |         1            2            1            2            0            5            0            2
prbfamMw1   |         1            2            1            1            0            2            0            0
prbfamFw1   |         1            2            1            2            0            3            0            2

.     matrix colnames H1pt2w1 =  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix rownames H1pt2w1 =   wkMw1 wkFw1 hmcrMw1 hmcrFw1 prbsocMw1 prbsocFw1 prbfhmMw1 prbfhmFw1

.     matlist H1pt2w1

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
wkMw1   |         1            2            1            1            0            2            0            1
wkFw1   |         1            2            1            2            0            1            1            2
hmcrMw1   |         1            2            1            1            0            2            0            1
hmcrFw1   |         1            2            1            2            0            2            0            2
prbsocMw1   |         1            2            1            1            1            2            2            1
prbsocFw1   |         1            2            1            2            0            5            0            2
prbfhmMw1   |         1            2            1            1            0            2            0            0
prbfhmFw1   |         1            2            1            2            0            3            0            2

.
.
.
. ********************************************************************************
. *-------Chunk 7   Dose==> problems with sex life impact
. * Chunk 7  General model for all part 2 of Nottingham Health Profile
.
. title "5.  H1 pt 2 wave 1 part2 H1 dose sex life impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****          5.  H1 pt 2 wave 1 part2 H1 dose sex life impact           *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:34  *****
*******************************************************************************
*******************************************************************************


.
. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
.   foreach var in HP2sxlife  {
  5.       forvalues k=1/2 {
  6. local w1bf bf1 bf4 bf9 bf10 bf11 bf14 bf15m bf20 bf22 bf30 bf40
  7. title "Full Nottingham Part 2 subscale models for male & females" ///
>  "Full main model for `var' for wave= `j' " ///
>   "chunk 7 H1 test:Gender= `k'  model Wave =  `j' for `e(depvar)' "
  8. di _skip(4)
  9.
. di _skip(4)
 10.
.
.       xi: logistic `var' age i.educ occ1w`j'-occ8w`j' ///
>                 marrw`j'1- marrw`j'3 marrw`j'5-marrw`j'6 inc1w`j'-inc4w`j' ///
>                 radhlw`j' havmil avgcumdosew`j' `w`j'bf'  ///
>                  deaw`j' dvcew`j' sepaw`j' accdw`j' movew`j' ///
>                 illw`j' shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j' ///
>                  havmilsq radhlw1 if gender==`k', coef  difficult iterate(50)
 11.                         estat class
 12.                         estat gof
 13.                         fitstat
 14. }
 15. }
 16. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****     Full Nottingham Part 2 subscale models for male & females       *****
*****             Full main model for HP2sxlife for wave= 1               *****
*****      chunk 7 H1 test:Gender= 1  model Wave =  1 for HP2pbfhm        *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:34  *****
*******************************************************************************
*******************************************************************************


i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 12 obs not used

note: _Ieduc_7 != 0 predicts failure perfectly
      _Ieduc_7 dropped and 4 obs not used

note: marrw12 != 0 predicts failure perfectly
      marrw12 dropped and 5 obs not used

note: marrw15 != 0 predicts success perfectly
      marrw15 dropped and 1 obs not used

note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 20 obs not used

note: dvcew1 != 0 predicts failure perfectly
      dvcew1 dropped and 2 obs not used

note: sepaw1 != 0 predicts success perfectly
      sepaw1 dropped and 1 obs not used

note: _Ieduc_8 omitted because of collinearity
note: marrw16 omitted because of collinearity
note: radhlw1 omitted because of collinearity

Logistic regression                               Number of obs   =        288
                                                  LR chi2(43)     =     149.61
                                                  Prob > chi2     =     0.0000
Log likelihood = -77.748591                       Pseudo R2       =     0.4904

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .136472    .0366667      3.72    0.000      .0646066     .2083374
    _Ieduc_2 |    .9061528    2.373186      0.38    0.703     -3.745206     5.557512
    _Ieduc_3 |    1.126364    2.057334      0.55    0.584     -2.905936     5.158664
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    .4719974    2.096628      0.23    0.822     -3.637317     4.581312
    _Ieduc_6 |    1.043192    2.050556      0.51    0.611     -2.975823     5.062208
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w1 |   -2.803127     2.35705     -1.19    0.234     -7.422861     1.816606
      occ2w1 |   -2.898533    2.359872     -1.23    0.219     -7.523797     1.726731
      occ3w1 |   -3.662112    2.523184     -1.45    0.147     -8.607462     1.283238
      occ4w1 |   -2.435194    2.370439     -1.03    0.304      -7.08117     2.210782
      occ5w1 |   -5.879936    2.735652     -2.15    0.032     -11.24172    -.5181554
      occ6w1 |    -.066721      2.7504     -0.02    0.981     -5.457405     5.323963
      occ7w1 |    -3.83747    3.050515     -1.26    0.208      -9.81637      2.14143
      occ8w1 |    -2.95823    2.351973     -1.26    0.208     -7.568013     1.651553
     marrw11 |    8.464083     907.837      0.01    0.993     -1770.864     1787.792
     marrw12 |           0   (omitted)
     marrw13 |    6.092151    907.8374      0.01    0.995     -1773.236     1785.421
     marrw15 |           0   (omitted)
     marrw16 |           0   (omitted)
      inc1w1 |    5.396209    3.075845      1.75    0.079     -.6323357     11.42475
      inc2w1 |    5.263232    2.974878      1.77    0.077      -.567422     11.09389
      inc3w1 |    4.958244    2.931498      1.69    0.091     -.7873865     10.70387
      inc4w1 |    3.505305    3.128247      1.12    0.262     -2.625946     9.636556
     radhlw1 |     .005437    .0073698      0.74    0.461     -.0090075     .0198816
      havmil |   -.0008616     .007551     -0.11    0.909     -.0156613     .0139381
avgcumdosew1 |    .0450522     .105977      0.43    0.671      -.162659     .2527634
         bf1 |    .0721133    .0467218      1.54    0.123     -.0194598     .1636864
         bf4 |   -.3272064    .0723192     -4.52    0.000     -.4689494    -.1854635
         bf9 |   -.0022701    .0341874     -0.07    0.947     -.0692761     .0647359
        bf10 |   -.0510813    .0368445     -1.39    0.166     -.1232952     .0211325
        bf11 |    .2631067    .1226965      2.14    0.032      .0226261     .5035874
        bf14 |   -.0000418    .0000857     -0.49    0.626     -.0002098     .0001262
       bf15m |           0   (omitted)
        bf20 |   -.0698283    .0411461     -1.70    0.090     -.1504731     .0108166
        bf22 |    .0001486    .0001281      1.16    0.246     -.0001025     .0003997
        bf30 |   -.0002299    .0004245     -0.54    0.588     -.0010618     .0006021
        bf40 |    .0950229    .1871851      0.51    0.612     -.2718532     .4618989
       deaw1 |     .659494    .4055746      1.63    0.104     -.1354176     1.454406
      dvcew1 |           0   (omitted)
      sepaw1 |           0   (omitted)
      accdw1 |   -.8665368    1.711081     -0.51    0.613     -4.220195     2.487121
      movew1 |    1.595582    .6025445      2.65    0.008      .4146162     2.776547
       illw1 |     -.39832    .6674749     -0.60    0.551     -1.706547     .9099067
     shfamw1 |    .0030017    .0095071      0.32    0.752     -.0156319     .0216353
      shhlw1 |    .0103775    .0141593      0.73    0.464     -.0173742     .0381292
     shjobw1 |    -.010105    .0099165     -1.02    0.308      -.029541      .009331
    shrelaw1 |    .0000546    .0095661      0.01    0.995     -.0186946     .0188037
     suprtw1 |    .0999707    .0455218      2.20    0.028      .0107496     .1891917
     suchrw1 |    .0224317    .0297831      0.75    0.451      -.035942     .0808055
    havmilsq |   -1.68e-06    .0000133     -0.13    0.900     -.0000278     .0000245
     radhlw1 |           0   (omitted)
       _cons |   -18.64541    907.8458     -0.02    0.984      -1797.99       1760.7
-------------+----------------------------------------------------------------


Note: 2 failures and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        43            12  |         55
     -     |        21           212  |        233
-----------+--------------------------+-----------
   Total   |        64           224  |        288

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   67.19%
Specificity                     Pr( -|~D)   94.64%
Positive predictive value       Pr( D| +)   78.18%
Negative predictive value       Pr(~D| -)   90.99%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.36%
False - rate for true D         Pr( -| D)   32.81%
False + rate for classified +   Pr(~D| +)   21.82%
False - rate for classified -   Pr( D| -)    9.01%
--------------------------------------------------
Correctly classified                        88.54%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       288
 number of covariate patterns =       288
            Pearson chi2(244) =       242.82
                  Prob > chi2 =         0.5093

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -152.555     Log-Lik Full Model:          -77.749
D(234):                      155.497     LR(43):                      149.614
                                         Prob > LR:                     0.000
McFadden's R2:                 0.490     McFadden's Adj R2:             0.136
Maximum Likelihood R2:         0.405     Cragg & Uhler's R2:            0.620
McKelvey and Zavoina's R2:     0.766     Efron's R2:                    0.518
Variance of y*:               14.056     Variance of error:             3.290
Count R2:                      0.885     Adj Count R2:                  0.484
AIC:                           0.915     AIC*n:                       263.497
BIC:                       -1169.636     BIC':                         93.894


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****     Full Nottingham Part 2 subscale models for male & females       *****
*****             Full main model for HP2sxlife for wave= 1               *****
*****     chunk 7 H1 test:Gender= 2  model Wave =  1 for HP2sxlife        *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:35  *****
*******************************************************************************
*******************************************************************************


i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 11 obs not used

note: _Ieduc_8 omitted because of collinearity
note: radhlw1 omitted because of collinearity

Logistic regression                               Number of obs   =        347
                                                  LR chi2(50)     =     155.79
                                                  Prob > chi2     =     0.0000
Log likelihood = -124.80461                       Pseudo R2       =     0.3843

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1290605    .0254171      5.08    0.000      .0792439     .1788771
    _Ieduc_2 |   -10.67087    962.4723     -0.01    0.991     -1897.082      1875.74
    _Ieduc_3 |   -9.946262    962.4723     -0.01    0.992     -1896.357     1876.465
    _Ieduc_4 |   -9.785405    962.4726     -0.01    0.992     -1896.197     1876.626
    _Ieduc_5 |   -11.49393    962.4724     -0.01    0.990     -1897.905     1874.917
    _Ieduc_6 |   -10.32295    962.4722     -0.01    0.991     -1896.734     1876.088
    _Ieduc_7 |    -9.03504    962.4749     -0.01    0.993     -1895.451     1877.381
    _Ieduc_8 |           0   (omitted)
      occ1w1 |   -2.600034    2.055585     -1.26    0.206     -6.628907      1.42884
      occ2w1 |   -1.277677    2.051101     -0.62    0.533     -5.297761     2.742406
      occ3w1 |   -1.369222    2.057018     -0.67    0.506     -5.400903     2.662459
      occ4w1 |   -1.559837     2.12733     -0.73    0.463     -5.729327     2.609653
      occ5w1 |   -2.429826    2.192792     -1.11    0.268     -6.727619     1.867967
      occ6w1 |   -3.419242    2.325888     -1.47    0.142     -7.977899     1.139414
      occ7w1 |   -2.504352    2.176283     -1.15    0.250     -6.769788     1.761083
      occ8w1 |   -1.334187    2.100551     -0.64    0.525     -5.451192     2.782817
     marrw11 |   -.7193048    1.925081     -0.37    0.709     -4.492394     3.053784
     marrw12 |    .4856708    2.564006      0.19    0.850     -4.539688      5.51103
     marrw13 |    -2.16757    1.867036     -1.16    0.246     -5.826893     1.491753
     marrw15 |   -3.042565    2.275798     -1.34    0.181     -7.503047     1.417918
     marrw16 |   -1.841276    2.263324     -0.81    0.416      -6.27731     2.594759
      inc1w1 |    1.620964    1.976337      0.82    0.412     -2.252585     5.494512
      inc2w1 |    1.094487    1.946444      0.56    0.574     -2.720473     4.909448
      inc3w1 |    .8486289    1.968571      0.43    0.666     -3.009699     4.706957
      inc4w1 |    1.499966    2.134492      0.70    0.482     -2.683562     5.683494
     radhlw1 |     .007034    .0058778      1.20    0.231     -.0044862     .0185542
      havmil |   -.0000651    .0025878     -0.03    0.980     -.0051371     .0050069
avgcumdosew1 |     .599348    .3177091      1.89    0.059     -.0233504     1.222046
         bf1 |    .0066905    .0314561      0.21    0.832     -.0549623     .0683434
         bf4 |   -.1521557    .0440097     -3.46    0.001     -.2384131    -.0658983
         bf9 |   -.0233371    .0265441     -0.88    0.379     -.0753625     .0286883
        bf10 |   -.0152265    .0136272     -1.12    0.264     -.0419352     .0114823
        bf11 |   -.0221841    .0445913     -0.50    0.619     -.1095814     .0652131
        bf14 |   -.0000349    .0000708     -0.49    0.622     -.0001736     .0001039
       bf15m |           0   (omitted)
        bf20 |   -.0007465    .0262029     -0.03    0.977     -.0521033     .0506104
        bf22 |    .0000643    .0000756      0.85    0.395      -.000084     .0002126
        bf30 |    .0002306    .0003007      0.77    0.443     -.0003588       .00082
        bf40 |   -.0231935    .1067574     -0.22    0.828      -.232434     .1860471
       deaw1 |    .0559916    .1861244      0.30    0.764     -.3088055     .4207887
      dvcew1 |    .4752968    3.360983      0.14    0.888     -6.112108     7.062702
      sepaw1 |    .3375739     3.57474      0.09    0.925     -6.668788     7.343935
      accdw1 |   -.4123297    .8114545     -0.51    0.611     -2.002751     1.178092
      movew1 |    .7332906    .5919892      1.24    0.215     -.4269869     1.893568
       illw1 |    .1110447    .3242585      0.34    0.732     -.5244903     .7465798
     shfamw1 |   -.0101274    .0070668     -1.43    0.152     -.0239782     .0037233
      shhlw1 |   -.0168708    .0106127     -1.59    0.112     -.0376714     .0039298
     shjobw1 |    .0173829    .0076332      2.28    0.023       .002422     .0323437
    shrelaw1 |   -.0004942    .0067313     -0.07    0.941     -.0136874      .012699
     suprtw1 |    .0056448    .0100346      0.56    0.574     -.0140226     .0253123
     suchrw1 |   -.0012594    .0144683     -0.09    0.931     -.0296168     .0270979
    havmilsq |   -2.25e-07    1.46e-06     -0.15    0.877     -3.08e-06     2.63e-06
     radhlw1 |           0   (omitted)
       _cons |    5.782713    962.4763      0.01    0.995     -1880.636     1892.202
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        57            20  |         77
     -     |        37           233  |        270
-----------+--------------------------+-----------
   Total   |        94           253  |        347

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   60.64%
Specificity                     Pr( -|~D)   92.09%
Positive predictive value       Pr( D| +)   74.03%
Negative predictive value       Pr(~D| -)   86.30%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.91%
False - rate for true D         Pr( -| D)   39.36%
False + rate for classified +   Pr(~D| +)   25.97%
False - rate for classified -   Pr( D| -)   13.70%
--------------------------------------------------
Correctly classified                        83.57%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       347
 number of covariate patterns =       347
            Pearson chi2(296) =       311.56
                  Prob > chi2 =         0.2559

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -202.698     Log-Lik Full Model:         -124.805
D(293):                      249.609     LR(50):                      155.788
                                         Prob > LR:                     0.000
McFadden's R2:                 0.384     McFadden's Adj R2:             0.118
Maximum Likelihood R2:         0.362     Cragg & Uhler's R2:            0.525
McKelvey and Zavoina's R2:     0.605     Efron's R2:                    0.422
Variance of y*:                8.326     Variance of error:             3.290
Count R2:                      0.836     Adj Count R2:                  0.394
AIC:                           1.031     AIC*n:                       357.609
BIC:                       -1464.243     BIC':                        136.679

.
. *-----Chunk 7 dose3 moderator => sex life impact----------------------------
. title4 "Chunk 7 partly trimmed male model of dose=>HP2sxlife relationship in wave 1"
-------------
Chunk 7 partly trimmed male model of dose=>HP2sxlife relationship in wave 1
-------------

.         forvalues j=1/1 {
  2.         set more off
  3. di as input  "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  4. di as input  "wave 1 male dose avgcumdosew`j' main effect not signif"
  5.         logit HP2sxlife age occ1w1-occ7w1 inc1w1-inc4w1 bf4 bf40  ///
>            if gender==1
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }
trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
wave 1 male dose avgcumdosew1 main effect not signif

Iteration 0:   log likelihood = -171.51396
Iteration 1:   log likelihood = -118.07472
Iteration 2:   log likelihood = -110.61729
Iteration 3:   log likelihood =  -110.3575
Iteration 4:   log likelihood = -110.35718
Iteration 5:   log likelihood = -110.35718

Logistic regression                               Number of obs   =        340
                                                  LR chi2(14)     =     122.31
                                                  Prob > chi2     =     0.0000
Log likelihood = -110.35718                       Pseudo R2       =     0.3566

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0941116    .0221002      4.26    0.000      .0507959     .1374272
      occ1w1 |   -.8108243    .6947007     -1.17    0.243     -2.172413     .5507641
      occ2w1 |   -.8508826    .7171286     -1.19    0.235     -2.256429     .5546637
      occ3w1 |   -.8480358    .9624232     -0.88    0.378     -2.734351     1.038279
      occ4w1 |   -.4031164    .7298235     -0.55    0.581     -1.833544     1.027311
      occ5w1 |    -3.36185     1.50629     -2.23    0.026     -6.314124    -.4095757
      occ6w1 |   -.2905401    1.302685     -0.22    0.824     -2.843755     2.262675
      occ7w1 |   -.2498895    1.738151     -0.14    0.886     -3.656603     3.156824
      inc1w1 |    1.792574    .9507668      1.89    0.059     -.0708952     3.656042
      inc2w1 |    1.897351    .9299892      2.04    0.041      .0746052     3.720096
      inc3w1 |    1.708189    .9374578      1.82    0.068     -.1291946     3.545573
      inc4w1 |    1.397502    1.070212      1.31    0.192     -.7000754      3.49508
         bf4 |   -.2058489    .0355202     -5.80    0.000     -.2754671    -.1362307
        bf40 |    .2384671    .1033522      2.31    0.021      .0359004     .4410337
       _cons |   -5.837351    1.560717     -3.74    0.000     -8.896301    -2.778402
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        35            17  |         52
     -     |        34           254  |        288
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   50.72%
Specificity                     Pr( -|~D)   93.73%
Positive predictive value       Pr( D| +)   67.31%
Negative predictive value       Pr(~D| -)   88.19%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.27%
False - rate for true D         Pr( -| D)   49.28%
False + rate for classified +   Pr(~D| +)   32.69%
False - rate for classified -   Pr( D| -)   11.81%
--------------------------------------------------
Correctly classified                        85.00%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       324
            Pearson chi2(309) =       279.35
                  Prob > chi2 =         0.8861

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -110.357
D(325):                      220.714     LR(14):                      122.314
                                         Prob > LR:                     0.000
McFadden's R2:                 0.357     McFadden's Adj R2:             0.269
Maximum Likelihood R2:         0.302     Cragg & Uhler's R2:            0.476
McKelvey and Zavoina's R2:     0.514     Efron's R2:                    0.374
Variance of y*:                6.767     Variance of error:             3.290
Count R2:                      0.850     Adj Count R2:                  0.261
AIC:                           0.737     AIC*n:                       250.714
BIC:                       -1673.693     BIC':                        -40.708

.
. scalar MaineffhmcrMw1 = "age bf4 bf40"

.
. title "Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 1*****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:39  *****
*******************************************************************************
*******************************************************************************


. title4 "h1 pt 2 wave 1 dose=> sex life impact on males"
-------------
h1 pt 2 wave 1 dose=> sex life impact on males
-------------

.         forvalues j=1/1 {
  2. set more off
  3. des occ5w1 inc1w1 inc2w1 inc3w1
  4. di as input  "fully trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  5. di as input  "wave 1 male dose avgcumdosew`j' main effect not signif"
  6.         logit HP2sxlife age  bf4 bf40  shjobw`j' shrelaw`j'  radhlw`j' if gender==1
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }

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


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


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


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


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


fully trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
wave 1 male dose avgcumdosew1 main effect not signif

Iteration 0:   log likelihood = -171.51396
Iteration 1:   log likelihood = -121.19042
Iteration 2:   log likelihood = -114.60006
Iteration 3:   log likelihood = -114.41503
Iteration 4:   log likelihood = -114.41445
Iteration 5:   log likelihood = -114.41445

Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =     114.20
                                                  Prob > chi2     =     0.0000
Log likelihood = -114.41445                       Pseudo R2       =     0.3329

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0617919    .0157391      3.93    0.000      .0309439       .09264
         bf4 |   -.1966537    .0409434     -4.80    0.000     -.2769013    -.1164061
        bf40 |    .2838331    .1042379      2.72    0.006      .0795305     .4881356
     shjobw1 |   -.0050343    .0063951     -0.79    0.431     -.0175685     .0074999
    shrelaw1 |   -.0020982    .0048927     -0.43    0.668     -.0116877     .0074913
     radhlw1 |    .0066138    .0047502      1.39    0.164     -.0026965     .0159241
       _cons |   -3.247623    1.168417     -2.78    0.005     -5.537679    -.9575672
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        33            16  |         49
     -     |        36           255  |        291
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   47.83%
Specificity                     Pr( -|~D)   94.10%
Positive predictive value       Pr( D| +)   67.35%
Negative predictive value       Pr(~D| -)   87.63%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.90%
False - rate for true D         Pr( -| D)   52.17%
False + rate for classified +   Pr(~D| +)   32.65%
False - rate for classified -   Pr( D| -)   12.37%
--------------------------------------------------
Correctly classified                        84.71%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       335
            Pearson chi2(328) =       293.15
                  Prob > chi2 =         0.9171

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -114.414
D(333):                      228.829     LR(6):                       114.199
                                         Prob > LR:                     0.000
McFadden's R2:                 0.333     McFadden's Adj R2:             0.292
Maximum Likelihood R2:         0.285     Cragg & Uhler's R2:            0.449
McKelvey and Zavoina's R2:     0.477     Efron's R2:                    0.350
Variance of y*:                6.291     Variance of error:             3.290
Count R2:                      0.847     Adj Count R2:                  0.246
AIC:                           0.714     AIC*n:                       242.829
BIC:                       -1712.210     BIC':                        -79.225

.
. des bf4 bf40

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


. scalar MainEffsxlifeMw1 = "age bf4 bf40 "

. scalar SigDosesxlifeMw1 = "no"

.
.
. forvalues j=1/1 {
  2. title4 "trimmed HP2sxlife main effects models wave `j' for H1 part 2 with dose ns"
  3. title4 "Wave `j dose HPsxlife relationship but avgcumdosew`j': Dose not signif"
  4. }
-------------
trimmed HP2sxlife main effects models wave 1 for H1 part 2 with dose ns
-------------
-------------
Wave `j dose HPsxlife relationship but avgcumdosew1: Dose not signif
-------------

.
. cap gen bf4Xd1= bf4*avgcumdosew1

. cap gen radhlw1Xd1 = radhlw1*avgcumdosew1

. cap gen ageXd1 = age*avgcumdosew1

.
. set more off

. des bf4

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


. forvalues j=1/1 {
  2.                 sw, pr(.1):logistic HP2sxlife age bf4  ///
>                 avgcumdosew`j'  ageXd1 bf4Xd1 radhlw1Xd1  if gender==1, coef
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }


  begin with full model


p = 0.6350 >= 0.1000  removing bf4Xd1


p = 0.4431 >= 0.1000  removing radhlw1Xd1


p = 0.1068 >= 0.1000  removing avgcumdosew1


p = 0.4455 >= 0.1000  removing ageXd1


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =     105.30
                                                  Prob > chi2     =     0.0000
Log likelihood = -118.86164                       Pseudo R2       =     0.3070

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0735516    .0151718      4.85    0.000      .0438154     .1032879
         bf4 |   -.2011944    .0322322     -6.24    0.000     -.2643683    -.1380205
       _cons |   -3.058766    .9461336     -3.23    0.001     -4.913154    -1.204378
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        32            14  |         46
     -     |        37           257  |        294
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   46.38%
Specificity                     Pr( -|~D)   94.83%
Positive predictive value       Pr( D| +)   69.57%
Negative predictive value       Pr(~D| -)   87.41%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.17%
False - rate for true D         Pr( -| D)   53.62%
False + rate for classified +   Pr(~D| +)   30.43%
False - rate for classified -   Pr( D| -)   12.59%
--------------------------------------------------
Correctly classified                        85.00%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       222
            Pearson chi2(219) =       215.06
                  Prob > chi2 =         0.5625

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -118.862
D(337):                      237.723     LR(2):                       105.305
                                         Prob > LR:                     0.000
McFadden's R2:                 0.307     McFadden's Adj R2:             0.289
Maximum Likelihood R2:         0.266     Cragg & Uhler's R2:            0.419
McKelvey and Zavoina's R2:     0.435     Efron's R2:                    0.320
Variance of y*:                5.825     Variance of error:             3.290
Count R2:                      0.850     Adj Count R2:                  0.261
AIC:                           0.717     AIC*n:                       243.723
BIC:                       -1726.631     BIC':                        -93.647

.
. scalar sxlifeModMw1 = "none"

. *xx male moderators: no main significant dose effect
. *xx no male moderators for sexlife impact
.
.
.
. title4 "H1 pt2 wave 1 female dose=> sexlife impact models"
-------------
H1 pt2 wave 1 female dose=> sexlife impact models
-------------

.
.  *-----Chunk 7 dose3 moderator => sex life impact----------------------------
. di as input "chunk 7  female wave=3"
chunk 7  female wave=3

. title "Chunk 7 trimmed female model:" "dose and HP2sxlife relationship in wave 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                   Chunk 7 trimmed female model:                     *****
*****             dose and HP2sxlife relationship in wave 1               *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:49  *****
*******************************************************************************
*******************************************************************************


. * female models
.         forvalues j=1/1 {
  2.
. set more off
  3. des bf4 bf4m shfamw1 shrelaw1 avgcumdosew1
  4. title4 "trimmed HP2sexlife main effects models" "wave 1 for H1 part 2 with dose ns"
  5. title4 "wave 1 dose HP2sexlife relationship" "avgcumdosew`j' Dose not signif"
  6.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>             avgcumdosew`j'  if gender==2
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


shrelaw1          double   %8.0g                        Percentage of strains and hassles related to relationships in 1986


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


-------------
trimmed HP2sexlife main effects models
-------------
-------------
wave 1 dose HP2sexlife relationship
-------------

Iteration 0:   log likelihood = -207.32098
Iteration 1:   log likelihood = -149.84784
Iteration 2:   log likelihood = -145.01939
Iteration 3:   log likelihood = -144.95408
Iteration 4:   log likelihood = -144.95402
Iteration 5:   log likelihood = -144.95402

Logistic regression                               Number of obs   =        362
                                                  LR chi2(5)      =     124.73
                                                  Prob > chi2     =     0.0000
Log likelihood = -144.95402                       Pseudo R2       =     0.3008

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0771236    .0150604      5.12    0.000      .0476059     .1066414
     radhlw1 |    .0062168    .0040945      1.52    0.129     -.0018083     .0142418
         bf4 |   -.5739615     .185844     -3.09    0.002     -.9382091    -.2097139
        bf4m |    .3919975    .1717276      2.28    0.022      .0554176     .7285774
avgcumdosew1 |    .3818052    .2467519      1.55    0.122     -.1018197     .8654301
       _cons |   -7.066627    1.552843     -4.55    0.000     -10.11014    -4.023111
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        51            22  |         73
     -     |        43           246  |        289
-----------+--------------------------+-----------
   Total   |        94           268  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   54.26%
Specificity                     Pr( -|~D)   91.79%
Positive predictive value       Pr( D| +)   69.86%
Negative predictive value       Pr(~D| -)   85.12%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.21%
False - rate for true D         Pr( -| D)   45.74%
False + rate for classified +   Pr(~D| +)   30.14%
False - rate for classified -   Pr( D| -)   14.88%
--------------------------------------------------
Correctly classified                        82.04%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       360
            Pearson chi2(354) =       377.83
                  Prob > chi2 =         0.1837

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.321     Log-Lik Full Model:         -144.954
D(356):                      289.908     LR(5):                       124.734
                                         Prob > LR:                     0.000
McFadden's R2:                 0.301     McFadden's Adj R2:             0.272
Maximum Likelihood R2:         0.291     Cragg & Uhler's R2:            0.427
McKelvey and Zavoina's R2:     0.451     Efron's R2:                    0.348
Variance of y*:                5.995     Variance of error:             3.290
Count R2:                      0.820     Adj Count R2:                  0.309
AIC:                           0.834     AIC*n:                       301.908
BIC:                       -1807.517     BIC':                        -95.276

. scalar SigDoseSxlifeFw1 = "no"

. scalar MainEffsxlifeFw1 = "age bf4 bf4m"

. *-----  constructing possible moderators
.
.       foreach var in bf4 bf4m shfamw1 shrelaw1 radhlw1 {
  2.        cap gen `var'Xd1 = `var'*avgcumdosew1
  3.          }

.
. scalar sxlifeModFw1="none"

. scalar SigDoseSxlifeFw1 = "none"

.
.
.
.  *----- testing female moderators
. title "partly trimmed female moderator model of dose & HP2sxlife relationship in wv 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****partly trimmed female moderator model of dose & HP2sxlife relationship in wv 1*****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:50  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=1/1 {
  2. set more off
  3. des bf4 bf4m shfamw1 shrelaw1 avgcumdosew1
  4. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  5. title "wave 1 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  6.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>            shrelaw`j' avgcumdosew`j' radhlw`j'Xd1 ///
>            bf4Xd1 shrelaw1Xd1  if gender==2
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


shrelaw1          double   %8.0g                        Percentage of strains and hassles related to relationships in 1986


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
18 Jun 2012
18:16:50
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide16june2012.dta  currrently has  2386  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 1 dose HP2sexlife relationship but avgcumdosew1: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:50  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -207.32098
Iteration 1:   log likelihood = -147.41511
Iteration 2:   log likelihood = -141.75413
Iteration 3:   log likelihood = -141.62542
Iteration 4:   log likelihood = -141.62494
Iteration 5:   log likelihood = -141.62494

Logistic regression                               Number of obs   =        362
                                                  LR chi2(9)      =     131.39
                                                  Prob > chi2     =     0.0000
Log likelihood = -141.62494                       Pseudo R2       =     0.3169

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0814535    .0153556      5.30    0.000      .0513571       .11155
     radhlw1 |    .0024977    .0049558      0.50    0.614     -.0072155     .0122108
         bf4 |   -.5313372    .1875606     -2.83    0.005     -.8989493    -.1637251
        bf4m |    .4140426    .1747902      2.37    0.018      .0714601     .7566252
    shrelaw1 |   -.0104094    .0067432     -1.54    0.123     -.0236259     .0028071
avgcumdosew1 |    .8771287    .9794814      0.90    0.371      -1.04262     2.796877
  radhlw1Xd1 |    .0106434    .0087424      1.22    0.223     -.0064914     .0277781
      bf4Xd1 |   -.2197957    .1330334     -1.65    0.098     -.4805363      .040945
 shrelaw1Xd1 |    .0233442    .0154714      1.51    0.131     -.0069791     .0536676
       _cons |   -7.515707    1.659151     -4.53    0.000     -10.76758     -4.26383
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        51            21  |         72
     -     |        43           247  |        290
-----------+--------------------------+-----------
   Total   |        94           268  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   54.26%
Specificity                     Pr( -|~D)   92.16%
Positive predictive value       Pr( D| +)   70.83%
Negative predictive value       Pr(~D| -)   85.17%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.84%
False - rate for true D         Pr( -| D)   45.74%
False + rate for classified +   Pr(~D| +)   29.17%
False - rate for classified -   Pr( D| -)   14.83%
--------------------------------------------------
Correctly classified                        82.32%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       361
            Pearson chi2(351) =       368.67
                  Prob > chi2 =         0.2479

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.321     Log-Lik Full Model:         -141.625
D(352):                      283.250     LR(9):                       131.392
                                         Prob > LR:                     0.000
McFadden's R2:                 0.317     McFadden's Adj R2:             0.269
Maximum Likelihood R2:         0.304     Cragg & Uhler's R2:            0.446
McKelvey and Zavoina's R2:     0.536     Efron's R2:                    0.365
Variance of y*:                7.085     Variance of error:             3.290
Count R2:                      0.823     Adj Count R2:                  0.319
AIC:                           0.838     AIC*n:                       303.250
BIC:                       -1790.609     BIC':                        -78.367

. // trimming further
. title "fully female moderator model of dose & HP2sxlife relationship in wv 1"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****fully female moderator model of dose & HP2sxlife relationship in wv 1*****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:51  *****
*******************************************************************************
*******************************************************************************


.
.
. * female models
. set more off

.         forvalues j=1/1 {
  2. des bf4 bf4m shfamw1 shrelaw1 avgcumdosew1
  3. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  4. title "wave 1 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  5.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>            shrelaw1   avgcumdosew`j'  ///
>           shrelaw1Xd1 if gender==2
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


shrelaw1          double   %8.0g                        Percentage of strains and hassles related to relationships in 1986


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
18 Jun 2012
18:16:51
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide16june2012.dta  currrently has  2386  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 1 dose HP2sexlife relationship but avgcumdosew1: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:51  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -207.32098
Iteration 1:   log likelihood = -148.73094
Iteration 2:   log likelihood = -143.96367
Iteration 3:   log likelihood = -143.91142
Iteration 4:   log likelihood = -143.91139
Iteration 5:   log likelihood = -143.91139

Logistic regression                               Number of obs   =        362
                                                  LR chi2(7)      =     126.82
                                                  Prob > chi2     =     0.0000
Log likelihood = -143.91139                       Pseudo R2       =     0.3059

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0780855    .0151068      5.17    0.000      .0484767     .1076944
     radhlw1 |    .0057692    .0041216      1.40    0.162     -.0023091     .0138474
         bf4 |   -.5774463    .1888057     -3.06    0.002     -.9474987    -.2073939
        bf4m |    .3915506    .1745706      2.24    0.025      .0493985     .7337026
    shrelaw1 |   -.0078788    .0061361     -1.28    0.199     -.0199053     .0041477
avgcumdosew1 |    .0233678    .3583816      0.07    0.948     -.6790473     .7257829
 shrelaw1Xd1 |    .0143198    .0116222      1.23    0.218     -.0084592     .0370989
       _cons |   -6.851526    1.575045     -4.35    0.000     -9.938557    -3.764495
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        53            23  |         76
     -     |        41           245  |        286
-----------+--------------------------+-----------
   Total   |        94           268  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   56.38%
Specificity                     Pr( -|~D)   91.42%
Positive predictive value       Pr( D| +)   69.74%
Negative predictive value       Pr(~D| -)   85.66%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.58%
False - rate for true D         Pr( -| D)   43.62%
False + rate for classified +   Pr(~D| +)   30.26%
False - rate for classified -   Pr( D| -)   14.34%
--------------------------------------------------
Correctly classified                        82.32%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       361
            Pearson chi2(353) =       375.36
                  Prob > chi2 =         0.1978

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.321     Log-Lik Full Model:         -143.911
D(354):                      287.823     LR(7):                       126.819
                                         Prob > LR:                     0.000
McFadden's R2:                 0.306     McFadden's Adj R2:             0.267
Maximum Likelihood R2:         0.296     Cragg & Uhler's R2:            0.433
McKelvey and Zavoina's R2:     0.465     Efron's R2:                    0.353
Variance of y*:                6.146     Variance of error:             3.290
Count R2:                      0.823     Adj Count R2:                  0.319
AIC:                           0.839     AIC*n:                       303.823
BIC:                       -1797.819     BIC':                        -85.578

. * female models
.         forvalues j=1/1 {
  2. des bf4 bf4m shfamw1 shrelaw1 avgcumdosew1
  3. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  4. title "wave 1 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  5.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>            shrelaw1 shfamw`j'   ///
>           if gender==2
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


shrelaw1          double   %8.0g                        Percentage of strains and hassles related to relationships in 1986


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
18 Jun 2012
18:16:53
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide16june2012.dta  currrently has  2386  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 1 dose HP2sexlife relationship but avgcumdosew1: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:16:53  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -207.32098
Iteration 1:   log likelihood = -151.03193
Iteration 2:   log likelihood = -146.24555
Iteration 3:   log likelihood = -146.19381
Iteration 4:   log likelihood = -146.19378
Iteration 5:   log likelihood = -146.19378

Logistic regression                               Number of obs   =        362
                                                  LR chi2(6)      =     122.25
                                                  Prob > chi2     =     0.0000
Log likelihood = -146.19378                       Pseudo R2       =     0.2948

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0785876    .0150203      5.23    0.000      .0491483     .1080268
     radhlw1 |    .0058723     .004062      1.45    0.148     -.0020891     .0138337
         bf4 |   -.5874305    .1868633     -3.14    0.002     -.9536758    -.2211852
        bf4m |    .3963155     .172212      2.30    0.021      .0587862     .7338448
    shrelaw1 |   -.0014364    .0051848     -0.28    0.782     -.0115983     .0087256
     shfamw1 |   -.0015628    .0050062     -0.31    0.755     -.0113747     .0082491
       _cons |   -6.829393    1.564771     -4.36    0.000     -9.896289    -3.762497
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        50            22  |         72
     -     |        44           246  |        290
-----------+--------------------------+-----------
   Total   |        94           268  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   53.19%
Specificity                     Pr( -|~D)   91.79%
Positive predictive value       Pr( D| +)   69.44%
Negative predictive value       Pr(~D| -)   84.83%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.21%
False - rate for true D         Pr( -| D)   46.81%
False + rate for classified +   Pr(~D| +)   30.56%
False - rate for classified -   Pr( D| -)   15.17%
--------------------------------------------------
Correctly classified                        81.77%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       360
            Pearson chi2(353) =       374.57
                  Prob > chi2 =         0.2058

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.321     Log-Lik Full Model:         -146.194
D(355):                      292.388     LR(6):                       122.254
                                         Prob > LR:                     0.000
McFadden's R2:                 0.295     McFadden's Adj R2:             0.261
Maximum Likelihood R2:         0.287     Cragg & Uhler's R2:            0.420
McKelvey and Zavoina's R2:     0.446     Efron's R2:                    0.339
Variance of y*:                5.936     Variance of error:             3.290
Count R2:                      0.818     Adj Count R2:                  0.298
AIC:                           0.846     AIC*n:                       306.388
BIC:                       -1799.146     BIC':                        -86.905

.
. scalar MainEffsxlifeFw1 = "age radhlw1 bf4 bf4m"

. scalar SigDoseSxlifeFw1="no"

. scalar SxLifeModFw1 = "no"

. * xx female main effects model: no sign dose main effect
. * xx 6 signif main effects
. * xx no moderator effects significant
.
. title4 "h1 pt 2 wave 1 dose-> sexlife sexlife mediator impact models"
-------------
h1 pt 2 wave 1 dose-> sexlife sexlife mediator impact models
-------------

.
. di as input "testing possible sex life mediator effects for males"
testing possible sex life mediator effects for males

.
. * age is a mediating effect for males for Dose=> sex life for men
. des bf4 bf4m

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


. glm age avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm HP2sxlife age  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =    287.05
Iteration 2:   deviance =  282.9134
Iteration 3:   deviance =  282.8157
Iteration 4:   deviance =  282.8156
Iteration 5:   deviance =  282.8156

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  282.8156218                    (1/df) Deviance =  .8367326
Pearson          =  327.5643783                    (1/df) Pearson  =  .9691254

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1687.368

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0532907    .0067666      7.88    0.000      .0400283     .0665531
       _cons |   -3.620299    .3741324     -9.68    0.000     -4.353585    -2.887013
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des illw1

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


illw1             double   %8.0g                        Total number of illnesses experienced in time period 1976-1986


. glm illw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -151.48261

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  .1435742
Deviance         =  48.52808533                    (1/df) Deviance =  .1435742
Pearson          =  48.52808533                    (1/df) Pearson  =  .1435742

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  .9028389
Log likelihood   = -151.4826069                    BIC             = -1921.656

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0087277    .0123318      0.71    0.479     -.0154423     .0328976
       _cons |    .0962541    .0212201      4.54    0.000      .0546635     .1378446
-------------+----------------------------------------------------------------

. glm HP2sxlife illw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  342.7406
Iteration 2:   deviance =  342.5208
Iteration 3:   deviance =  342.5207
Iteration 4:   deviance =  342.5207

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  342.5207329                    (1/df) Deviance =  1.013375
Pearson          =  340.1346783                    (1/df) Pearson  =  1.006316

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1627.663

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |    .1374179    .1941211      0.71    0.479     -.2430524     .5178882
       _cons |   -.8459321    .0807352    -10.48    0.000      -1.00417    -.6876941
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw1

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


radhlw1           double   %8.0g                        how much believed personal health is affected by radiation in 1986


. glm radhlw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1710.3417

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1378.645
Deviance         =  465981.8893                    (1/df) Deviance =  1378.645
Pearson          =  465981.8893                    (1/df) Pearson  =  1378.645

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   10.0726
Log likelihood   = -1710.341694                    BIC             =  464011.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    2.398285    1.208412      1.98    0.047      .0298407     4.766729
       _cons |    44.66477    2.079384     21.48    0.000      40.58925     48.74029
-------------+----------------------------------------------------------------

. glm HP2sxlife radhlw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  314.3547
Iteration 2:   deviance =  313.2652
Iteration 3:   deviance =  313.2621
Iteration 4:   deviance =  313.2621

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  313.2620862                    (1/df) Deviance =  .9268109
Pearson          =   338.905649                    (1/df) Pearson  =  1.002679

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1656.922

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0115464    .0020885      5.53    0.000       .007453     .0156398
       _cons |   -1.434416    .1399661    -10.25    0.000     -1.708745    -1.160088
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des bf4

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


. glm bf4  avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1026.9659

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  24.75428
Deviance         =  8366.946191                    (1/df) Deviance =  24.75428
Pearson          =  8366.946191                    (1/df) Pearson  =  24.75428

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   6.05274
Log likelihood   = -1026.965868                    BIC             =  6396.763

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.1031788     .161925     -0.64    0.524     -.4205461     .2141884
       _cons |    12.54134    .2786337     45.01    0.000      11.99523     13.08746
-------------+----------------------------------------------------------------

. glm HP2sxlife bf4  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  265.0595
Iteration 2:   deviance =  261.6959
Iteration 3:   deviance =  261.6273
Iteration 4:   deviance =  261.6271
Iteration 5:   deviance =  261.6271

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  261.6270836                    (1/df) Deviance =  .7740446
Pearson          =  301.9171445                    (1/df) Pearson  =   .893246

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1708.557

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1431725    .0149643     -9.57    0.000      -.172502    -.1138431
       _cons |    .7780696     .180124      4.32    0.000       .425033     1.131106
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des bf4m

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


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


. glm bf4m  avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1060.6611

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  30.18079
Deviance         =  10201.10756                    (1/df) Deviance =  30.18079
Pearson          =  10201.10756                    (1/df) Pearson  =  30.18079

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.250948
Log likelihood   = -1060.661115                    BIC             =  8230.924

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.0953671    .1787945     -0.53    0.594     -.4457979     .2550637
       _cons |    20.35858     .307662     66.17    0.000      19.75557     20.96159
-------------+----------------------------------------------------------------

. glm HP2sxlife bf4m  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  266.1375
Iteration 2:   deviance =  263.3205
Iteration 3:   deviance =   263.273
Iteration 4:   deviance =  263.2729
Iteration 5:   deviance =  263.2729

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  263.2728985                    (1/df) Deviance =  .7789139
Pearson          =  303.0162706                    (1/df) Pearson  =  .8964978

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1706.911

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.1287243    .0140303     -9.17    0.000     -.1562231    -.1012255
       _cons |    1.624944     .276779      5.87    0.000      1.082468     2.167421
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shrelaw1

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


shrelaw1          double   %8.0g                        Percentage of strains and hassles related to relationships in 1986


. glm shrelaw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1715.4166

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1420.421
Deviance         =  480102.3567                    (1/df) Deviance =  1420.421
Pearson          =  480102.3567                    (1/df) Pearson  =  1420.421

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.10245
Log likelihood   = -1715.416629                    BIC             =  478132.2

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.0649405    1.226584     -0.05    0.958     -2.469002     2.339121
       _cons |    29.57199    2.110654     14.01    0.000      25.43518      33.7088
-------------+----------------------------------------------------------------

. glm HP2sxlife shrelaw1  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  341.3096
Iteration 2:   deviance =  341.0889
Iteration 3:   deviance =  341.0888
Iteration 4:   deviance =  341.0888

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  341.0887685                    (1/df) Deviance =  1.009138
Pearson          =  340.3303886                    (1/df) Pearson  =  1.006895

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1629.095

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw1 |    .0027916      .00202      1.38    0.167     -.0011676     .0067508
       _cons |   -.9180819    .1010594     -9.08    0.000     -1.116155    -.7200091
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shfamw1

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


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


. glm shfamw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1722.3986

Generalized linear models                          No. of obs      =       339
Optimization     : ML                              Residual df     =       337
                                                   Scale parameter =    1524.9
Deviance         =  513891.1861                    (1/df) Deviance =    1524.9
Pearson          =  513891.1861                    (1/df) Pearson  =    1524.9

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.17344
Log likelihood   = -1722.398621                    BIC             =  511927.8

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.8322929    1.270907     -0.65    0.513     -3.323226      1.65864
       _cons |    38.72924    2.190054     17.68    0.000      34.43681     43.02167
-------------+----------------------------------------------------------------

. glm HP2sxlife shfamw1  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =   339.011
Iteration 2:   deviance =  338.8015
Iteration 3:   deviance =  338.8014
Iteration 4:   deviance =  338.8014

Generalized linear models                          No. of obs      =       339
Optimization     : MQL Fisher scoring              Residual df     =       337
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  338.8013645                    (1/df) Deviance =  1.005345
Pearson          =  339.2776273                    (1/df) Pearson  =  1.006759

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1624.561

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw1 |    .0019797    .0019787      1.00    0.317     -.0018986     .0058579
       _cons |   -.9179132    .1113818     -8.24    0.000     -1.136218    -.6996088
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar sxlifeMedMw1 = "radhlw1"

.
. title4 "female impact models mediator search"
-------------
female impact models mediator search
-------------

.
. * age is a mediating effect for females for Dose=> sex life for women
. glm age avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1406.325

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =   136.455
Deviance         =  49260.25928                    (1/df) Deviance =   136.455
Pearson          =  49260.25928                    (1/df) Pearson  =   136.455

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.759366
Log likelihood   = -1406.325011                    BIC             =  47132.38

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.783267      6.16449
       _cons |    48.88157    .7187038     68.01    0.000      47.47293      50.2902
-------------+----------------------------------------------------------------

. glm HP2sxlife age  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  336.5251
Iteration 2:   deviance =  333.7638
Iteration 3:   deviance =  333.7326
Iteration 4:   deviance =  333.7326
Iteration 5:   deviance =  333.7326

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  333.7325644                    (1/df) Deviance =  .9244669
Pearson          =  379.4384762                    (1/df) Pearson  =  1.051076

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1794.147

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0606116    .0071416      8.49    0.000      .0466144     .0746088
       _cons |   -3.838422    .3937027     -9.75    0.000     -4.610065    -3.066779
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * illness is a mediating effect for females = > sex life for men
. des illw1

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


illw1             double   %8.0g                        Total number of illnesses experienced in time period 1976-1986


. glm illw1 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -259.70777

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  .2462383
Deviance         =  88.89203958                    (1/df) Deviance =  .2462383
Pearson          =  88.89203958                    (1/df) Pearson  =  .2462383

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  1.441916
Log likelihood   = -259.7077741                    BIC             = -2038.987

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0655142    .0474789      1.38    0.168     -.0275426     .1585711
       _cons |    .1570822    .0305304      5.15    0.000      .0972436     .2169207
-------------+----------------------------------------------------------------

. glm HP2sxlife illw1 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  412.1945
Iteration 2:   deviance =  411.6441
Iteration 3:   deviance =  411.6439
Iteration 4:   deviance =  411.6439

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  411.6438998                    (1/df) Deviance =  1.140288
Pearson          =  362.6903423                    (1/df) Pearson  =  1.004682

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1716.236

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |     .257456    .1453235      1.77    0.076     -.0273728     .5422847
       _cons |   -.6974831    .0815339     -8.55    0.000     -.8572865    -.5376797
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. *----------  this may be important -------------------------------------------
. * radhlw1 can be a mediating factor for females in wave 1 for sxlife
. des radhlw1

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


radhlw1           double   %8.0g                        how much believed personal health is affected by radiation in 1986


. glm radhlw1 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1821.9477

Generalized linear models                          No. of obs      =       362
Optimization     : ML                              Residual df     =       360
                                                   Scale parameter =  1385.301
Deviance         =  498708.3025                    (1/df) Deviance =  1385.301
Pearson          =  498708.3025                    (1/df) Pearson  =  1385.301

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.07706
Log likelihood   = -1821.947718                    BIC             =  496587.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.789972    3.562254      1.06    0.287     -3.191917     10.77186
       _cons |    55.44948    2.293757     24.17    0.000       50.9538     59.94516
-------------+----------------------------------------------------------------

. glm HP2sxlife radhlw1 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  401.9956
Iteration 2:   deviance =  401.6315
Iteration 3:   deviance =  401.6315
Iteration 4:   deviance =  401.6315

Generalized linear models                          No. of obs      =       362
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  401.6314992                    (1/df) Deviance =  1.115643
Pearson          =  362.7806158                    (1/df) Pearson  =  1.007724

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             =  -1719.36

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0070351    .0020921      3.36    0.001      .0029347     .0111355
       _cons |    -1.06549    .1496137     -7.12    0.000     -1.358728    -.7722525
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. *-----------------------------------------------------------------------------
.
. des bf4   // soma recentered

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


. * bf4 is a mediting effect for females for Dose=>  sex life for women
. glm bf4  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.0162

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  26.52082
Deviance         =  9574.015672                    (1/df) Deviance =  26.52082
Pearson          =  9574.015672                    (1/df) Pearson  =  26.52082

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.121302
Log likelihood   = -1109.016226                    BIC             =  7446.136

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.474583    -.5430862
       _cons |    10.99384    .3168463     34.70    0.000      10.37284     11.61485
-------------+----------------------------------------------------------------

. glm HP2sxlife bf4  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  344.0399
Iteration 2:   deviance =  342.6827
Iteration 3:   deviance =  342.6686
Iteration 4:   deviance =  342.6686
Iteration 5:   deviance =  342.6686

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  342.6686152                    (1/df) Deviance =  .9492205
Pearson          =  336.3540555                    (1/df) Pearson  =  .9317287

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1785.211

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1230087    .0148291     -8.30    0.000     -.1520732    -.0939442
       _cons |    .5134392    .1542351      3.33    0.001       .211144     .8157344
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des bf4m // soma recentered

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


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


. * bf4m is a possible mediating effect for female sex life
. glm bf4m  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1140.521

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =    31.548
Deviance         =  11388.82943                    (1/df) Deviance =    31.548
Pearson          =  11388.82943                    (1/df) Pearson  =    31.548

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.294882
Log likelihood   = -1140.521046                    BIC             =   9260.95

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.563541    .5374133     -2.91    0.004     -2.616852    -.5102303
       _cons |    18.82212    .3455741     54.47    0.000       18.1448     19.49943
-------------+----------------------------------------------------------------

. glm HP2sxlife bf4m  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  356.1451
Iteration 2:   deviance =  355.6209
Iteration 3:   deviance =  355.6178
Iteration 4:   deviance =  355.6178
Iteration 5:   deviance =  355.6178

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  355.6178202                    (1/df) Deviance =  .9850909
Pearson          =  340.0032816                    (1/df) Pearson  =  .9418373

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1772.262

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.0990193    .0135516     -7.31    0.000       -.12558    -.0724586
       _cons |    1.063679     .244399      4.35    0.000       .584666     1.542693
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shfamw1

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


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


. glm shfamw1  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1820.2144

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  1334.587
Deviance         =  481786.0787                    (1/df) Deviance =  1334.587
Pearson          =  481786.0787                    (1/df) Pearson  =  1334.587

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.03975
Log likelihood   = -1820.214442                    BIC             =  479658.2

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    2.325224    3.495393      0.67    0.506     -4.525621     9.176069
       _cons |    34.91682     2.24765     15.53    0.000       30.5115     39.32213
-------------+----------------------------------------------------------------

. glm HP2sxlife shfamw1 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  415.7461
Iteration 2:   deviance =  415.0916
Iteration 3:   deviance =  415.0914
Iteration 4:   deviance =  415.0914

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  415.0913862                    (1/df) Deviance =  1.149838
Pearson          =  362.9739265                    (1/df) Pearson  =  1.005468

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1712.788

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw1 |    .0007609    .0020813      0.37    0.715     -.0033182     .0048401
       _cons |   -.6739948    .1071104     -6.29    0.000     -.8839274    -.4640622
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shrelaw1

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


shrelaw1          double   %8.0g                        Percentage of strains and hassles related to relationships in 1986


. glm shrelaw1  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1801.2674

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  1202.293
Deviance         =  434027.9437                    (1/df) Deviance =  1202.293
Pearson          =  434027.9437                    (1/df) Pearson  =  1202.293

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  9.935358
Log likelihood   = -1801.267425                    BIC             =  431900.1

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    5.240218    3.317628      1.58    0.114     -1.262215     11.74265
       _cons |    26.01592    2.133342     12.19    0.000      21.83464     30.19719
-------------+----------------------------------------------------------------

. glm HP2sxlife shrelaw1 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  414.3957
Iteration 2:   deviance =  413.7847
Iteration 3:   deviance =  413.7844
Iteration 4:   deviance =  413.7844

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  413.7844342                    (1/df) Deviance =  1.146217
Pearson          =  362.9072137                    (1/df) Pearson  =  1.005283

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1714.095

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw1 |     .002446    .0021561      1.13    0.257     -.0017799     .0066718
       _cons |   -.7168064    .0987075     -7.26    0.000     -.9102696    -.5233433
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm aborw1 avgcumdosew1 if gender==2, fam(pois) link(log)

Iteration 0:   log likelihood = -294.95486
Iteration 1:   log likelihood = -274.67418
Iteration 2:   log likelihood = -274.64155
Iteration 3:   log likelihood = -274.64155

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =         1
Deviance         =  418.9504185                    (1/df) Deviance =  1.160527
Pearson          =  1079.525061                    (1/df) Pearson  =  2.990374

Variance function: V(u) =  u                       [Poisson]
Link function    : g(u) =  ln(u)                   [Log]

                                                   AIC             =  1.524196
Log likelihood   = -274.6415467                    BIC             = -1708.929

-------------+----------------------------------------------------------------
             |                 OIM
       aborw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0974558     .154214      0.63    0.527      -.204798     .3997097
       _cons |   -1.333588    .1156098    -11.54    0.000     -1.560179    -1.106997
-------------+----------------------------------------------------------------

. glm HP2sxlife aborw1 if gender==2, fam(bin) link(probit) irls scale(dev)

Iteration 1:   deviance =  414.3147
Iteration 2:   deviance =  413.5468
Iteration 3:   deviance =   413.545
Iteration 4:   deviance =   413.545
Iteration 5:   deviance =   413.545

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  413.5449635                    (1/df) Deviance =  1.145554
Pearson          =  362.1757599                    (1/df) Pearson  =  1.003257

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1714.334

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
      aborw1 |   -.1290317    .1159726     -1.11    0.266     -.3563338     .0982703
       _cons |    -.615959    .0802001     -7.68    0.000     -.7731484    -.4587696
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. title4 "h1 pt2 wave 1 sex life impact summary matrix construction"
-------------
h1 pt2 wave 1 sex life impact summary matrix construction
-------------

.
. *xx summary of mediating effects:  age and illness mediate sex life for men
. *                                  age illnesss radhlw1 bf4 bf4m (soma) mediate sex life for women
.
. scalar SigDoseMEhmcrW1 = "no"

. scalar MaineffhmcrMw1 = "age bf4 bf40"

.
. scalar MainEffsxlifeFw1 = "age radhlw1 bf4 bf4m"

. scalar SigDoseSxlifeFw1="no"

. scalar SxLifeModFw1 = "no"

. scalar sxlifeModMw1 = "none"

. * xx female main effects modelscalar SigDoseSxlifeFw1 = "no"
. scalar MainEffsxlifeFw1 = "age bf4 bf4m"

. scalar sxlifeMedMw1 = "age illw1"

. scalar sxlifeMedFw1 = "age illw1 radhlw1 bf4 bf4m"

. scalar sxlifeMedMw1 = "radhlw1"

.
. *--- summary matrix contstruction
.
.   matrix define  sxlifeMw1 = J(1,8, 0)

.         matrix define  sxlifeFw1 = J(1,8, 0)

. matrix colnames  sxlifeMw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.         matrix colnames  sxlifeFw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix define  sxlifeMw1= (1, 2, 1, 1, 0, 3, 0, 1 )

.         matrix define  sxlifeFw1= (1, 2, 1, 2, 0, 4, 0, 5)

.         matrix rowname  sxlifeMw1 =  sxlifeMw1

.         matrix rowname  sxlifeFw1 =  sxlifeFw1

.         matlist  sxlifeMw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
sxlifeMw1   |         1            2            1            1            0            3            0            1

.         matlist  sxlifeFw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
sxlifeFw1   |         1            2            1            2            0            4            0            5

.         matrix define H1pt2w1 = (  wkMw1 \  wkFw1 \  hmcrMw1 \  hmcrFw1 \ spMw1 \ spFw1 \ prbfamMw1 \  prbfamFw1 \  sxlifeMw1 \  sxlifeFw1 )

.
.         matlist H1pt2w1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            1            1            2
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            2            0            2
spMw1   |         1            2            1            1            1            2            2            1
spFw1   |         1            2            1            2            0            5            0            2
prbfamMw1   |         1            2            1            1            0            2            0            0
prbfamFw1   |         1            2            1            2            0            3            0            2
sxlifeMw1   |         1            2            1            1            0            3            0            1
sxlifeFw1   |         1            2            1            2            0            4            0            5

.     matrix colnames H1pt2w1 =  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix rownames H1pt2w1 =  wkMw1  wkFw1  hmcrMw1  hmcrFw1  spMw1 spFw1 prbfhmMw1  prbfhmFw1

.     matlist H1pt2w1

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
wkMw1   |         1            2            1            1            0            2            0            1
wkFw1   |         1            2            1            2            0            1            1            2
hmcrMw1   |         1            2            1            1            0            2            0            1
hmcrFw1   |         1            2            1            2            0            2            0            2
spMw1   |         1            2            1            1            1            2            2            1
spFw1   |         1            2            1            2            0            5            0            2
prbfhmMw1   |         1            2            1            1            0            2            0            0
prbfhmFw1   |         1            2            1            2            0            3            0            2
prbfhmFw1   |         1            2            1            1            0            3            0            1
prbfhmFw1   |         1            2            1            2            0            4            0            5

.
.
.
.
. *=================== Chunk 8    Dose => interests and Hobbies relationship
.
. title " 6. H1 wave 1 part2  Dose-Interest and Hobbies impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        6. H1 wave 1 part2  Dose-Interest and Hobbies impact         *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:17:37  *****
*******************************************************************************
*******************************************************************************


.
.
. * Chunk 8 ---male models
. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
.   foreach var in HP2inthob  {
  5.       forvalues k=1/2 {
  6. local w1bf bf1 bf4 bf9 bf10 bf11 bf14 bf15m bf20 bf22 bf30 bf40
  7.
. di as input "Full main model for `var' for wave= `j' "
  8. di _skip(4)
  9. di as input  "chunk 8 H1 test:Gender= `k'  model Wave =  `j' for `e(depvar)' "
 10. di _skip(4)
 11. title "Full Nottingham Part 2 subscale models for male and then females"
 12. di as input "Model for gender==`k' and wave == `j'"
 13. di _skip(2)
 14.       xi: logistic `var' age i.educ occ1w`j'-occ8w`j' ///
>                 marrw`j'1- marrw`j'3 marrw`j'5-marrw`j'6 inc1w`j'-inc4w`j' ///
>                 radhlw`j' havmil avgcumdosew`j' `w`j'bf'  ///
>                  deaw`j' dvcew`j' sepaw`j' accdw`j' movew`j' ///
>                 illw`j' shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j' ///
>                  havmilsq radhlw1 if gender==`k', coef  difficult iterate(50)
 15.                         estat class
 16.                         estat gof
 17.                         fitstat
 18. }
 19. }
 20. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


Full main model for HP2inthob for wave= 1

chunk 8 H1 test:Gender= 1  model Wave =  1 for HP2sxlife


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:17:37  *****
*******************************************************************************
*******************************************************************************


Model for gender==1 and wave == 1

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 12 obs not used

note: _Ieduc_7 != 0 predicts failure perfectly
      _Ieduc_7 dropped and 4 obs not used

note: _Ieduc_8 != 0 predicts failure perfectly
      _Ieduc_8 dropped and 2 obs not used

note: occ6w1 != 0 predicts failure perfectly
      occ6w1 dropped and 4 obs not used

note: occ7w1 != 0 predicts failure perfectly
      occ7w1 dropped and 4 obs not used

note: marrw15 != 0 predicts success perfectly
      marrw15 dropped and 1 obs not used

note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 19 obs not used

note: dvcew1 != 0 predicts failure perfectly
      dvcew1 dropped and 2 obs not used

note: sepaw1 != 0 predicts failure perfectly
      sepaw1 dropped and 1 obs not used

note: _Ieduc_6 omitted because of collinearity
note: marrw16 omitted because of collinearity
note: radhlw1 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        284
                                                  LR chi2(40)     =     100.41
                                                  Prob > chi2     =     0.0000
Log likelihood = -55.819677                       Pseudo R2       =     0.4735

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1670729    .0496836      3.36    0.001      .0696948     .2644509
    _Ieduc_2 |   -3.680581    2.320262     -1.59    0.113     -8.228211     .8670494
    _Ieduc_3 |   -.4101129    .8396848     -0.49    0.625     -2.055865     1.235639
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.2315388    .8579156     -0.27    0.787     -1.913023     1.449945
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w1 |    -.855187    2.512009     -0.34    0.734     -5.778634      4.06826
      occ2w1 |   -.8206155    2.564147     -0.32    0.749     -5.846251      4.20502
      occ3w1 |    .4752119    2.731393      0.17    0.862      -4.87822     5.828644
      occ4w1 |   -.0629245    2.648929     -0.02    0.981     -5.254729      5.12888
      occ5w1 |    .1433339    2.754114      0.05    0.958     -5.254631     5.541299
      occ6w1 |           0   (omitted)
      occ7w1 |           0   (omitted)
      occ8w1 |    2.572986    2.905992      0.89    0.376     -3.122655     8.268626
     marrw11 |    13.32407    13699.24      0.00    0.999     -26836.69     26863.34
     marrw12 |     14.0947    13699.24      0.00    0.999     -26835.93     26864.11
     marrw13 |    12.02184    13699.24      0.00    0.999        -26838     26862.04
     marrw15 |           0   (omitted)
     marrw16 |           0   (omitted)
      inc1w1 |   -2.316757    2.703555     -0.86    0.391     -7.615628     2.982114
      inc2w1 |   -1.011499    2.582483     -0.39    0.695     -6.073072     4.050074
      inc3w1 |    -1.18772    2.503558     -0.47    0.635     -6.094604     3.719164
      inc4w1 |   -3.273623    3.286978     -1.00    0.319     -9.715981     3.168734
     radhlw1 |    .0108481    .0098238      1.10    0.269     -.0084061     .0301023
      havmil |     .011552    .0121868      0.95    0.343     -.0123338     .0354378
avgcumdosew1 |   -.0246271     .287731     -0.09    0.932     -.5885695     .5393153
         bf1 |   -1.705805    342.4811     -0.00    0.996     -672.9563     669.5447
         bf4 |   -.2162507    .0773979     -2.79    0.005     -.3679478    -.0645536
         bf9 |   -.0313278    .0435662     -0.72    0.472      -.116716     .0540605
        bf10 |    -.058867    .0329385     -1.79    0.074     -.1234253     .0056913
        bf11 |   -.0066494    .0862166     -0.08    0.939     -.1756309      .162332
        bf14 |   -.0001753    .0001131     -1.55    0.121     -.0003971     .0000464
       bf15m |           0   (omitted)
        bf20 |    1.703694     342.481      0.00    0.996     -669.5468     672.9542
        bf22 |    .0001385    .0001388      1.00    0.318     -.0001335     .0004105
        bf30 |    .0005239    .0005317      0.99    0.324     -.0005182     .0015661
        bf40 |    .0218384     .248862      0.09    0.930     -.4659222      .509599
       deaw1 |   -1.453389    1.021447     -1.42    0.155     -3.455388     .5486112
      dvcew1 |           0   (omitted)
      sepaw1 |           0   (omitted)
      accdw1 |   -.0050761    1.624722     -0.00    0.998     -3.189472      3.17932
      movew1 |   -.0513738    1.125065     -0.05    0.964     -2.256461     2.153713
       illw1 |   -.5020103    .7607393     -0.66    0.509     -1.993032     .9890113
     shfamw1 |    .0137784    .0108362      1.27    0.204     -.0074601     .0350169
      shhlw1 |    .0112349    .0171506      0.66    0.512     -.0223798     .0448495
     shjobw1 |   -.0014008    .0136329     -0.10    0.918     -.0281207     .0253192
    shrelaw1 |   -.0197593    .0117959     -1.68    0.094     -.0428787     .0033602
     suprtw1 |    .0328165     .033418      0.98    0.326     -.0326817     .0983146
     suchrw1 |    .0158253    .0298163      0.53    0.596     -.0426135     .0742642
    havmilsq |    -.000019    .0000262     -0.72    0.469     -.0000704     .0000324
     radhlw1 |           0   (omitted)
       _cons |   -89.90699           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 29 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        19             7  |         26
     -     |        16           242  |        258
-----------+--------------------------+-----------
   Total   |        35           249  |        284

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   54.29%
Specificity                     Pr( -|~D)   97.19%
Positive predictive value       Pr( D| +)   73.08%
Negative predictive value       Pr(~D| -)   93.80%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.81%
False - rate for true D         Pr( -| D)   45.71%
False + rate for classified +   Pr(~D| +)   26.92%
False - rate for classified -   Pr( D| -)    6.20%
--------------------------------------------------
Correctly classified                        91.90%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       284
 number of covariate patterns =       284
            Pearson chi2(242) =       148.05
                  Prob > chi2 =         1.0000

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -106.026     Log-Lik Full Model:          -55.820
D(230):                      111.639     LR(40):                      100.412
                                         Prob > LR:                     0.000
McFadden's R2:                 0.474     McFadden's Adj R2:            -0.036
Maximum Likelihood R2:         0.298     Cragg & Uhler's R2:            0.566
McKelvey and Zavoina's R2:     0.975     Efron's R2:                    0.438
Variance of y*:              130.454     Variance of error:             3.290
Count R2:                      0.919     Adj Count R2:                  0.343
AIC:                           0.773     AIC*n:                       219.639
BIC:                       -1187.625     BIC':                        125.547
Full main model for HP2inthob for wave= 1

chunk 8 H1 test:Gender= 2  model Wave =  1 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:17:39  *****
*******************************************************************************
*******************************************************************************


Model for gender==2 and wave == 1

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 11 obs not used

note: _Ieduc_8 omitted because of collinearity
note: radhlw1 omitted because of collinearity

Logistic regression                               Number of obs   =        347
                                                  LR chi2(50)     =     136.35
                                                  Prob > chi2     =     0.0000
Log likelihood =  -100.6444                       Pseudo R2       =     0.4038

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1576323    .0314369      5.01    0.000      .0960172     .2192474
    _Ieduc_2 |   -13.15998    1390.096     -0.01    0.992     -2737.698     2711.378
    _Ieduc_3 |   -12.34293    1390.096     -0.01    0.993     -2736.881     2712.195
    _Ieduc_4 |   -11.76283    1390.096     -0.01    0.993     -2736.302     2712.776
    _Ieduc_5 |   -12.38126    1390.096     -0.01    0.993      -2736.92     2712.157
    _Ieduc_6 |   -12.87444    1390.096     -0.01    0.993     -2737.413     2711.664
    _Ieduc_7 |   -11.28064    1390.098     -0.01    0.994     -2735.823     2713.262
    _Ieduc_8 |           0   (omitted)
      occ1w1 |   -2.007966    2.670409     -0.75    0.452     -7.241872     3.225941
      occ2w1 |    -1.42005       2.705     -0.52    0.600     -6.721752     3.881652
      occ3w1 |   -2.637816    2.721093     -0.97    0.332     -7.971061     2.695429
      occ4w1 |   -1.022244    2.749637     -0.37    0.710     -6.411434     4.366946
      occ5w1 |   -2.685007    2.926173     -0.92    0.359       -8.4202     3.050187
      occ6w1 |   -1.851042    2.900638     -0.64    0.523     -7.536188     3.834105
      occ7w1 |   -.7751235    2.748828     -0.28    0.778     -6.162727      4.61248
      occ8w1 |    1.738342    2.770527      0.63    0.530     -3.691792     7.168476
     marrw11 |   -1.712685    1.961435     -0.87    0.383     -5.557026     2.131656
     marrw12 |   -.7978205    2.432804     -0.33    0.743     -5.566028     3.970387
     marrw13 |    -2.20107    1.785855     -1.23    0.218     -5.701282     1.299141
     marrw15 |   -2.131202    2.204296     -0.97    0.334     -6.451543     2.189139
     marrw16 |   -2.419024    2.291199     -1.06    0.291     -6.909692     2.071645
      inc1w1 |    .4393464    2.638625      0.17    0.868     -4.732264     5.610957
      inc2w1 |    1.095503    2.586215      0.42    0.672     -3.973385      6.16439
      inc3w1 |    1.162288    2.607351      0.45    0.656     -3.948028     6.272603
      inc4w1 |    2.352437    2.762052      0.85    0.394     -3.061086     7.765959
     radhlw1 |     .016256    .0073318      2.22    0.027       .001886      .030626
      havmil |    .0027093    .0039697      0.68    0.495     -.0050712     .0104899
avgcumdosew1 |    .4525599    .2626453      1.72    0.085     -.0622155     .9673353
         bf1 |   -.0392934    .0467729     -0.84    0.401     -.1309666     .0523799
         bf4 |   -.1618817     .055024     -2.94    0.003     -.2697268    -.0540365
         bf9 |   -.0557262    .0332131     -1.68    0.093     -.1208228     .0093703
        bf10 |    .0039258    .0156035      0.25    0.801     -.0266565     .0345082
        bf11 |    .0160165    .0531713      0.30    0.763     -.0881973     .1202303
        bf14 |     -.00005    .0000899     -0.56    0.578     -.0002263     .0001262
       bf15m |           0   (omitted)
        bf20 |    .0307621    .0426341      0.72    0.471     -.0527993     .1143235
        bf22 |    .0000428    .0000948      0.45    0.651      -.000143     .0002287
        bf30 |    .0009017    .0003472      2.60    0.009      .0002212     .0015823
        bf40 |    -.134405    .1339765     -1.00    0.316      -.396994     .1281841
       deaw1 |    .0546666    .2268628      0.24    0.810     -.3899763     .4993096
      dvcew1 |    1.590367    2.621038      0.61    0.544     -3.546772     6.727507
      sepaw1 |   -1.421464    2.957733     -0.48    0.631     -7.218515     4.375587
      accdw1 |    -.187097     1.01096     -0.19    0.853     -2.168543     1.794349
      movew1 |     .280486    .7016446      0.40    0.689     -1.094712     1.655684
       illw1 |    .0230342    .4319012      0.05    0.957     -.8234766     .8695451
     shfamw1 |    .0000591    .0083223      0.01    0.994     -.0162524     .0163705
      shhlw1 |   -.0037244    .0125633     -0.30    0.767     -.0283479     .0208992
     shjobw1 |   -.0032054    .0093218     -0.34    0.731     -.0214757     .0150649
    shrelaw1 |   -.0051493    .0079574     -0.65    0.518     -.0207454     .0104468
     suprtw1 |    .0012475    .0121595      0.10    0.918     -.0225847     .0250796
     suchrw1 |   -.0019168    .0162004     -0.12    0.906     -.0336689     .0298353
    havmilsq |   -1.74e-06    5.49e-06     -0.32    0.752     -.0000125     9.02e-06
     radhlw1 |           0   (omitted)
       _cons |    3.925606      1390.1      0.00    0.998     -2720.621     2728.472
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        37             7  |         44
     -     |        29           274  |        303
-----------+--------------------------+-----------
   Total   |        66           281  |        347

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   56.06%
Specificity                     Pr( -|~D)   97.51%
Positive predictive value       Pr( D| +)   84.09%
Negative predictive value       Pr(~D| -)   90.43%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.49%
False - rate for true D         Pr( -| D)   43.94%
False + rate for classified +   Pr(~D| +)   15.91%
False - rate for classified -   Pr( D| -)    9.57%
--------------------------------------------------
Correctly classified                        89.63%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       347
 number of covariate patterns =       347
            Pearson chi2(296) =       450.83
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -168.821     Log-Lik Full Model:         -100.644
D(293):                      201.289     LR(50):                      136.353
                                         Prob > LR:                     0.000
McFadden's R2:                 0.404     McFadden's Adj R2:             0.084
Maximum Likelihood R2:         0.325     Cragg & Uhler's R2:            0.522
McKelvey and Zavoina's R2:     0.648     Efron's R2:                    0.466
Variance of y*:                9.347     Variance of error:             3.290
Count R2:                      0.896     Adj Count R2:                  0.455
AIC:                           0.891     AIC*n:                       309.289
BIC:                       -1512.563     BIC':                        156.113

.
.  label var radhlw1 "Self-perceived Chornobyl health threat in wave 1"

.
. title4 "7. Testing H1 Wv2 Moderators of male Dose => Interests and Hobbies Impact"
-------------
7. Testing H1 Wv2 Moderators of male Dose => Interests and Hobbies Impact
-------------

.
.
. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf4 bf14  bf40
  4.
. foreach var in HP2inthob  {
  5. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40
  6. di _skip(2)
  7.  di as input "Full main model for `var' for wave= `j' "
  8. di _skip(4)
  9. di as input  "chunk 8 H1 test:Gender= male  model Wave =  `j' for `e(depvar)' "
 10. di _skip(4)
 11. title "Full Nottingham Part 2 subscale models " "males on  wave=`j'"
 12.     des bf5m shfamw1 radhlw1 bf4m
 13.       xi: logistic `var' age radhlw1 bf4 bf10 bf40  shrelaw1 ///
>                    suchrw1 if gender==1, coef  difficult iterate(50)
 14.                         estat class
 15.                         estat gof
 16.                         fitstat
 17. di _skip(2)
 18. di as input "Note: bf4m is necssary for bf5 but if bf4m is in model bf5 is not signif."
 19. di as input " Therefore, bf5 is not deemed significant."
 20. }
 21. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf14              float    %9.0g                        bf14= max(0, radw2 - 10) * bf12


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


Full main model for HP2inthob for wave= 1

chunk 8 H1 test:Gender= male  model Wave =  1 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              Full Nottingham Part 2 subscale models                 *****
*****                          males on  wave=1                           *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:17:40  *****
*******************************************************************************
*******************************************************************************


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


bf5m              float    %9.0g                        bf5m = max(0, ecprw3 - 75) * bf4m


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


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


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


Logistic regression                               Number of obs   =        340
                                                  LR chi2(7)      =      64.52
                                                  Prob > chi2     =     0.0000
Log likelihood = -86.806728                       Pseudo R2       =     0.2709

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0200969    .0187425      1.07    0.284     -.0166377     .0568315
     radhlw1 |    .0186628     .006222      3.00    0.003      .0064679     .0308576
         bf4 |   -.1419329    .0385628     -3.68    0.000     -.2175146    -.0663512
        bf10 |   -.0002913    .0097452     -0.03    0.976     -.0193915     .0188088
        bf40 |    .2956738    .1272383      2.32    0.020      .0462913     .5450564
    shrelaw1 |   -.0046332    .0053472     -0.87    0.386     -.0151134      .005847
     suchrw1 |    .0141811     .015058      0.94    0.346      -.015332     .0436942
       _cons |   -3.536445    1.260759     -2.81    0.005     -6.007486    -1.065403
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        13             4  |         17
     -     |        25           298  |        323
-----------+--------------------------+-----------
   Total   |        38           302  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   34.21%
Specificity                     Pr( -|~D)   98.68%
Positive predictive value       Pr( D| +)   76.47%
Negative predictive value       Pr(~D| -)   92.26%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.32%
False - rate for true D         Pr( -| D)   65.79%
False + rate for classified +   Pr(~D| +)   23.53%
False - rate for classified -   Pr( D| -)    7.74%
--------------------------------------------------
Correctly classified                        91.47%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       332
            Pearson chi2(324) =       299.10
                  Prob > chi2 =         0.8360

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -119.064     Log-Lik Full Model:          -86.807
D(332):                      173.613     LR(7):                        64.515
                                         Prob > LR:                     0.000
McFadden's R2:                 0.271     McFadden's Adj R2:             0.204
Maximum Likelihood R2:         0.173     Cragg & Uhler's R2:            0.343
McKelvey and Zavoina's R2:     0.425     Efron's R2:                    0.237
Variance of y*:                5.726     Variance of error:             3.290
Count R2:                      0.915     Adj Count R2:                  0.237
AIC:                           0.558     AIC*n:                       189.613
BIC:                       -1761.596     BIC':                        -23.712

Note: bf4m is necssary for bf5 but if bf4m is in model bf5 is not signif.
 Therefore, bf5 is not deemed significant.

.
. cap gen bf4Xd1 = bf4*avgcumdosew1

. cap gen bf10Xd1= bf10*avgcumdosew1

. cap gen bf40Xd1 = bf40*agecumdosew1

.
. scalar SigdoseMEinthob = "no"

. scalar MainEffMw1 = "radhlw1 bf4 bf40"

.
. title3 "wave 1 Main effects Dose=> Interests and Hobbies impact identification"
-------------
title3 : wave 1 Main effects Dose=> Interests and Hobbies impact identification
18 Jun 2012
18:17:42
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide16june2012.dta  currrently has  2380  variables and  703  observations

. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
. foreach var in HP2inthob  {
  5. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40
  6.  di as input "Full main model for `var' for wave= `j' "
  7. di _skip(4)
  8. di as input  "chunk 8 H1 test:Gender= male  model Wave =  `j' for `e(depvar)' "
  9. di _skip(4)
 10.
.
.       xi: logistic `var' age   ///
>                 radhlw`j' avgcumdosew`j'  ///
>                  shfamw`j'  bf4 ///
>                  bf40 bf4Xd1 bf40Xd1 if gender==1, coef  difficult iterate(50)
 11.                         estat class
 12.                         estat gof
 13.                         fitstat
 14. }
 15. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


Full main model for HP2inthob for wave= 1

chunk 8 H1 test:Gender= male  model Wave =  1 for HP2inthob


Logistic regression                               Number of obs   =        339
                                                  LR chi2(8)      =      69.68
                                                  Prob > chi2     =     0.0000
Log likelihood = -84.103355                       Pseudo R2       =     0.2929

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0229294    .0193857      1.18    0.237      -.015066     .0609247
     radhlw1 |    .0203775    .0063075      3.23    0.001       .008015       .03274
avgcumdosew1 |    6.417441    3.545095      1.81    0.070      -.530818      13.3657
     shfamw1 |    .0031998    .0052579      0.61    0.543     -.0071055      .013505
         bf4 |    .0015257    .0840489      0.02    0.986      -.163207     .1662585
        bf40 |    .4371492    .1715289      2.55    0.011      .1009587     .7733397
      bf4Xd1 |    -.469083    .2679615     -1.75    0.080     -.9942779     .0561118
     bf40Xd1 |    -.724812    .4037974     -1.79    0.073      -1.51624     .0666164
       _cons |   -5.810547    1.708506     -3.40    0.001     -9.159156    -2.461938
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        11             6  |         17
     -     |        27           295  |        322
-----------+--------------------------+-----------
   Total   |        38           301  |        339

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   28.95%
Specificity                     Pr( -|~D)   98.01%
Positive predictive value       Pr( D| +)   64.71%
Negative predictive value       Pr(~D| -)   91.61%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.99%
False - rate for true D         Pr( -| D)   71.05%
False + rate for classified +   Pr(~D| +)   35.29%
False - rate for classified -   Pr( D| -)    8.39%
--------------------------------------------------
Correctly classified                        90.27%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       339
 number of covariate patterns =       337
            Pearson chi2(328) =       260.58
                  Prob > chi2 =         0.9975

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -118.946     Log-Lik Full Model:          -84.103
D(330):                      168.207     LR(8):                        69.684
                                         Prob > LR:                     0.000
McFadden's R2:                 0.293     McFadden's Adj R2:             0.217
Maximum Likelihood R2:         0.186     Cragg & Uhler's R2:            0.368
McKelvey and Zavoina's R2:     0.640     Efron's R2:                    0.242
Variance of y*:                9.132     Variance of error:             3.290
Count R2:                      0.903     Adj Count R2:                  0.132
AIC:                           0.549     AIC*n:                       186.207
BIC:                       -1754.373     BIC':                        -23.076

. scalar SigDoseInthbMw1 = "no"

. scalar MainEffInthbMw1 = "age radhlw1 shfamw1"

. scalar InthbModMw1 = "none"

.
. *------chunk 8  female moderator models
. title4 "trimmed Moderators of female Dose => Interests and Hobbies Impact"
-------------
trimmed Moderators of female Dose => Interests and Hobbies Impact
-------------

.
.
. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
. foreach var in HP2inthob  {
  5. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40
  6.  di as input "Full main model for `var' for wave= `j' "
  7. di _skip(4)
  8. di as input  "chunk 8 H1 test:Gender= male  model Wave =  `j' for `e(depvar)' "
  9. di _skip(4)
 10. title "Full Nottingham Part 2 subscale models for females "
 11.
.       xi: logistic `var' age   ///
>                 radhlw`j' avgcumdosew`j' ///
>                    bf4  ///
>                  if gender==2, coef  difficult iterate(50)
 12.                         estat class
 13.                         estat gof
 14.                         fitstat
 15. }
 16. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


Full main model for HP2inthob for wave= 1

chunk 8 H1 test:Gender= male  model Wave =  1 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        Full Nottingham Part 2 subscale models for females           *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:17:43  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        362
                                                  LR chi2(4)      =      91.22
                                                  Prob > chi2     =     0.0000
Log likelihood = -126.30289                       Pseudo R2       =     0.2653

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0702541    .0161129      4.36    0.000      .0386734     .1018347
     radhlw1 |    .0195656     .004896      4.00    0.000      .0099695     .0291616
avgcumdosew1 |    .2200581     .222466      0.99    0.323     -.2159672     .6560835
         bf4 |   -.1103614    .0315756     -3.50    0.000     -.1722484    -.0484743
       _cons |   -5.707394    1.074147     -5.31    0.000     -7.812684    -3.602104
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        29            10  |         39
     -     |        37           286  |        323
-----------+--------------------------+-----------
   Total   |        66           296  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   43.94%
Specificity                     Pr( -|~D)   96.62%
Positive predictive value       Pr( D| +)   74.36%
Negative predictive value       Pr(~D| -)   88.54%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.38%
False - rate for true D         Pr( -| D)   56.06%
False + rate for classified +   Pr(~D| +)   25.64%
False - rate for classified -   Pr( D| -)   11.46%
--------------------------------------------------
Correctly classified                        87.02%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       360
            Pearson chi2(355) =       441.04
                  Prob > chi2 =         0.0012

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -171.912     Log-Lik Full Model:         -126.303
D(357):                      252.606     LR(4):                        91.217
                                         Prob > LR:                     0.000
McFadden's R2:                 0.265     McFadden's Adj R2:             0.236
Maximum Likelihood R2:         0.223     Cragg & Uhler's R2:            0.363
McKelvey and Zavoina's R2:     0.426     Efron's R2:                    0.309
Variance of y*:                5.731     Variance of error:             3.290
Count R2:                      0.870     Adj Count R2:                  0.288
AIC:                           0.725     AIC*n:                       262.606
BIC:                       -1850.711     BIC':                        -67.651

. scalar SigdoseInthbFw1 = "no"

. scalar MainEffInthbFw1 = "age radhlw1 bf4"

.
. title4 "*------chunk 8 testing female interests and hobbies moderators"
-------------
*------chunk 8 testing female interests and hobbies moderators
-------------

.
.
. forvalues j=1/1 {
  2. set more off
  3.
. des age educ1-educ7 marrw`j'1-marrw`j'6 inc1w`j'-inc4w`j' ///
>   bf1 bf4 bf9 bf11 bf4m bf15m bf30 bf40
  4.
. cap gen ageXd1 = age*avgcumdosew1
  5. foreach var in HP2inthob  {
  6. local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40
  7. di _skip(4)
  8.  di as input "Full main model for `var' for wave= `j' "
  9. di _skip(4)
 10. di as input  "chunk 8 H1 test:Gender= male  model Wave =  `j' for `e(depvar)' "
 11. di _skip(4)
 12.
.       xi: logistic `var' age   ///
>                 radhlw`j' avgcumdosew`j' ///
>                    bf4  bf4Xd1 ageXd1 radhlw1Xd1 ///
>                  if gender==2, coef  difficult iterate(50)
 13.                         estat class
 14.                         estat gof
 15.                         fitstat
 16. }
 17. }

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


age               double   %8.0g                    *   Respondent's age


educ1             byte     %8.0g                        educ==1. did not graduate high school


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


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


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


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


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


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


marrw11           byte     %8.0g                        marrw1==1. single


marrw12           byte     %8.0g                        marrw1==2. cohabitating


marrw13           byte     %8.0g                        marrw1==3. married


marrw14           byte     %8.0g                        marrw1==4. separated


marrw15           byte     %8.0g                        marrw1==5. divorced


marrw16           byte     %8.0g                        marrw1==6. widowed


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


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


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


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


bf1               float    %9.0g                        bf1 = max(0, kzchorn - 40)


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


bf9               float    %9.0g                        bf9= max(0, 30 - shhlw1)


bf11              float    %9.0g                        bf11= max(0, 20 - sufamw1)


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


bf15m             float    %9.0g                        bf15m= max(0, 1 - icdxcnt) * bf2


bf30              float    %9.0g                        bf30 = max(0, neiw1 - 85) * bf20


bf40              float    %9.0g                        bf40 = max(0, icdxcnt - 1.01635E-007)


Full main model for HP2inthob for wave= 1

chunk 8 H1 test:Gender= male  model Wave =  1 for HP2inthob


Logistic regression                               Number of obs   =        362
                                                  LR chi2(7)      =      91.60
                                                  Prob > chi2     =     0.0000
Log likelihood =   -126.114                       Pseudo R2       =     0.2664

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .067857    .0189391      3.58    0.000       .030737     .1049771
     radhlw1 |    .0207366    .0056517      3.67    0.000      .0096595     .0318137
avgcumdosew1 |   -.1191818    2.032868     -0.06    0.953     -4.103531     3.865167
         bf4 |   -.1190418    .0397853     -2.99    0.003     -.1970196    -.0410639
      bf4Xd1 |    .0200494    .0609254      0.33    0.742     -.0993622      .139461
      ageXd1 |    .0057703    .0330253      0.17    0.861     -.0589581     .0704986
  radhlw1Xd1 |    -.001995    .0056092     -0.36    0.722     -.0129888     .0089987
       _cons |   -5.587746     1.23496     -4.52    0.000     -8.008224    -3.167268
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        30            11  |         41
     -     |        36           285  |        321
-----------+--------------------------+-----------
   Total   |        66           296  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   45.45%
Specificity                     Pr( -|~D)   96.28%
Positive predictive value       Pr( D| +)   73.17%
Negative predictive value       Pr(~D| -)   88.79%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.72%
False - rate for true D         Pr( -| D)   54.55%
False + rate for classified +   Pr(~D| +)   26.83%
False - rate for classified -   Pr( D| -)   11.21%
--------------------------------------------------
Correctly classified                        87.02%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       360
            Pearson chi2(352) =       446.24
                  Prob > chi2 =         0.0005

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -171.912     Log-Lik Full Model:         -126.114
D(354):                      252.228     LR(7):                        91.595
                                         Prob > LR:                     0.000
McFadden's R2:                 0.266     McFadden's Adj R2:             0.220
Maximum Likelihood R2:         0.224     Cragg & Uhler's R2:            0.365
McKelvey and Zavoina's R2:     0.431     Efron's R2:                    0.311
Variance of y*:                5.782     Variance of error:             3.290
Count R2:                      0.870     Adj Count R2:                  0.288
AIC:                           0.741     AIC*n:                       268.228
BIC:                       -1833.414     BIC':                        -50.354

. scalar InthbModFw1 = "none"

.
. title4 " dose-  interests and hobbies  mediator effect models"
-------------
 dose-  interests and hobbies  mediator effect models
-------------

.
. * age is a mediating effect for males for Dose=> sex life for men
.
. glm age avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm HP2inthob age  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  224.8585
Iteration 2:   deviance =  219.8355
Iteration 3:   deviance =  219.6997
Iteration 4:   deviance =  219.6996
Iteration 5:   deviance =  219.6996

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  219.6996277                    (1/df) Deviance =  .6499989
Pearson          =  354.7105724                    (1/df) Pearson  =   1.04944

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1750.484

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .031726    .0062563      5.07    0.000      .0194638     .0439882
       _cons |   -2.867608     .344284     -8.33    0.000     -3.542392    -2.192824
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des illw1

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


illw1             double   %8.0g                        Total number of illnesses experienced in time period 1976-1986


. glm illw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -151.48261

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  .1435742
Deviance         =  48.52808533                    (1/df) Deviance =  .1435742
Pearson          =  48.52808533                    (1/df) Pearson  =  .1435742

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  .9028389
Log likelihood   = -151.4826069                    BIC             = -1921.656

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0087277    .0123318      0.71    0.479     -.0154423     .0328976
       _cons |    .0962541    .0212201      4.54    0.000      .0546635     .1378446
-------------+----------------------------------------------------------------

. glm HP2inthob illw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  237.5512
Iteration 2:   deviance =  236.4934
Iteration 3:   deviance =  236.4907
Iteration 4:   deviance =  236.4907

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  236.4906909                    (1/df) Deviance =  .6996766
Pearson          =  341.1245148                    (1/df) Pearson  =  1.009244

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1733.693

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |    .2627617    .1703489      1.54    0.123      -.071116     .5966393
       _cons |   -1.249391    .0787713    -15.86    0.000      -1.40378    -1.095002
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * radhlw1 is a possible mediator for wave 1 males and interests and hobbies.
. des radhlw1

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


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


. glm radhlw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1710.3417

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1378.645
Deviance         =  465981.8893                    (1/df) Deviance =  1378.645
Pearson          =  465981.8893                    (1/df) Pearson  =  1378.645

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   10.0726
Log likelihood   = -1710.341694                    BIC             =  464011.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    2.398285    1.208412      1.98    0.047      .0298407     4.766729
       _cons |    44.66477    2.079384     21.48    0.000      40.58925     48.74029
-------------+----------------------------------------------------------------

. glm HP2inthob radhlw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  212.8979
Iteration 2:   deviance =  203.1654
Iteration 3:   deviance =  202.4404
Iteration 4:   deviance =  202.4342
Iteration 5:   deviance =  202.4342
Iteration 6:   deviance =  202.4342

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  202.4342472                    (1/df) Deviance =  .5989179
Pearson          =  366.2964245                    (1/df) Pearson  =  1.083717

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1767.749

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0153039    .0021709      7.05    0.000      .0110489     .0195589
       _cons |   -2.114122    .1635196    -12.93    0.000     -2.434615     -1.79363
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des shfamw1

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


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


. glm shfamw1  avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1722.3986

Generalized linear models                          No. of obs      =       339
Optimization     : ML                              Residual df     =       337
                                                   Scale parameter =    1524.9
Deviance         =  513891.1861                    (1/df) Deviance =    1524.9
Pearson          =  513891.1861                    (1/df) Pearson  =    1524.9

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.17344
Log likelihood   = -1722.398621                    BIC             =  511927.8

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.8322929    1.270907     -0.65    0.513     -3.323226      1.65864
       _cons |    38.72924    2.190054     17.68    0.000      34.43681     43.02167
-------------+----------------------------------------------------------------

. glm HP2inthob shfamw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  236.3247
Iteration 2:   deviance =  234.8343
Iteration 3:   deviance =  234.8258
Iteration 4:   deviance =  234.8258
Iteration 5:   deviance =  234.8258

Generalized linear models                          No. of obs      =       339
Optimization     : MQL Fisher scoring              Residual df     =       337
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  234.8258277                    (1/df) Deviance =  .6968125
Pearson          =   340.806701                    (1/df) Pearson  =  1.011296

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1728.536

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw1 |    .0039265    .0018944      2.07    0.038      .0002136     .0076394
       _cons |   -1.380389    .1125461    -12.27    0.000     -1.600976    -1.159803
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des bf5m

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


bf5m              float    %9.0g                        bf5m = max(0, ecprw3 - 75) * bf4m


. glm bf5m  avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -2272.9908

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  37743.06
Deviance         =  12757154.41                    (1/df) Deviance =  37743.06
Pearson          =  12757154.41                    (1/df) Pearson  =  37743.06

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   13.3823
Log likelihood   = -2272.990823                    BIC             =  1.28e+07

-------------+----------------------------------------------------------------
             |                 OIM
         bf5m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    14.60088     6.32277      2.31    0.021      2.208475     26.99328
       _cons |     107.248    10.87995      9.86    0.000      85.92368     128.5723
-------------+----------------------------------------------------------------

. glm HP2inthob bf5m  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  238.9021
Iteration 2:   deviance =  238.0124
Iteration 3:   deviance =  238.0098
Iteration 4:   deviance =  238.0098
Iteration 5:   deviance =  238.0098

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  238.0098185                    (1/df) Deviance =  .7041711
Pearson          =  339.8073754                    (1/df) Pearson  =  1.005347

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1732.174

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf5m |    .0001615     .000378      0.43    0.669     -.0005794     .0009024
       _cons |   -1.236147    .0878768    -14.07    0.000     -1.408382    -1.063912
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm bf4 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1026.9659

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  24.75428
Deviance         =  8366.946191                    (1/df) Deviance =  24.75428
Pearson          =  8366.946191                    (1/df) Pearson  =  24.75428

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   6.05274
Log likelihood   = -1026.965868                    BIC             =  6396.763

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.1031788     .161925     -0.64    0.524     -.4205461     .2141884
       _cons |    12.54134    .2786337     45.01    0.000      11.99523     13.08746
-------------+----------------------------------------------------------------

. glm HP2inthob bf4  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  201.5914
Iteration 2:   deviance =  191.8769
Iteration 3:   deviance =  191.2682
Iteration 4:   deviance =  191.2622
Iteration 5:   deviance =  191.2622
Iteration 6:   deviance =  191.2622

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  191.2622075                    (1/df) Deviance =  .5658645
Pearson          =   305.593706                    (1/df) Pearson  =  .9041234

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1778.921

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1182178     .013496     -8.76    0.000     -.1446695     -.091766
       _cons |    .0441185    .1517879      0.29    0.771     -.2533804     .3416174
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. scalar inthobMw1 = "age "

.
. * age is a mediating effect for females for Dose=> sex life for women
. glm age avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1406.325

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =   136.455
Deviance         =  49260.25928                    (1/df) Deviance =   136.455
Pearson          =  49260.25928                    (1/df) Pearson  =   136.455

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.759366
Log likelihood   = -1406.325011                    BIC             =  47132.38

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.783267      6.16449
       _cons |    48.88157    .7187038     68.01    0.000      47.47293      50.2902
-------------+----------------------------------------------------------------

. glm HP2inthob age  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  293.9671
Iteration 2:   deviance =    289.27
Iteration 3:   deviance =  289.1951
Iteration 4:   deviance =  289.1951
Iteration 5:   deviance =  289.1951

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  289.1950995                    (1/df) Deviance =  .8010945
Pearson          =  415.3464621                    (1/df) Pearson  =  1.150544

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1838.684

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0515323    .0068567      7.52    0.000      .0380933     .0649713
       _cons |   -3.649661    .3847198     -9.49    0.000     -4.403698    -2.895624
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * illw1 is a mediating effect for females for Dose=> sex life for women
. glm illw1 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -259.70777

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  .2462383
Deviance         =  88.89203958                    (1/df) Deviance =  .2462383
Pearson          =  88.89203958                    (1/df) Pearson  =  .2462383

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  1.441916
Log likelihood   = -259.7077741                    BIC             = -2038.987

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0655142    .0474789      1.38    0.168     -.0275426     .1585711
       _cons |    .1570822    .0305304      5.15    0.000      .0972436     .2169207
-------------+----------------------------------------------------------------

. glm HP2inthob illw1  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  344.2026
Iteration 2:   deviance =  344.1217
Iteration 3:   deviance =  344.1216
Iteration 4:   deviance =  344.1216

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   344.121648                    (1/df) Deviance =  .9532456
Pearson          =  362.9817892                    (1/df) Pearson  =   1.00549

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1783.758

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |      .04902    .1470127      0.33    0.739     -.2391195     .3371596
       _cons |   -.9175059    .0797583    -11.50    0.000     -1.073829    -.7611824
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des bf4   // soma recentered

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


bf4               float    %9.0g                        bf4 = max(0, 24 - BSIsoma)


. * bf4 is a mediting effect for females for Dose=>  sex life for women
. glm bf4  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.0162

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  26.52082
Deviance         =  9574.015672                    (1/df) Deviance =  26.52082
Pearson          =  9574.015672                    (1/df) Pearson  =  26.52082

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.121302
Log likelihood   = -1109.016226                    BIC             =  7446.136

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.508835    .4927379     -3.06    0.002     -2.474583    -.5430862
       _cons |    10.99384    .3168463     34.70    0.000      10.37284     11.61485
-------------+----------------------------------------------------------------

. glm HP2inthob bf4  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  304.5744
Iteration 2:   deviance =   301.504
Iteration 3:   deviance =  301.4488
Iteration 4:   deviance =  301.4487
Iteration 5:   deviance =  301.4487

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  301.4486672                    (1/df) Deviance =  .8350379
Pearson          =  341.1451194                    (1/df) Pearson  =  .9450003

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1826.431

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0993749    .0142594     -6.97    0.000     -.1273229     -.071427
       _cons |    .0117358    .1447759      0.08    0.935     -.2720197     .2954914
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des bf4m // soma recentered

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


bf4m              float    %9.0g                        bf4m = max(0, 32 - BSIsoma)


. * bf4m is a possible mediating effect for female sex life
. glm bf4m  avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1140.521

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =    31.548
Deviance         =  11388.82943                    (1/df) Deviance =    31.548
Pearson          =  11388.82943                    (1/df) Pearson  =    31.548

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  6.294882
Log likelihood   = -1140.521046                    BIC             =   9260.95

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -1.563541    .5374133     -2.91    0.004     -2.616852    -.5102303
       _cons |    18.82212    .3455741     54.47    0.000       18.1448     19.49943
-------------+----------------------------------------------------------------

. glm HP2sxlife bf4m  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  356.1451
Iteration 2:   deviance =  355.6209
Iteration 3:   deviance =  355.6178
Iteration 4:   deviance =  355.6178
Iteration 5:   deviance =  355.6178

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  355.6178202                    (1/df) Deviance =  .9850909
Pearson          =  340.0032816                    (1/df) Pearson  =  .9418373

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1772.262

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.0990193    .0135516     -7.31    0.000       -.12558    -.0724586
       _cons |    1.063679     .244399      4.35    0.000       .584666     1.542693
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shfamw1

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


shfamw1           double   %8.0g                        Percentage of strains and hassles related to family in 1986


. glm shfamw1  avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1722.3986

Generalized linear models                          No. of obs      =       339
Optimization     : ML                              Residual df     =       337
                                                   Scale parameter =    1524.9
Deviance         =  513891.1861                    (1/df) Deviance =    1524.9
Pearson          =  513891.1861                    (1/df) Pearson  =    1524.9

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.17344
Log likelihood   = -1722.398621                    BIC             =  511927.8

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.8322929    1.270907     -0.65    0.513     -3.323226      1.65864
       _cons |    38.72924    2.190054     17.68    0.000      34.43681     43.02167
-------------+----------------------------------------------------------------

. glm HP2sxlife shfamw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =   339.011
Iteration 2:   deviance =  338.8015
Iteration 3:   deviance =  338.8014
Iteration 4:   deviance =  338.8014

Generalized linear models                          No. of obs      =       339
Optimization     : MQL Fisher scoring              Residual df     =       337
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  338.8013645                    (1/df) Deviance =  1.005345
Pearson          =  339.2776273                    (1/df) Pearson  =  1.006759

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1624.561

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw1 |    .0019797    .0019787      1.00    0.317     -.0018986     .0058579
       _cons |   -.9179132    .1113818     -8.24    0.000     -1.136218    -.6996088
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shrelaw1

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


shrelaw1          double   %8.0g                        Percentage of strains and hassles related to relationships in 1986


. glm shrelaw1  avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1715.4166

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1420.421
Deviance         =  480102.3567                    (1/df) Deviance =  1420.421
Pearson          =  480102.3567                    (1/df) Pearson  =  1420.421

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.10245
Log likelihood   = -1715.416629                    BIC             =  478132.2

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |   -.0649405    1.226584     -0.05    0.958     -2.469002     2.339121
       _cons |    29.57199    2.110654     14.01    0.000      25.43518      33.7088
-------------+----------------------------------------------------------------

. glm HP2inthob shrelaw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  238.2169
Iteration 2:   deviance =  237.1515
Iteration 3:   deviance =  237.1479
Iteration 4:   deviance =  237.1479

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  237.1479061                    (1/df) Deviance =   .701621
Pearson          =  340.4217715                    (1/df) Pearson  =  1.007165

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1733.036

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw1 |    .0022898    .0019458      1.18    0.239     -.0015239     .0061035
       _cons |   -1.289369    .0985609    -13.08    0.000     -1.482545    -1.096193
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. title4 "6. Summary matrix for dose - interests and hobbies impact"
-------------
6. Summary matrix for dose - interests and hobbies impact
-------------

. *xx summary of mediating effects: males only age and illw1  2
. *xx           females: age
. scalar SigDoseInthbMw1 = "no"

. scalar MainEffInthbMw1 = "age radhlw1 shfamw1"

. scalar InthbModMw1 = "none"

. scalar InthbModFw1 = "none"

. scalar SigdoseInthbFw1 = "no"

. scalar MainEffInthbFw1 = "age radhlw1 bf4"

. * summary of inthob  moderator effects  none
. scalar inthobMedMw1 = "age "

. scalar inthobMedFw1 = "age bf4 illw1 bf4m"

. scalar SigdoseMEinthob = "no"

. scalar MainEffMw1 = "radhlw1 bf4 bf40"

. * no sign main dose effect for males
. * no male moderators
. * 3 signif main effects in male main effect model
.
.
. * no signif dose main effect for females
. * 3 main female effects
. * no significant female moderators
. di _skip(4)


.  matrix define  inthbMw1 = J(1,8, 0)

.         matrix define  inthbFw1 = J(1,8, 0)

. matrix colnames  inthbMw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

. matrix colnames  inthbFw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix define  inthbMw1= (1, 2, 1, 1, 0, 3, 0, 1 )

.         matrix define  inthbFw1= (1, 2, 1, 2, 0, 3, 0, 4 )

.         matrix rowname  inthbMw1 =  inthbM

.         matrix rowname  inthbFw1 =  inthobF

.         matlist  inthbMw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
inthbM   |         1            2            1            1            0            3            0            1

.         matlist  inthbFw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
inthobF   |         1            2            1            2            0            3            0            4

.         matrix define H1pt2w1 = (  wkMw1 \  wkFw1 \  hmcrMw1 \  hmcrFw1 \  spMw1 ///
>             \  spFw1 \  prbfamMw1 \ prbfamFw1 \ sxlifeMw1 \ sxlifeFw1 \ inthbMw1 \  inthbFw1)

.
.         matlist H1pt2w1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            1            1            2
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            2            0            2
spMw1   |         1            2            1            1            1            2            2            1
spFw1   |         1            2            1            2            0            5            0            2
prbfamMw1   |         1            2            1            1            0            2            0            0
prbfamFw1   |         1            2            1            2            0            3            0            2
sxlifeMw1   |         1            2            1            1            0            3            0            1
sxlifeFw1   |         1            2            1            2            0            4            0            5
inthbM   |         1            2            1            1            0            3            0            1
inthobF   |         1            2            1            2            0            3            0            4

.     matrix colnames H1pt2w1 =  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix rownames H1pt2w1 =    wkMw1  wkFw1  hmcrMw1  hmcrFw1  socprbMw1  socprbFw1  prbfamMw1 prbFamFw1 sxlifeMw1 sxlifeFw1 inthbMw1  inthbFw1

.     matlist H1pt2w1

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
wkMw1   |         1            2            1            1            0            2            0            1
wkFw1   |         1            2            1            2            0            1            1            2
hmcrMw1   |         1            2            1            1            0            2            0            1
hmcrFw1   |         1            2            1            2            0            2            0            2
socprbMw1   |         1            2            1            1            1            2            2            1
socprbFw1   |         1            2            1            2            0            5            0            2
prbfamMw1   |         1            2            1            1            0            2            0            0
prbFamFw1   |         1            2            1            2            0            3            0            2
sxlifeMw1   |         1            2            1            1            0            3            0            1
sxlifeFw1   |         1            2            1            2            0            4            0            5
inthbMw1   |         1            2            1            1            0            3            0            1
inthbFw1   |         1            2            1            2            0            3            0            4

.
. title "7.  h1 pt2 wave 1 Dose=> vacation plans impact  analysis "xxxxxxxxxxxxxxxxxxx


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****     7.  h1 pt2 wave 1 Dose=> vacation plans impact  analysis        *****
*****                        xxxxxxxxxxxxxxxxxxx                          *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:18:19  *****
*******************************************************************************
*******************************************************************************


.
.
.
. cap gen hp2vactn = HP2vacatn

.
. forvalues j=1/1 {
  2. title " H1 pt 2 wave 1 Dose = >   hp2vactn main effects models"
  3. set more off
  4. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  5. local w1bf bf1 bf4 bf9 bf10 bf11 bf14 bf15m bf20 bf22 bf30 bf40
  6. local w1bf bf1 bf4 bf9 bf10 bf11 bf14 bf15m bf20 bf22 bf30 bf40
  7. di _skip(3)
  8.
. di as input "Male model wave 1 dose-hp2vactn moderator model "
  9. di _skip(4)
 10. xi: logistic hp2vactn age i.educ occ1w`j'-occ8w`j' ///
>   marrw`j'1- marrw`j'3 marrw`j'5-marrw`j'6 inc1w`j'-inc4w`j' ///
>   radhlw`j' havmil avgcumdosew`j' `w`j'bf'  ///
>   deaw`j' dvcew`j' sepaw`j' accdw`j' movew`j' ///
>  illw`j' shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j'  havmilsq ///
>  radhlw`j' avgcumdosew`j' if gender==1, coef
 11.  di _skip(4)
 12.  title3 "trimmed hp2vactn main effects models for H1 no direct dose effect for male"
 13.  pwcorr hp2hmcare age  deaw1 shjobw1 bf7m shjobw1 havmilsq ///
>   radhlw1 avgcumdosew1 if gender==1, sig obs sidak star(.05) listwise
 14. di _skip(1)
 15. di as input "For males hp2vactn wave3 and d1 is not signif "
 16. di _skip(1)
 17.   logistic hp2vactn age  deaw1 shjobw1 bf7m  havmilsq ///
>   radhlw1 avgcumdosew1 if ///
>    gender==1, coef
 18. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       H1 pt 2 wave 1 Dose = >   hp2vactn main effects models        *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:18:19  *****
*******************************************************************************
*******************************************************************************


Male model wave 1 dose-hp2vactn moderator model

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 12 obs not used

note: _Ieduc_7 != 0 predicts failure perfectly
      _Ieduc_7 dropped and 4 obs not used

note: _Ieduc_8 != 0 predicts failure perfectly
      _Ieduc_8 dropped and 2 obs not used

note: occ6w1 != 0 predicts failure perfectly
      occ6w1 dropped and 4 obs not used

note: occ7w1 != 0 predicts failure perfectly
      occ7w1 dropped and 4 obs not used

note: marrw15 != 0 predicts success perfectly
      marrw15 dropped and 1 obs not used

note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 19 obs not used

note: dvcew1 != 0 predicts failure perfectly
      dvcew1 dropped and 2 obs not used

note: sepaw1 != 0 predicts success perfectly
      sepaw1 dropped and 1 obs not used

note: _Ieduc_6 omitted because of collinearity
note: marrw16 omitted because of collinearity
note: radhlw1 omitted because of collinearity
note: avgcumdosew1 omitted because of collinearity

Logistic regression                               Number of obs   =        284
                                                  LR chi2(41)     =     101.69
                                                  Prob > chi2     =     0.0000
Log likelihood = -57.124451                       Pseudo R2       =     0.4709

-------------+----------------------------------------------------------------
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1177419    .0451828      2.61    0.009      .0291854     .2062985
    _Ieduc_2 |   -3.055944    1.716937     -1.78    0.075     -6.421078     .3091893
    _Ieduc_3 |    -.212761    .8269168     -0.26    0.797     -1.833488     1.407966
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    -.158373    .8405787     -0.19    0.851     -1.805877     1.489131
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w1 |    .9327826    3.048048      0.31    0.760     -5.041281     6.906846
      occ2w1 |    1.600773    3.127281      0.51    0.609     -4.528585     7.730132
      occ3w1 |    .8629517    3.222587      0.27    0.789     -5.453202     7.179105
      occ4w1 |    .7047753    3.193274      0.22    0.825     -5.553927     6.963477
      occ5w1 |    .9185675    3.369728      0.27    0.785     -5.685978     7.523113
      occ6w1 |           0   (omitted)
      occ7w1 |           0   (omitted)
      occ8w1 |    2.576584     3.31921      0.78    0.438     -3.928947     9.082116
     marrw11 |    8.063251    1454.164      0.01    0.996     -2842.047     2858.173
     marrw12 |    8.396586    1454.165      0.01    0.995     -2841.715     2858.509
     marrw13 |    6.592655    1454.165      0.00    0.996     -2843.518     2856.703
     marrw15 |           0   (omitted)
     marrw16 |           0   (omitted)
      inc1w1 |     1.72241    3.405241      0.51    0.613     -4.951739     8.396559
      inc2w1 |    1.681005    3.353329      0.50    0.616     -4.891398     8.253409
      inc3w1 |    1.742795    3.224514      0.54    0.589     -4.577137     8.062726
      inc4w1 |      .22304    3.501992      0.06    0.949     -6.640738     7.086818
     radhlw1 |    .0177143    .0102482      1.73    0.084     -.0023719     .0378004
      havmil |    -.000285    .0120623     -0.02    0.981     -.0239267     .0233567
avgcumdosew1 |    -.101335     .173417     -0.58    0.559      -.441226      .238556
         bf1 |    -.067538     .109717     -0.62    0.538     -.2825793     .1475033
         bf4 |   -.2732381    .0860278     -3.18    0.001     -.4418495    -.1046267
         bf9 |     .045179    .0491094      0.92    0.358     -.0510737     .1414317
        bf10 |   -.0859725    .0443879     -1.94    0.053     -.1729712     .0010262
        bf11 |    .0439137    .1246785      0.35    0.725     -.2004517      .288279
        bf14 |   -.0000515    .0001058     -0.49    0.627     -.0002589     .0001559
       bf15m |           0   (omitted)
        bf20 |    .0464251    .1033689      0.45    0.653     -.1561741     .2490244
        bf22 |    .0001389    .0001358      1.02    0.306     -.0001273     .0004051
        bf30 |    -.001371    .0006346     -2.16    0.031     -.0026148    -.0001273
        bf40 |    .3396411    .2165949      1.57    0.117     -.0848772     .7641593
       deaw1 |   -.5911018    .7169403     -0.82    0.410     -1.996279     .8140753
      dvcew1 |           0   (omitted)
      sepaw1 |           0   (omitted)
      accdw1 |    1.690611    1.483962      1.14    0.255       -1.2179     4.599123
      movew1 |    .7972512    .7853957      1.02    0.310     -.7420961     2.336598
       illw1 |   -1.434715    .7967422     -1.80    0.072     -2.996301     .1268714
     shfamw1 |   -.0116324    .0105102     -1.11    0.268      -.032232     .0089671
      shhlw1 |    .0339732    .0188557      1.80    0.072     -.0029832     .0709297
     shjobw1 |    .0121109    .0125268      0.97    0.334     -.0124412      .036663
    shrelaw1 |   -.0146336    .0112271     -1.30    0.192     -.0366384     .0073711
     suprtw1 |    .1086712    .0510741      2.13    0.033      .0085679     .2087746
     suchrw1 |   -.0573692    .0444525     -1.29    0.197     -.1444944     .0297561
    havmilsq |   -6.00e-06    .0000223     -0.27    0.787     -.0000496     .0000376
     radhlw1 |           0   (omitted)
avgcumdosew1 |           0   (omitted)
       _cons |   -21.03776    1454.176     -0.01    0.988      -2871.17     2829.095
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


-------------
title3 : trimmed hp2vactn main effects models for H1 no direct dose effect for male
18 Jun 2012
18:18:21
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide16june2012.dta  currrently has  2388  variables and  703  observations

             | hp2hmc~e      age    deaw1  shjobw1     bf7m  shjobw1 havmilsq
-------------+---------------------------------------------------------------
   hp2hmcare |   1.0000
             |
             |      340
             |
         age |   0.2761*  1.0000
             |   0.0000
             |      340      340
             |
       deaw1 |   0.0095   0.2204*  1.0000
             |   1.0000   0.0015
             |      340      340      340
             |
     shjobw1 |   0.2490*  0.2162* -0.0439   1.0000
             |   0.0001   0.0021   1.0000
             |      340      340      340      340
             |
        bf7m |  -0.1339  -0.0182   0.1915* -0.2097*  1.0000
             |   0.3860   1.0000   0.0137   0.0035
             |      340      340      340      340      340
             |
     shjobw1 |   0.2490*  0.2162* -0.0439   1.0000* -0.2097*  1.0000
             |   0.0001   0.0021   1.0000   0.0000   0.0035
             |      340      340      340      340      340      340
             |
    havmilsq |  -0.0347   0.0207  -0.0393   0.0027  -0.0420   0.0027   1.0000
             |   1.0000   1.0000   1.0000   1.0000   1.0000   1.0000
             |      340      340      340      340      340      340      340
             |
     radhlw1 |   0.2183*  0.3167*  0.0077   0.4115*  0.0528   0.4115* -0.1218
             |   0.0018   0.0000   1.0000   0.0000   1.0000   0.0000   0.5939
             |      340      340      340      340      340      340      340
             |
avgcumdosew1 |   0.0010   0.0918  -0.0226   0.0656   0.0206   0.0656  -0.0345
             |   1.0000   0.9680   1.0000   0.9999   1.0000   0.9999   1.0000
             |      340      340      340      340      340      340      340
             |

             |  radhlw1 avgcum~1
-------------+------------------
     radhlw1 |   1.0000
             |
             |      340
             |
avgcumdosew1 |   0.1073   1.0000
             |   0.8298
             |      340      340
             |

For males hp2vactn wave3 and d1 is not signif


Logistic regression                               Number of obs   =        340
                                                  LR chi2(7)      =      58.56
                                                  Prob > chi2     =     0.0000
Log likelihood = -95.872164                       Pseudo R2       =     0.2340

-------------+----------------------------------------------------------------
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0698089    .0169544      4.12    0.000      .0365789     .1030389
       deaw1 |   -1.031518    .5915573     -1.74    0.081     -2.190949     .1279133
     shjobw1 |    .0185312    .0064023      2.89    0.004       .005983     .0310794
        bf7m |    .0000825    .0002766      0.30    0.766     -.0004597     .0006247
    havmilsq |   -6.78e-06    8.13e-06     -0.83    0.405     -.0000227     9.17e-06
     radhlw1 |    .0131121     .005597      2.34    0.019      .0021422     .0240821
avgcumdosew1 |   -.1161641    .1842657     -0.63    0.528     -.4773183     .2449901
       _cons |   -7.463166     1.17919     -6.33    0.000     -9.774335    -5.151996
-------------+----------------------------------------------------------------

.
. scalar SigDoseVactnMw1 = "no"

. scalar MainEffVactnMw1 = "age radhlw1 shjobw1 "

.
. local cn7:colnames(e(b))

. di "`cn7'"
age deaw1 shjobw1 bf7m havmilsq radhlw1 avgcumdosew1 _cons

. local len7 = length("`cn7'")

. di `len7'
58

. local len7b = `len7' - 6

. di `len7b'
52

. local myvarlist = substr("`cn7'",1,`len7b')

. di "`myvarlist'"
age deaw1 shjobw1 bf7m havmilsq radhlw1 avgcumdosew1

.
. foreach var in `myvarlist' {
  2. cap gen `var'Xd1 = `var'*avgcumdosew1
  3. }

.
. title " Trimmed male main effects dose=> vacation plans  model"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       Trimmed male main effects dose=> vacation plans  model        *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:18:22  *****
*******************************************************************************
*******************************************************************************


. di as input "No sig main male dose main effects model"
No sig main male dose main effects model

. sw, pr(.1): logit hp2vacatn `myvarlist' if gender==1


  begin with full model


p = 0.7655 >= 0.1000  removing bf7m


p = 0.5322 >= 0.1000  removing avgcumdosew1


p = 0.4214 >= 0.1000  removing havmilsq


Logistic regression                               Number of obs   =        340
                                                  LR chi2(4)      =      56.62
                                                  Prob > chi2     =     0.0000
Log likelihood =   -96.8403                       Pseudo R2       =     0.2262

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0683746    .0168652      4.05    0.000      .0353194     .1014298
       deaw1 |   -.9608875    .5756492     -1.67    0.095     -2.089139     .1673642
     shjobw1 |    .0175447    .0060455      2.90    0.004      .0056958     .0293937
     radhlw1 |     .013369    .0055515      2.41    0.016      .0024883     .0242496
       _cons |   -7.378809    1.054557     -7.00    0.000     -9.445702    -5.311916
-------------+----------------------------------------------------------------

.
.
. local cn8:colnames(e(b))

. di "`cn8'"
age deaw1 shjobw1 radhlw1 _cons

. local len8 = length("`cn8'")

. di `len7'
58

. local len8b = `len8' - 6

. di `len8b'
25

. local myvarlist = substr("`cn8'",1,`len8b')

. di "`myvarlist'"
age deaw1 shjobw1 radhlw1

.
. logit hp2vacatn age radhlw1 avgcumdosew1 ageXd1 radhlw1Xd1 if gender==1

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -107.61459
Iteration 2:   log likelihood = -104.56768
Iteration 3:   log likelihood = -104.54823
Iteration 4:   log likelihood = -104.54822

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      41.21
                                                  Prob > chi2     =     0.0000
Log likelihood = -104.54822                       Pseudo R2       =     0.1646

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0601195    .0209224      2.87    0.004      .0191123     .1011267
     radhlw1 |    .0187374    .0058584      3.20    0.001      .0072551     .0302197
avgcumdosew1 |    .1429635    3.450929      0.04    0.967     -6.620734     6.906661
      ageXd1 |   -.0052571    .0512646     -0.10    0.918     -.1057338     .0952196
  radhlw1Xd1 |    .0008937    .0086815      0.10    0.918     -.0161217     .0179091
       _cons |   -6.233448    1.294444     -4.82    0.000     -8.770513    -3.696384
-------------+----------------------------------------------------------------

.
.  title "Trimmed male wave 1 interaction dose=> vacation plans model"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****    Trimmed male wave 1 interaction dose=> vacation plans model      *****
*****                                                                     *****
*****                                                                     *****
*****                                            18 Jun 2012    18:18:30  *****
*******************************************************************************
*******************************************************************************


.  logit hp2vacatn age radhlw1 ageXd1 bf7m avgcumdosew1 bf4m bf4mXd1 bf7mXd1 if gender==1

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -102.74095
Iteration 2:   log likelihood = -94.448542
Iteration 3:   log likelihood = -93.949822
Iteration 4:   log likelihood = -93.920677
Iteration 5:   log likelihood = -93.920292
Iteration 6:   log likelihood =  -93.92029

Logistic regression                               Number of obs   =        340
                                                  LR chi2(8)      =      62.46
                                                  Prob > chi2     =     0.0000
Log likelihood =  -93.92029                       Pseudo R2       =     0.2496

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0643459    .0308181      2.09    0.037      .0039435     .1247483
     radhlw1 |    .0089983    .0057782      1.56    0.119     -.0023267     .0203233
      ageXd1 |   -.0876104    .0995184     -0.88    0.379     -.2826628      .107442
        bf7m |    .0001157    .0003967      0.29    0.771     -.0006618     .0008932
avgcumdosew1 |    7.211044    8.155585      0.88    0.377     -8.773609      23.1957
        bf4m |   -.1044109    .0615606     -1.70    0.090     -.2250674     .0162456
     bf4mXd1 |   -.1652155    .1615499     -1.02    0.306     -.4818476     .1514165
     bf7mXd1 |    .0005521    .0007567      0.73    0.466      -.000931     .0020353
       _cons |   -4.176182    2.553316     -1.64    0.102      -9.18059     .8282258
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


.
.  scalar vactnModMw1 ="none"

.
. title4 "Trimmed Female model wave 1 main effects dose-hp2vacatn model "
-------------
Trimmed Female model wave 1 main effects dose-hp2vacatn model
-------------

.  forvalues j=1/1 {
  2.  local w1bf bf1 bf4 bf9 bf10 bf11 bf14m bf15m bf20 bf22 bf30 bf40
  3.
.   xi: logistic hp2vacatn age  radhlw`j' avgcumdosew`j'   ///
>   deaw`j'  suchrw`j'   ///
>     if gender==2, coef difficult iterate(50)
  4.
. }

Logistic regression                               Number of obs   =        359
                                                  LR chi2(5)      =      79.84
                                                  Prob > chi2     =     0.0000
Log likelihood = -126.83022                       Pseudo R2       =     0.2394

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0851484    .0156032      5.46    0.000      .0545668       .11573
     radhlw1 |    .0210852    .0051434      4.10    0.000      .0110043      .031166
avgcumdosew1 |     .097081    .2416199      0.40    0.688     -.3764853     .5706473
       deaw1 |    .0184403    .1587264      0.12    0.908     -.2926576     .3295383
     suchrw1 |    .0205099    .0120186      1.71    0.088     -.0030461     .0440658
       _cons |   -7.695923     .966869     -7.96    0.000     -9.590951    -5.800894
-------------+----------------------------------------------------------------

.
. sw, pr(.1): logit hp2vactn age radhlw1 avgcumdosew1 havmilsq ageXd1 radhlw1Xd1 if gender==2


  begin with full model


p = 0.8147 >= 0.1000  removing havmilsq


p = 0.7305 >= 0.1000  removing avgcumdosew1


p = 0.4968 >= 0.1000  removing ageXd1


p = 0.4278 >= 0.1000  removing radhlw1Xd1


Logistic regression                               Number of obs   =        362
                                                  LR chi2(2)      =      75.57
                                                  Prob > chi2     =     0.0000
Log likelihood = -129.53941                       Pseudo R2       =     0.2258

-------------+----------------------------------------------------------------
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0865333    .0154134      5.61    0.000      .0563237      .116743
     radhlw1 |    .0216968    .0050096      4.33    0.000      .0118782     .0315154
       _cons |   -7.711441    .9591085     -8.04    0.000     -9.591259    -5.831623
-------------+----------------------------------------------------------------

.
.
.
. scalar SigDoseVactnMw1 = "no"

. scalar MainEffVactnMw1 = "age radhlw1"

. scalar VactnModMw1 = "none"

.
.  * summary of male moderating effects: no sign main dose effect in main effects model
.  *         no signif male moderators
.  *         3 significant main effects in main effects model
.
.  * summary of female moderation main effects:  no signif main dose effect
.
.
. scalar SigDoseVactnFw1 = "no"

. scalar MainEffVactnFw1 = "age radhlw1 bf7m"

.
. cap gen suchrw1Xd1 = suchrw1*avgcumdosew1

.
.
. scalar VacatnModFw1 = "none"

. *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
. cap gen hp2vactn = HP2vacatn

. title4 "Male mediator tests for vacation plans impact of dose"
-------------
Male mediator tests for vacation plans impact of dose
-------------

. * for males
.
. * age is a mediator for males
. glm age avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1331.608

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  148.5632
Deviance         =  50214.37624                    (1/df) Deviance =  148.5632
Pearson          =  50214.37624                    (1/df) Pearson  =  148.5632

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.844753
Log likelihood   = -1331.607976                    BIC             =  48244.19

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .6719789    .3966839      1.69    0.090     -.1055072     1.449465
       _cons |    48.89394    .6825967     71.63    0.000      47.55607      50.2318
-------------+----------------------------------------------------------------

. glm hp2vactn age  if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  230.5483
Iteration 2:   deviance =  224.6254
Iteration 3:   deviance =  224.4149
Iteration 4:   deviance =  224.4147
Iteration 5:   deviance =  224.4147

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  224.4146771                    (1/df) Deviance =  .6639487
Pearson          =  345.2370578                    (1/df) Pearson  =  1.021411

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1745.769

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0377399    .0063833      5.91    0.000      .0252289     .0502509
       _cons |   -3.150096    .3549593     -8.87    0.000     -3.845803    -2.454388
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des illw1

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


illw1             double   %8.0g                        Total number of illnesses experienced in time period 1976-1986


. glm illw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -151.48261

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  .1435742
Deviance         =  48.52808533                    (1/df) Deviance =  .1435742
Pearson          =  48.52808533                    (1/df) Pearson  =  .1435742

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  .9028389
Log likelihood   = -151.4826069                    BIC             = -1921.656

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0087277    .0123318      0.71    0.479     -.0154423     .0328976
       _cons |    .0962541    .0212201      4.54    0.000      .0546635     .1378446
-------------+----------------------------------------------------------------

. glm hp2vactn illw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  250.8272
Iteration 2:   deviance =  250.3035
Iteration 3:   deviance =  250.3029
Iteration 4:   deviance =  250.3029

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  250.3028927                    (1/df) Deviance =  .7405411
Pearson          =  339.9984851                    (1/df) Pearson  =  1.005913

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1719.881

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |   -.0103789    .2018135     -0.05    0.959     -.4059261     .3851682
       _cons |   -1.171022    .0782871    -14.96    0.000     -1.324462    -1.017583
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw1

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


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


. glm radhlw1 avgcumdosew1 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1710.3417

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1378.645
Deviance         =  465981.8893                    (1/df) Deviance =  1378.645
Pearson          =  465981.8893                    (1/df) Pearson  =  1378.645

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =   10.0726
Log likelihood   = -1710.341694                    BIC             =  464011.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    2.398285    1.208412      1.98    0.047      .0298407     4.766729
       _cons |    44.66477    2.079384     21.48    0.000      40.58925     48.74029
-------------+----------------------------------------------------------------

. glm hp2vactn radhlw1 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  230.8439
Iteration 2:   deviance =  224.8904
Iteration 3:   deviance =  224.6643
Iteration 4:   deviance =  224.6638
Iteration 5:   deviance =  224.6638

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  224.6638339                    (1/df) Deviance =  .6646859
Pearson          =  351.6837556                    (1/df) Pearson  =  1.040484

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             =  -1745.52

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0123039    .0020846      5.90    0.000      .0082183     .0163896
       _cons |   -1.857875    .1493813    -12.44    0.000     -2.150657    -1.565093
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * for females
.
. * age is a mediator for females
. glm age avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1406.325

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =   136.455
Deviance         =  49260.25928                    (1/df) Deviance =   136.455
Pearson          =  49260.25928                    (1/df) Pearson  =   136.455

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  7.759366
Log likelihood   = -1406.325011                    BIC             =  47132.38

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.973879    1.117679      3.56    0.000      1.783267      6.16449
       _cons |    48.88157    .7187038     68.01    0.000      47.47293      50.2902
-------------+----------------------------------------------------------------

. glm hp2vactn age  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  288.2228
Iteration 2:   deviance =  282.9212
Iteration 3:   deviance =     282.8
Iteration 4:   deviance =     282.8
Iteration 5:   deviance =     282.8

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  282.7999835                    (1/df) Deviance =  .7833795
Pearson          =  396.9154874                    (1/df) Pearson  =  1.099489

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1845.079

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0510238    .0068535      7.44    0.000      .0375912     .0644564
       _cons |   -3.660305    .3855366     -9.49    0.000     -4.415943    -2.904667
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * illness is a mediating effect for females = > vacatn
. des illw1

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


illw1             double   %8.0g                        Total number of illnesses experienced in time period 1976-1986


. glm illw1 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -259.70777

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  .2462383
Deviance         =  88.89203958                    (1/df) Deviance =  .2462383
Pearson          =  88.89203958                    (1/df) Pearson  =  .2462383

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  1.441916
Log likelihood   = -259.7077741                    BIC             = -2038.987

-------------+----------------------------------------------------------------
             |                 OIM
        illw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    .0655142    .0474789      1.38    0.168     -.0275426     .1585711
       _cons |    .1570822    .0305304      5.15    0.000      .0972436     .2169207
-------------+----------------------------------------------------------------

. glm hp2vactn illw1 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  334.5587
Iteration 2:   deviance =  334.5192
Iteration 3:   deviance =  334.5191
Iteration 4:   deviance =  334.5191

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  334.5191456                    (1/df) Deviance =  .9266458
Pearson          =   363.294411                    (1/df) Pearson  =  1.006356

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             =  -1793.36

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw1 |    .1050277    .1426608      0.74    0.462     -.1745823     .3846376
       _cons |   -.9602112    .0797688    -12.04    0.000     -1.116555    -.8038673
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * radhlw1 is a mediating effect for females => vactn
. des radhlw1

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


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


. glm radhlw1 avgcumdosew1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1821.9477

Generalized linear models                          No. of obs      =       362
Optimization     : ML                              Residual df     =       360
                                                   Scale parameter =  1385.301
Deviance         =  498708.3025                    (1/df) Deviance =  1385.301
Pearson          =  498708.3025                    (1/df) Pearson  =  1385.301

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.07706
Log likelihood   = -1821.947718                    BIC             =  496587.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    3.789972    3.562254      1.06    0.287     -3.191917     10.77186
       _cons |    55.44948    2.293757     24.17    0.000       50.9538     59.94516
-------------+----------------------------------------------------------------

. glm hp2vactn radhlw1 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  302.9154
Iteration 2:   deviance =  298.4828
Iteration 3:   deviance =   298.355
Iteration 4:   deviance =  298.3548
Iteration 5:   deviance =  298.3548

Generalized linear models                          No. of obs      =       362
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  298.3548116                    (1/df) Deviance =  .8287634
Pearson          =  355.6125805                    (1/df) Pearson  =  .9878127

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             = -1822.637

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |    .0139561    .0022604      6.17    0.000      .0095258     .0183864
       _cons |   -1.855913    .1776242    -10.45    0.000      -2.20405    -1.507776
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.  * summary of male moderating effects: no sign main dose effect in main effects model
.  *         no signif male moderators
.  *         3 significant main effects in main effects model
. * summary omnibus model
. des radhlw1

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


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


. glm radhlw1 avgcumdosew1 illw1 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1818.8802

Generalized linear models                          No. of obs      =       362
Optimization     : ML                              Residual df     =       359
                                                   Scale parameter =  1365.815
Deviance         =  490327.6005                    (1/df) Deviance =  1365.815
Pearson          =  490327.6005                    (1/df) Pearson  =  1365.815

Variance function: V(u) =  1                       [Gaussian]
Link function    : g(u) =  u                       [Identity]

                                                   AIC             =  10.06564
Log likelihood   = -1818.880199                    BIC             =  488212.5

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew1 |    4.422493    3.546316      1.25    0.212     -2.528159     11.37315
       illw1 |    -9.71121    3.920388     -2.48    0.013     -17.39503     -2.02739
       _cons |    56.98053    2.359945     24.14    0.000      52.35513     61.60594
-------------+----------------------------------------------------------------

. glm hp2vactn radhlw1 illw1 avgcumdosew1 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  300.2452
Iteration 2:   deviance =  295.4656
Iteration 3:   deviance =  295.3193
Iteration 4:   deviance =   295.319
Iteration 5:   deviance =   295.319

Generalized linear models                          No. of obs      =       362
Optimization     : MQL Fisher scoring              Residual df     =       358
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  295.3190068                    (1/df) Deviance =  .8249134
Pearson          =  359.0506546                    (1/df) Pearson  =  1.002935

Variance function: V(u) =  u*(1-u)                 [Bernoulli]
Link function    : g(u) =  invnorm(u)              [Probit]

                                                   BIC             =  -1813.89

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw1 |     .014364    .0022973      6.25    0.000      .0098614     .0188667
       illw1 |    .2268401     .147174      1.54    0.123     -.0616157     .5152959
avgcumdosew1 |    .1252934    .1239292      1.01    0.312     -.1176035     .3681902
       _cons |   -1.970546    .1907882    -10.33    0.000     -2.344484    -1.596608
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar SigDoseVactnMw1 = "no"

. scalar MainEffVactnMw1 = "age radhlw1 shjobw1 "

. scalar VactnMedMw1 = "age"

. scalar VactnMedFw1 = "age illw1 radhlw1"

. scalar SigDoseVactnMw1 = "no"

. scalar MainEffVactnMw1 = "age radhlw1"

. scalar VactnModMw1 = "none"

. scalar SigDoseVactnMw1 = "no"

. scalar MainEffVactnMw1 = "age radhlw1"

. scalar VactnModMw1 = "none"

. * Part 2 Nottingham subscales
. *  1: hp2work
. *  2: hp2hmcare
. *  3: hp2probsoc
. *  4: hp2pbfhm
. *  5: hp2sexlife
. *  6: hp2inthob
. *  7: hp2vacatn
.
. *xx summary of moderator effects for females:
.     * no signif main dose effect
.     * 3 signif main effects in main effect model
.     * 1 moderator: deaw1Xd1
. title4 "7. Summary Matrix construction of dose - vacatn plans impact"
-------------
7. Summary Matrix construction of dose - vacatn plans impact
-------------

.
.   matrix define  vactnMw1 = J(1,8, 0)

.         matrix define  vactnFw1 = J(1,8, 0)

. matrix colnames  vactnMw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

. matrix colnames  vactnFw1=  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix define  vactnMw1= (1, 2, 1, 1, 0, 2, 0, 1 )

.         matrix define  vactnFw1= (1, 2, 1, 2, 0, 3, 0, 3 )

.         matrix rowname  vactnMw1 =  vactnM

.         matrix rowname  vactnFw1 =  vactnF

.         matlist  vactnMw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
vactnM   |         1            2            1            1            0            2            0            1

.         matlist  vactnFw1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
vactnF   |         1            2            1            2            0            3            0            3

.         matrix define H1pt2w1 = (  wkMw1 \  wkFw1 \  hmcrMw1 \  hmcrFw1 \  spMw1 ///
>             \  spFw1 \ prbfamMw1 \ prbfamFw1 \ sxlifeMw1 \ sxlifeFw1 \ inthbMw1 \  inthbFw1 \  vactnMw1 \  vactnFw1 )

.
.         matlist H1pt2w1

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            1            1            2
r1   |         1            2            1            1            0            2            0            1
r1   |         1            2            1            2            0            2            0            2
spMw1   |         1            2            1            1            1            2            2            1
spFw1   |         1            2            1            2            0            5            0            2
prbfamMw1   |         1            2            1            1            0            2            0            0
prbfamFw1   |         1            2            1            2            0            3            0            2
sxlifeMw1   |         1            2            1            1            0            3            0            1
sxlifeFw1   |         1            2            1            2            0            4            0            5
inthbM   |         1            2            1            1            0            3            0            1
inthobF   |         1            2            1            2            0            3            0            4
vactnM   |         1            2            1            1            0            2            0            1
vactnF   |         1            2            1            2            0            3            0            3

.     matrix colnames H1pt2w1 =  hypnum ptnum wave gender medsig numMAsig numModsig numMed

.     matrix rownames H1pt2w1 =    wkMw1  wkFw1  hmcrMw1  hmcrFw1  socprbMw1  socprbFw1 prbfamhmMw1 prbfamhmFw1 sxlifeMw1 sxlifeFw1 inthbMw1  inthbFw1  vactnMw1  vacatnFw1

.     matlist H1pt2w1

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
wkMw1   |         1            2            1            1            0            2            0            1
wkFw1   |         1            2            1            2            0            1            1            2
hmcrMw1   |         1            2            1            1            0            2            0            1
hmcrFw1   |         1            2            1            2            0            2            0            2
socprbMw1   |         1            2            1            1            1            2            2            1
socprbFw1   |         1            2            1            2            0            5            0            2
prbfamhmMw1   |         1            2            1            1            0            2            0            0
prbfamhmFw1   |         1            2            1            2            0            3            0            2
sxlifeMw1   |         1            2            1            1            0            3            0            1
sxlifeFw1   |         1            2            1            2            0            4            0            5
inthbMw1   |         1            2            1            1            0            3            0            1
inthbFw1   |         1            2            1            2            0            3            0            4
vactnMw1   |         1            2            1            1            0            2            0            1
vacatnFw1   |         1            2            1            2            0            3            0            3

.   set more off

.     scalar list
MainEffVactnMw1 = age radhlw1
sxlifeMedMw1 = radhlw1
MainEffsxlifeFw1 = age bf4 bf4m
SigDoseSxlifeFw1 = no
MainEffhmcrFw1 = age
MainEffhmcrMw1 = age
hmcrMedFw1 = age bf4
hmcrMedMw1 = radhlw1
MainEffwkFw1 = age
MainEffwkMw1 = age
VactnMedFw1 = age illw1 radhlw1
VactnMedMw1 = age
VacatnModFw1 = none
MainEffVactnFw1 = age radhlw1 bf7m
SigDoseVactnFw1 = no
VactnModMw1 = none
inthobMedFw1 = age bf4 illw1 bf4m
inthobMedMw1 = age
 inthobMw1 = age
InthbModFw1 = none
MainEffInthbFw1 = age radhlw1 bf4
SigdoseInthbFw1 = no
InthbModMw1 = none
MainEffInthbMw1 = age radhlw1 shfamw1
SigDoseInthbMw1 = no
MainEffMw1 = radhlw1 bf4 bf40
sxlifeMedFw1 = age illw1 radhlw1 bf4 bf4m
SigDosesxlifeMw1 = no
MainEffsxlifeMw1 = age bf4 bf40
SigDosePrbfmhmMw1 = no
vactnModMw1 = none
SigDoseVactnMw1 = no
SxLifeModFw1 = no
sxlifeModFw1 = none
sxlifeModMw1 = none
MaineffhmcrMw1 = age bf4 bf40
SigDoseMEhmcrW1 = no
PrbfmhmMedFw1 = age bf4
PrbfmhmMedMw1 = age
MainEffPrbfmhmFw1 = age radhlw1 bf4
MainEffPrbfmhmMw1 = age bf4
PrbfmhmModFw1 = none
PrbfmhmModMw1 = none
SigDosePrbfmhmFw1 = no
SigDosePrbfhmMw1 = no
MainEffPrbfhmMw1 = age bf4
MainEffVactnMw2 = age radhlw2
sxlifeMedMw2 = age illw2
SigDoseSxlifeFw2 = no
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m
MainEffPrbsocMw2 = age radhlw2 shjobw2
MainEffhmcrFw2 = age
hmcrMedFw2 = age bf4
MainEffwkFw2 = age
MainEffwkMw2 = age
MainEffPrbsocMw1 = age bf4m
SigdoseMw1 = no
ProbsocMedFw1 = age bf4
ProbsocMedMw1 = radhlw1
ProbsocModFw1 = none
SigDoseProbsocMw1 = no
hmcrmedMw1 = radhlw1
hmcrmedFw1 = age b4 b40
SigdosehmcrFw1 = no
MainEffProbSocFw1 = age radhlw1 avgcumdosew1 shrelaw1 bf4
SigDoseProbsocFw1 = yes
PrbsocModMw1 = shjobw1Xd1 shrelaw1Xd1
 WkhmcrMw1 = age b4
  WkModFw1 = ageXd1
hmcareMedFw1 = age illw1
hmcareMedMw1 = age
SigDosehmcrFw1 = no
  wkMedMw1 = bf40
hmcrModFw1 = none
SigDoseHmcrFw1 = yes
  WkMedMw1 = bf40
hmcrModMw1 = none
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
VactnMedMw2 = age
inthobMedMw2 = age
 inthobMw2 = age
PrbfmhmModMw2 = none
MainEffProbSocFw2 = age radhlw2 avgcumdosew2 bf4
hmcrModMw2 = none
MainEffhmcrMw2 = age
  wkMedFw2 = age b4
  wkMedMw2 = age bf4
MainEffsxlifeMw2 = age bf4 bf40 shjobw2 shrelaw2 radhlw2
MainEffPrbfmhmMw2 = bf4 bf6 bf7
ProbsocMedFw2 = age bf4 radhlw2
hmcareMedFw2 = age bf4
 WkhmcrMw2 = age b4
MainEffhmcrw2 = age
hmcrModFw2 = none
SigDoseHmcrFw2 = yes
NumhmcrModMw2 = none
SigDosehmcrMw2 = no
SigdosehmcrFw2 = yes
hmcrMedMw2 = age ageXillw2
SigDosehmcrFw2 = no
MainEffhmcareMw2 = age
  WkMedMw2 = age ageXillw2
  wkMedFw3 = radhlw3 age ageXillw3 bf40 bf4m bf1
VactnMedFw2 = age illw2 radhlw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 bf7m
SigDoseVactnFw2 = no
VactnModMw2 = none
vactnModMw2 = none
SigDoseVactnMw2 = no
inthobMedFw2 = age bf4 illw2 bf4m
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
InthbModMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
MainEffMw2 = radhlw2 bf4 bf40
SigdoseMEinthob = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
SxLifeModFw2 = no
sxlifeModFw2 = none
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf4 bf6 bf7
ProbsocMedMw2 = age
ProbsocModFw2 = none
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
PrbsocModMw2 = none
SigdoseMw2 = none
hmcareMedMw2 = age
hmcareModFw2 = none
MainEffhmcarew2 = age
SigdoseHmcareFw2 = no
hmcareModMw2 = none
SigDoseHmcareMw2 = no
NameMedMw2 = age ageXillw2
 NumModMw2 = none
SigDosehmcareMw2 = no
SigDoseWKMw2 = no
  WkMedFw2 = age bf4
  WkModFw2 = none
  WKModMw2 = none
SigDoseWkMw2 = no
SigDoseWkFw2 = no
SigDoseFw2 = no
  wkModFw2 = none
  wkModMw2 = none
VactnMedFw3 = age illw3 radhlw3
VactnMedMw3 = age illw3
VacatnModFw3 = none
MainEffVactnFw3 = age radhlw3 deaw3
SigDoseVactnFw3 = no
vactnModMw3 = none
MainEffVactnMw3 = age bf7m radhlw3
SigDoseVactnMw3 = no
sxLifeMedFw3 = age bf4 bf4m
sxLifeMedMw3 = age illw3
InthbModFw3 = none
MainEffInthbFw3 = age radhlw3 bf4
SigdoseInthbFw3 = no
  InthbMw3 = none
MainEffInthbMw3 = age radhlw3 shfamw3
SigDoseInthbMw3 = no
sxlifeMedFw3 = age illw3 radhlw3 bf4 bf4m
sxlifeMedMw3 = age illw3
sxlifeModFw3 = none
MainEffsxlifeFw3 = age radhlw3 bf4 bf4m shrelaw3 shfamw3
SigDoseSxlifeFw3 = no
sxlifeModMw3 = none
SigDosesxlifeMw3 = no
MainEffsxlifeMw3 = age bf4 illw3 radhlw3
PrbfmhmMedFw3 = age bf4
PrbfmhmMedMw3 = age
PrbfmhmModFw3 = none
MainEffPrbfmhmFw3 = age bf4 bf40
SigDosePrbfmhmFw3 = no
PrbfmhmModw3 = none
SigDosePrbfmhmMw3 = no
SigDosePrbfhmMw3 = no
MainEffPrbfhmMw3 = bf1 bf4 dvcew3 bf7m
ProbsocMedFw3 = age radhlw3
ProbsocMedMw3 = age
ProbsocModFw3 = none
MainEffProbSocFw3 = age radhlw3 illw3 Shrelaw3 avgcumodsew3
SigDoseProbsocFw3 = yes
ProbSocModMw3 = none
SigDoseProbsocMw3 = no
MainEffPrbsocMw3 = age radhlw3 shjobw3
hmcareMedFw3 = age illw3
hmcareMedMw3 = age illw3
hmcareModFw3 = none
SigdoseHmcareFw3 = no
hmcareModMw3 = none
MainEffhmcareMw3 = none
SigDoseHmcareMw3 = no
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

. pwd
/Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2

. di c(filename)
chwide16june2012.dta

.
. sjlog close, replace