. set linesize 160

. 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
. ******
. di "$User"
Robert Alan Yaffee

. * 16 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
. *      We evaluate the model for statistical conguency.
. *   This concludes the test of part 1 of H1
. ***------------------------------------------------------------------------------------------------------------------
.
. * Part 2 Nottingham subscales
. *  1: hp2work
. *  2: hp2hmcare
. *  3: hp2probsoc
. *  4: hp2pbfhm
. *  5: hp2sexlife
. *  6: hp2inthob
. *  7: hp2vactn
.
.
. local dvwhole HP2work-HP2vacatn

. local dv2 HP2work HP2hmcare HP2probsoc HP2pbfhm HP2sxlife HP2inthob HP2vacatn

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

.
. title "Testing part 2 of hypothesis 1 for wave three"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****           Testing part 2 of hypothesis 1 for wave three             *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:40:27  *****
*******************************************************************************
*******************************************************************************


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

. use chwide13june2012, 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}"
-------------

.
. title "Chunk 1 Hyp 1:radiation dose and Nottingham Health profile subscales"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Chunk 1 Hyp 1:radiation dose and Nottingham Health profile subscales *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:40:28  *****
*******************************************************************************
*******************************************************************************


.
.
. //  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 3 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
.
. title " Hypothesis 1 part2 wave 3  H1: General models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****            Hypothesis 1 part2 wave 3  H1: General models            *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:40:28  *****
*******************************************************************************
*******************************************************************************


. forvalues j=3/3 {
  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 HP2work HP2hmcare HP2probsoc HP2pbfhm HP2sxlife HP2inthob ///
>       HP2vacatn  {
  5.       forvalues k=1/2 {
  6. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  7.
. di as input "Full main model for `var' for wave= `j' "
  8. di _skip(4)
  9. di as input  "chunk 2 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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 HP2work for wave= 3

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

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
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: occ6w3 != 0 predicts failure perfectly
      occ6w3 dropped and 4 obs not used

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

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity

Logistic regression                               Number of obs   =        325
                                                  LR chi2(48)     =     107.62
                                                  Prob > chi2     =     0.0000
Log likelihood = -115.51874                       Pseudo R2       =     0.3178

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0398855    .0274181      1.45    0.146     -.0138531     .0936241
    _Ieduc_2 |    1.063444     .984496      1.08    0.280     -.8661327     2.993021
    _Ieduc_3 |    .0594211    .4628201      0.13    0.898     -.8476896     .9665319
    _Ieduc_4 |   -.6292279    1.199379     -0.52    0.600     -2.979968     1.721512
    _Ieduc_5 |   -.0324117    .5603466     -0.06    0.954     -1.130671     1.065848
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -16.21183    2056.545     -0.01    0.994     -4046.966     4014.542
      occ2w3 |    -15.9512    2056.545     -0.01    0.994     -4046.705     4014.803
      occ3w3 |   -16.80618    2056.545     -0.01    0.993     -4047.561     4013.948
      occ4w3 |   -15.08231    2056.545     -0.01    0.994     -4045.836     4015.672
      occ5w3 |   -15.97511    2056.545     -0.01    0.994      -4046.73     4014.779
      occ6w3 |           0   (omitted)
      occ7w3 |   -15.17432    2056.545     -0.01    0.994     -4045.928      4015.58
      occ8w3 |           0   (omitted)
     marrw31 |    1.816033    1.097265      1.66    0.098     -.3345671     3.966633
     marrw32 |    .0757168    1.330041      0.06    0.955     -2.531115     2.682549
     marrw33 |   -.7164591    1.109884     -0.65    0.519     -2.891791     1.458873
     marrw35 |    .9690805    1.275825      0.76    0.448      -1.53149     3.469651
     marrw36 |           0   (omitted)
      inc1w3 |    16.44823    2056.545      0.01    0.994     -4014.306     4047.202
      inc2w3 |    16.79255    2056.545      0.01    0.993     -4013.961     4047.546
      inc3w3 |    16.28275    2056.545      0.01    0.994     -4014.471     4047.037
      inc4w3 |    16.19339    2056.545      0.01    0.994     -4014.561     4046.948
     radhlw3 |    .0018951    .0075342      0.25    0.801     -.0128717     .0166619
      havmil |   -.0003047    .0050542     -0.06    0.952     -.0102109     .0096014
avgcumdosew3 |    .0388524    .0643134      0.60    0.546     -.0871996     .1649043
         bf1 |   -.1090167    .0689067     -1.58    0.114     -.2440713      .026038
         bf4 |   -.1845645    .1878566     -0.98    0.326     -.5527567     .1836277
         bf2 |    .0001393    .0001535      0.91    0.364     -.0001616     .0004401
        bf4m |   -.0184667    .1657846     -0.11    0.911     -.3433984     .3064651
        bf5m |    .0009023    .0015537      0.58    0.561     -.0021429     .0039475
        bf7m |    .0008163    .0004923      1.66    0.097     -.0001485     .0017811
         bf8 |   -.0001145    .0000456     -2.51    0.012      -.000204    -.0000251
       bf15m |    .0001838    .0002744      0.67    0.503      -.000354     .0007216
        bf17 |           0   (omitted)
        bf20 |    .0923153    .0637829      1.45    0.148     -.0326969     .2173275
        bf22 |    .0000533    .0001499      0.36    0.722     -.0002405     .0003471
        bf29 |    .0000161    .0000149      1.08    0.282     -.0000132     .0000453
        bf30 |   -.0004903    .0003941     -1.24    0.214     -.0012627     .0002822
        bf40 |    .0752527    .2023106      0.37    0.710     -.3212688     .4717743
       deaw3 |   -.1202184    .2295198     -0.52    0.600      -.570069     .3296321
      dvcew3 |   -.0534217     1.08605     -0.05    0.961      -2.18204     2.075197
      sepaw3 |   -.3670246    1.185339     -0.31    0.757     -2.690246     1.956196
      accdw3 |    -.058659    .5773335     -0.10    0.919     -1.190212     1.072894
      movew3 |   -.5628223    .5250647     -1.07    0.284      -1.59193     .4662856
       illw3 |    .6145655    .2492311      2.47    0.014      .1260816     1.103049
     shfamw3 |   -.0028773    .0074782     -0.38    0.700     -.0175343     .0117797
      shhlw3 |   -.0003705    .0066844     -0.06    0.956     -.0134717     .0127307
     shjobw3 |    .0119897    .0066255      1.81    0.070     -.0009961     .0249755
    shrelaw3 |   -.0011615    .0067798     -0.17    0.864     -.0144496     .0121266
     suprtw3 |    .0138766    .0081512      1.70    0.089     -.0020993     .0298526
     suchrw3 |   -.0097666    .0065695     -1.49    0.137     -.0226425     .0031093
    havmilsq |    7.20e-07    7.22e-06      0.10    0.921     -.0000134     .0000149
       _cons |   -6.713085    3.586597     -1.87    0.061     -13.74269     .3165157
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        30            15  |         45
     -     |        40           240  |        280
-----------+--------------------------+-----------
   Total   |        70           255  |        325

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   42.86%
Specificity                     Pr( -|~D)   94.12%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   85.71%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.88%
False - rate for true D         Pr( -| D)   57.14%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)   14.29%
--------------------------------------------------
Correctly classified                        83.08%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       325
 number of covariate patterns =       325
            Pearson chi2(276) =       298.51
                  Prob > chi2 =         0.1682

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -169.326     Log-Lik Full Model:         -115.519
D(269):                      231.037     LR(48):                      107.615
                                         Prob > LR:                     0.000
McFadden's R2:                 0.318     McFadden's Adj R2:            -0.013
Maximum Likelihood R2:         0.282     Cragg & Uhler's R2:            0.436
McKelvey and Zavoina's R2:     0.713     Efron's R2:                    0.332
Variance of y*:               11.462     Variance of error:             3.290
Count R2:                      0.831     Adj Count R2:                  0.214
AIC:                           1.055     AIC*n:                       343.037
BIC:                       -1324.811     BIC':                        170.008
Full main model for HP2work for wave= 3

chunk 2 H1 test:Gender= 2  model Wave =  3 for HP2work

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

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

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        345
                                                  LR chi2(50)     =     106.32
                                                  Prob > chi2     =     0.0000
Log likelihood = -147.91609                       Pseudo R2       =     0.2644

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0539741    .0202532      2.66    0.008      .0142786     .0936696
    _Ieduc_2 |   -12.55341    623.5872     -0.02    0.984     -1234.762     1209.655
    _Ieduc_3 |   -13.54577    623.5871     -0.02    0.983     -1235.754     1208.662
    _Ieduc_4 |   -12.04583    623.5872     -0.02    0.985     -1234.254     1210.163
    _Ieduc_5 |    -13.6714    623.5873     -0.02    0.983      -1235.88     1208.537
    _Ieduc_6 |    -13.3439    623.5871     -0.02    0.983     -1235.552     1208.864
    _Ieduc_7 |   -14.44833    623.5903     -0.02    0.982     -1236.663     1207.766
    _Ieduc_8 |           0   (omitted)
      occ1w3 |    .1126048    1.869311      0.06    0.952     -3.551177     3.776386
      occ2w3 |    .1300177     1.92152      0.07    0.946     -3.636092     3.896127
      occ3w3 |    .4109427     1.89228      0.22    0.828     -3.297858     4.119743
      occ4w3 |    -.168581    2.072728     -0.08    0.935     -4.231054     3.893892
      occ5w3 |    1.045375    2.389172      0.44    0.662     -3.637316     5.728065
      occ6w3 |           0   (omitted)
      occ7w3 |   -.3503943    1.867461     -0.19    0.851      -4.01055     3.309761
      occ8w3 |           0   (omitted)
     marrw31 |    -.807006    1.451843     -0.56    0.578     -3.652566     2.038554
     marrw32 |   -.3908773    1.745393     -0.22    0.823     -3.811785     3.030031
     marrw33 |   -.3675069    1.295392     -0.28    0.777     -2.906429     2.171415
     marrw35 |   -.1977292    1.318807     -0.15    0.881     -2.782543     2.387085
     marrw36 |    .7011152    1.329741      0.53    0.598      -1.90513      3.30736
      inc1w3 |    .9742727       1.913      0.51    0.611     -2.775139     4.723684
      inc2w3 |    .8770803    1.873885      0.47    0.640     -2.795667     4.549827
      inc3w3 |    .6085909    1.869674      0.33    0.745     -3.055903     4.273085
      inc4w3 |   -.7888601    2.462315     -0.32    0.749     -5.614908     4.037188
     radhlw3 |    .0045205    .0073058      0.62    0.536     -.0097986     .0188397
      havmil |   -.0009271    .0024979     -0.37    0.711     -.0058229     .0039686
avgcumdosew3 |     .115088    .0796177      1.45    0.148     -.0409598     .2711358
         bf1 |    .0054828    .0325747      0.17    0.866     -.0583624      .069328
         bf4 |   -.7222893     .236357     -3.06    0.002      -1.18554    -.2590382
         bf2 |   -.0000397    .0001011     -0.39    0.694     -.0002378     .0001584
        bf4m |    .5355567    .2180534      2.46    0.014      .1081798     .9629336
        bf5m |    .0021761    .0013897      1.57    0.117     -.0005476     .0048998
        bf7m |    .0008931    .0005154      1.73    0.083     -.0001171     .0019033
         bf8 |    -.000022    .0000319     -0.69    0.491     -.0000845     .0000406
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0052234    .0270949     -0.19    0.847     -.0583285     .0478817
        bf22 |   -.0001469    .0001125     -1.31    0.192     -.0003673     .0000736
        bf29 |    .0000122    .0000367      0.33    0.740     -.0000598     .0000841
        bf30 |    .0000264    .0002891      0.09    0.927     -.0005402      .000593
        bf40 |    .2842481    .1315066      2.16    0.031      .0264999     .5419962
       deaw3 |    .0612074    .1656786      0.37    0.712     -.2635167     .3859315
      dvcew3 |   -.3890334     .779063     -0.50    0.618     -1.915969     1.137902
      sepaw3 |    1.192013    .8154298      1.46    0.144     -.4062002     2.790226
      accdw3 |    .0577299    .4605728      0.13    0.900     -.8449761     .9604359
      movew3 |   -1.554315    1.416782     -1.10    0.273     -4.331156     1.222526
       illw3 |   -.2170464    .1492827     -1.45    0.146     -.5096352     .0755424
     shfamw3 |    -.006443    .0065281     -0.99    0.324     -.0192379     .0063519
      shhlw3 |    .0069987      .00596      1.17    0.240     -.0046826     .0186801
     shjobw3 |     .002409    .0061202      0.39    0.694     -.0095863     .0144043
    shrelaw3 |   -.0078238    .0063566     -1.23    0.218     -.0202824     .0046348
     suprtw3 |    .0085376    .0067506      1.26    0.206     -.0046933     .0217685
     suchrw3 |    -.007482    .0046136     -1.62    0.105     -.0165246     .0015606
    havmilsq |   -3.28e-09    1.73e-06     -0.00    0.998     -3.39e-06     3.38e-06
       _cons |    4.903623    623.5943      0.01    0.994     -1217.319     1227.126
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        45            24  |         69
     -     |        48           228  |        276
-----------+--------------------------+-----------
   Total   |        93           252  |        345

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   48.39%
Specificity                     Pr( -|~D)   90.48%
Positive predictive value       Pr( D| +)   65.22%
Negative predictive value       Pr(~D| -)   82.61%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    9.52%
False - rate for true D         Pr( -| D)   51.61%
False + rate for classified +   Pr(~D| +)   34.78%
False - rate for classified -   Pr( D| -)   17.39%
--------------------------------------------------
Correctly classified                        79.13%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       345
 number of covariate patterns =       345
            Pearson chi2(294) =       317.37
                  Prob > chi2 =         0.1668

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -201.075     Log-Lik Full Model:         -147.916
D(289):                      295.832     LR(50):                      106.318
                                         Prob > LR:                     0.000
McFadden's R2:                 0.264     McFadden's Adj R2:            -0.014
Maximum Likelihood R2:         0.265     Cragg & Uhler's R2:            0.385
McKelvey and Zavoina's R2:     0.488     Efron's R2:                    0.291
Variance of y*:                6.432     Variance of error:             3.290
Count R2:                      0.791     Adj Count R2:                  0.226
AIC:                           1.182     AIC*n:                       407.832
BIC:                       -1392.952     BIC':                        185.860
Full main model for HP2hmcare for wave= 3

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

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

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

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

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

note: _Ieduc_7 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity

Logistic regression                               Number of obs   =        315
                                                  LR chi2(48)     =     139.93
                                                  Prob > chi2     =     0.0000
Log likelihood = -96.893664                       Pseudo R2       =     0.4193

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0323974    .0293162      1.11    0.269     -.0250612      .089856
    _Ieduc_2 |   -4.152531    2.287775     -1.82    0.070     -8.636488     .3314257
    _Ieduc_3 |   -1.864493    1.608696     -1.16    0.246     -5.017479     1.288493
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -1.404302     1.64491     -0.85    0.393     -4.628265     1.819662
    _Ieduc_6 |   -2.017048     1.54335     -1.31    0.191     -5.041958     1.007861
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -11.82929    1296.263     -0.01    0.993     -2552.458     2528.799
      occ2w3 |   -11.65702    1296.263     -0.01    0.993     -2552.286     2528.971
      occ3w3 |   -12.78325    1296.263     -0.01    0.992     -2553.412     2527.846
      occ4w3 |   -10.84152    1296.263     -0.01    0.993      -2551.47     2529.787
      occ5w3 |   -10.72665    1296.263     -0.01    0.993     -2551.356     2529.903
      occ6w3 |           0   (omitted)
      occ7w3 |   -11.31316    1296.263     -0.01    0.993     -2551.942     2529.316
      occ8w3 |           0   (omitted)
     marrw31 |    .3643704    1.429352      0.25    0.799     -2.437107     3.165848
     marrw32 |   -2.206121    1.844343     -1.20    0.232     -5.820966     1.408725
     marrw33 |   -.7934545    1.390519     -0.57    0.568     -3.518821     1.931912
     marrw35 |   -.2775718    1.556356     -0.18    0.858     -3.327973     2.772829
     marrw36 |           0   (omitted)
      inc1w3 |    14.70395    1296.262      0.01    0.991     -2525.924     2555.332
      inc2w3 |    14.77269    1296.262      0.01    0.991     -2525.855       2555.4
      inc3w3 |    14.57764    1296.262      0.01    0.991      -2526.05     2555.205
      inc4w3 |    15.74154    1296.263      0.01    0.990     -2524.886      2556.37
     radhlw3 |    .0078686    .0080582      0.98    0.329      -.007925     .0236623
      havmil |    .0027954    .0078952      0.35    0.723     -.0126789     .0182698
avgcumdosew3 |    .0057068    .0769937      0.07    0.941     -.1451981     .1566117
         bf1 |   -.0445389    .0484618     -0.92    0.358     -.1395224     .0504446
         bf4 |   -.0327423    .2796012     -0.12    0.907     -.5807506      .515266
         bf2 |    .0000822    .0001677      0.49    0.624     -.0002465     .0004108
        bf4m |    -.341802    .2609957     -1.31    0.190     -.8533441     .1697402
        bf5m |    .0012439    .0017995      0.69    0.489     -.0022831     .0047709
        bf7m |    .0005614    .0005422      1.04    0.300     -.0005013     .0016241
         bf8 |   -.0000499    .0000448     -1.11    0.265     -.0001376     .0000379
       bf15m |   -.0000712    .0003918     -0.18    0.856     -.0008391     .0006966
        bf17 |           0   (omitted)
        bf20 |     .019063    .0407736      0.47    0.640     -.0608518     .0989778
        bf22 |    .0000146    .0001733      0.08    0.933     -.0003251     .0003543
        bf29 |    .0000124    .0000229      0.54    0.589     -.0000325     .0000572
        bf30 |    -.000416    .0004185     -0.99    0.320     -.0012364     .0004043
        bf40 |    .1486565    .2411791      0.62    0.538     -.3240459     .6213588
       deaw3 |   -.6566764    .3112091     -2.11    0.035     -1.266635    -.0467177
      dvcew3 |    .7731044    1.122755      0.69    0.491     -1.427455     2.973664
      sepaw3 |    .1659839    1.359372      0.12    0.903     -2.498337     2.830305
      accdw3 |    .7493757    .6472786      1.16    0.247      -.519267     2.018018
      movew3 |    .9688514    .5333557      1.82    0.069     -.0765066     2.014209
       illw3 |    .2806377    .2813528      1.00    0.319     -.2708037      .832079
     shfamw3 |    .0045809    .0088802      0.52    0.606     -.0128239     .0219857
      shhlw3 |   -.0144819       .0077     -1.88    0.060     -.0295736     .0006098
     shjobw3 |   -.0101653    .0077745     -1.31    0.191     -.0254031     .0050725
    shrelaw3 |   -.0092584    .0083742     -1.11    0.269     -.0256716     .0071547
     suprtw3 |   -.0009401    .0080071     -0.12    0.907     -.0166337     .0147535
     suchrw3 |    -.004683    .0069496     -0.67    0.500     -.0183041      .008938
    havmilsq |   -7.50e-06    .0000145     -0.52    0.604     -.0000359     .0000209
       _cons |    3.229911    4.235709      0.76    0.446     -5.071927     11.53175
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        37            14  |         51
     -     |        33           231  |        264
-----------+--------------------------+-----------
   Total   |        70           245  |        315

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   52.86%
Specificity                     Pr( -|~D)   94.29%
Positive predictive value       Pr( D| +)   72.55%
Negative predictive value       Pr(~D| -)   87.50%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.71%
False - rate for true D         Pr( -| D)   47.14%
False + rate for classified +   Pr(~D| +)   27.45%
False - rate for classified -   Pr( D| -)   12.50%
--------------------------------------------------
Correctly classified                        85.08%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       315
 number of covariate patterns =       315
            Pearson chi2(266) =       247.97
                  Prob > chi2 =         0.7796

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -166.857     Log-Lik Full Model:          -96.894
D(259):                      193.787     LR(48):                      139.928
                                         Prob > LR:                     0.000
McFadden's R2:                 0.419     McFadden's Adj R2:             0.084
Maximum Likelihood R2:         0.359     Cragg & Uhler's R2:            0.549
McKelvey and Zavoina's R2:     0.758     Efron's R2:                    0.437
Variance of y*:               13.609     Variance of error:             3.290
Count R2:                      0.851     Adj Count R2:                  0.329
AIC:                           0.971     AIC*n:                       305.787
BIC:                       -1296.129     BIC':                        136.196
Full main model for HP2hmcare for wave= 3

chunk 2 H1 test:Gender= 2  model Wave =  3 for HP2hmcare

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

note: bf29 != 0 predicts success perfectly
      bf29 dropped and 4 obs not used

note: _Ieduc_8 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        353
                                                  LR chi2(50)     =     144.83
                                                  Prob > chi2     =     0.0000
Log likelihood = -154.51255                       Pseudo R2       =     0.3191

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0784129    .0199184      3.94    0.000      .0393735     .1174522
    _Ieduc_2 |   -16.15888     2.72009     -5.94    0.000     -21.49016     -10.8276
    _Ieduc_3 |   -16.70929    2.647033     -6.31    0.000     -21.89738     -11.5212
    _Ieduc_4 |   -15.65931    2.672964     -5.86    0.000     -20.89823     -10.4204
    _Ieduc_5 |   -16.93546    2.621945     -6.46    0.000     -22.07438    -11.79654
    _Ieduc_6 |   -17.12993    2.678622     -6.40    0.000     -22.37993    -11.87993
    _Ieduc_7 |    -16.6826    3.290952     -5.07    0.000     -23.13274    -10.23245
    _Ieduc_8 |           0   (omitted)
      occ1w3 |    -17.5089    2870.034     -0.01    0.995     -5642.673     5607.655
      occ2w3 |   -17.42465    2870.034     -0.01    0.995     -5642.589     5607.739
      occ3w3 |   -17.38618    2870.034     -0.01    0.995      -5642.55     5607.778
      occ4w3 |   -17.97919    2870.035     -0.01    0.995     -5643.144     5607.185
      occ5w3 |   -16.19886    2870.035     -0.01    0.995     -5641.365     5608.967
      occ6w3 |           0   (omitted)
      occ7w3 |   -17.37679    2870.034     -0.01    0.995     -5642.541     5607.787
      occ8w3 |           0   (omitted)
     marrw31 |    .1254457    1.662878      0.08    0.940     -3.133735     3.384627
     marrw32 |     .689276     1.96339      0.35    0.726     -3.158897     4.537449
     marrw33 |    1.411752    1.537008      0.92    0.358     -1.600728     4.424232
     marrw35 |    .6824445    1.564972      0.44    0.663     -2.384844     3.749733
     marrw36 |    .9604788    1.548632      0.62    0.535     -2.074784     3.995742
      inc1w3 |    18.76205    2870.034      0.01    0.995     -5606.402     5643.926
      inc2w3 |    18.64464    2870.034      0.01    0.995     -5606.519     5643.809
      inc3w3 |    18.13548    2870.034      0.01    0.995     -5607.029       5643.3
      inc4w3 |    18.63139    2870.035      0.01    0.995     -5606.533     5643.796
     radhlw3 |   -.0056373    .0071331     -0.79    0.429     -.0196178     .0083433
      havmil |    .0003358    .0026887      0.12    0.901      -.004934     .0056056
avgcumdosew3 |   -.1458758    .0962788     -1.52    0.130     -.3345788     .0428272
         bf1 |   -.0155334    .0271811     -0.57    0.568     -.0688074     .0377407
         bf4 |   -.4865728    .1784134     -2.73    0.006     -.8362568    -.1368889
         bf2 |    .0000926    .0001019      0.91    0.364     -.0001072     .0002923
        bf4m |    .3213367    .1603015      2.00    0.045      .0071515      .635522
        bf5m |    -.000883    .0014167     -0.62    0.533     -.0036598     .0018937
        bf7m |    .0002998     .000443      0.68    0.499     -.0005684      .001168
         bf8 |    6.84e-06    .0000322      0.21    0.832     -.0000563       .00007
       bf15m |   -.0163741    .5454805     -0.03    0.976     -1.085496     1.052748
        bf17 |    .0008202     .027274      0.03    0.976     -.0526359     .0542763
        bf20 |      .00093    .0215397      0.04    0.966      -.041287      .043147
        bf22 |   -.0000872    .0001081     -0.81    0.420     -.0002991     .0001247
        bf29 |           0   (omitted)
        bf30 |    .0000251    .0002916      0.09    0.931     -.0005465     .0005967
        bf40 |    .1300079    .1227916      1.06    0.290     -.1106593     .3706751
       deaw3 |    .0165155    .1614822      0.10    0.919     -.2999837     .3330147
      dvcew3 |    .6982802    .7163028      0.97    0.330     -.7056474     2.102208
      sepaw3 |   -.4992309    .8307882     -0.60    0.548     -2.127546     1.129084
      accdw3 |   -.1706856    .4639657     -0.37    0.713     -1.080042     .7386705
      movew3 |   -.4464406    1.157043     -0.39    0.700     -2.714203     1.821322
       illw3 |   -.0890834    .1513588     -0.59    0.556     -.3857412     .2075743
     shfamw3 |   -.0035626    .0062149     -0.57    0.566     -.0157435     .0086183
      shhlw3 |    .0080043    .0056769      1.41    0.159     -.0031221     .0191308
     shjobw3 |   -.0042351    .0058007     -0.73    0.465     -.0156043     .0071341
    shrelaw3 |   -.0103149    .0062344     -1.65    0.098      -.022534     .0019042
     suprtw3 |   -.0017061    .0061593     -0.28    0.782     -.0137782      .010366
     suchrw3 |   -.0030007    .0044692     -0.67    0.502     -.0117602     .0057587
    havmilsq |   -1.55e-06    2.58e-06     -0.60    0.549     -6.61e-06     3.52e-06
       _cons |    10.07155           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        76            29  |        105
     -     |        45           203  |        248
-----------+--------------------------+-----------
   Total   |       121           232  |        353

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   62.81%
Specificity                     Pr( -|~D)   87.50%
Positive predictive value       Pr( D| +)   72.38%
Negative predictive value       Pr(~D| -)   81.85%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   12.50%
False - rate for true D         Pr( -| D)   37.19%
False + rate for classified +   Pr(~D| +)   27.62%
False - rate for classified -   Pr( D| -)   18.15%
--------------------------------------------------
Correctly classified                        79.04%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       353
 number of covariate patterns =       353
            Pearson chi2(301) =       338.41
                  Prob > chi2 =         0.0677

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -226.929     Log-Lik Full Model:         -154.513
D(297):                      309.025     LR(50):                      144.834
                                         Prob > LR:                     0.000
McFadden's R2:                 0.319     McFadden's Adj R2:             0.072
Maximum Likelihood R2:         0.337     Cragg & Uhler's R2:            0.465
McKelvey and Zavoina's R2:     0.954     Efron's R2:                    0.369
Variance of y*:               71.431     Variance of error:             3.290
Count R2:                      0.790     Adj Count R2:                  0.388
AIC:                           1.193     AIC*n:                       421.025
BIC:                       -1433.316     BIC':                        148.490
Full main model for HP2probsoc for wave= 3

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

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 14 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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 15 obs not used

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

note: marrw32 != 0 predicts failure perfectly
      marrw32 dropped and 20 obs not used

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

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        266
                                                  LR chi2(44)     =     125.89
                                                  Prob > chi2     =     0.0000
Log likelihood =  -51.38371                       Pseudo R2       =     0.5506

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1094616    .0479486      2.28    0.022       .015484     .2034392
    _Ieduc_2 |    .7414425    1.297886      0.57    0.568     -1.802367     3.285252
    _Ieduc_3 |   -1.614771    .8291042     -1.95    0.051     -3.239785     .0102435
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -1.309884    1.008415     -1.30    0.194     -3.286342     .6665737
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -14.19493    1124.783     -0.01    0.990     -2218.729     2190.339
      occ2w3 |   -12.80013    1124.783     -0.01    0.991     -2217.335     2191.734
      occ3w3 |   -14.84881    1124.785     -0.01    0.989     -2219.387     2189.689
      occ4w3 |   -13.35572    1124.784     -0.01    0.991     -2217.891      2191.18
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -14.19043    1124.784     -0.01    0.990     -2218.726     2190.345
      occ8w3 |           0   (omitted)
     marrw31 |    3.074981    1.891094      1.63    0.104     -.6314958     6.781458
     marrw32 |           0   (omitted)
     marrw33 |    1.087086    1.851071      0.59    0.557     -2.540947     4.715119
     marrw35 |    2.144183    1.926965      1.11    0.266     -1.632599     5.920964
     marrw36 |           0   (omitted)
      inc1w3 |    12.66541    1124.784      0.01    0.991      -2191.87     2217.201
      inc2w3 |    14.23621    1124.783      0.01    0.990     -2190.299     2218.771
      inc3w3 |    11.68224    1124.783      0.01    0.992     -2192.853     2216.217
      inc4w3 |    13.15717    1124.785      0.01    0.991     -2191.381     2217.695
     radhlw3 |    .0116102     .013936      0.83    0.405     -.0157038     .0389242
      havmil |     .010259    .0190025      0.54    0.589     -.0269853     .0475032
avgcumdosew3 |     .013934    .0740721      0.19    0.851     -.1312447     .1591127
         bf1 |    .0049612    .0648373      0.08    0.939     -.1221176     .1320399
         bf4 |    .3309901    .3608169      0.92    0.359      -.376198     1.038178
         bf2 |    .0003753    .0003121      1.20    0.229     -.0002364      .000987
        bf4m |   -.7073564    .3457629     -2.05    0.041     -1.385039    -.0296735
        bf5m |    .0055743    .0030295      1.84    0.066     -.0003633     .0115119
        bf7m |    .0005904     .001055      0.56    0.576     -.0014774     .0026582
         bf8 |   -.0001253    .0000745     -1.68    0.093     -.0002713     .0000207
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0283325    .0488173     -0.58    0.562     -.1240127     .0673477
        bf22 |     .000352    .0002932      1.20    0.230     -.0002227     .0009267
        bf29 |   -.0000333    .0000588     -0.57    0.572     -.0001486      .000082
        bf30 |   -.0013785    .0007131     -1.93    0.053     -.0027761     .0000191
        bf40 |   -.3600239    .3692219     -0.98    0.330     -1.083686     .3636377
       deaw3 |   -.5217994    .4891348     -1.07    0.286     -1.480486     .4368872
      dvcew3 |   -.5047921    1.728469     -0.29    0.770     -3.892529     2.882945
      sepaw3 |    1.877558    1.625412      1.16    0.248     -1.308191     5.063307
      accdw3 |   -1.417017    1.419234     -1.00    0.318     -4.198664     1.364631
      movew3 |   -1.057894    1.576256     -0.67    0.502       -4.1473     2.031511
       illw3 |    .0330976    .3751226      0.09    0.930     -.7021292     .7683243
     shfamw3 |     .012083    .0115403      1.05    0.295     -.0105354     .0347015
      shhlw3 |   -.0165557    .0125582     -1.32    0.187     -.0411693     .0080578
     shjobw3 |     .032774    .0134379      2.44    0.015      .0064363     .0591118
    shrelaw3 |   -.0108059    .0117883     -0.92    0.359     -.0339106     .0122988
     suprtw3 |    -.014138    .0155065     -0.91    0.362     -.0445303     .0162542
     suchrw3 |    .0131393    .0111977      1.17    0.241     -.0088078     .0350865
    havmilsq |    -.000014    .0000386     -0.36    0.717     -.0000896     .0000616
       _cons |    .4495347    5.049973      0.09    0.929      -9.44823      10.3473
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        27             5  |         32
     -     |        14           220  |        234
-----------+--------------------------+-----------
   Total   |        41           225  |        266

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   65.85%
Specificity                     Pr( -|~D)   97.78%
Positive predictive value       Pr( D| +)   84.38%
Negative predictive value       Pr(~D| -)   94.02%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.22%
False - rate for true D         Pr( -| D)   34.15%
False + rate for classified +   Pr(~D| +)   15.62%
False - rate for classified -   Pr( D| -)    5.98%
--------------------------------------------------
Correctly classified                        92.86%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       266
 number of covariate patterns =       266
            Pearson chi2(221) =       138.28
                  Prob > chi2 =         1.0000

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -114.331     Log-Lik Full Model:          -51.384
D(210):                      102.767     LR(44):                      125.895
                                         Prob > LR:                     0.000
McFadden's R2:                 0.551     McFadden's Adj R2:             0.061
Maximum Likelihood R2:         0.377     Cragg & Uhler's R2:            0.654
McKelvey and Zavoina's R2:     0.833     Efron's R2:                    0.549
Variance of y*:               19.713     Variance of error:             3.290
Count R2:                      0.929     Adj Count R2:                  0.537
AIC:                           0.807     AIC*n:                       214.767
BIC:                       -1069.767     BIC':                        119.779
Full main model for HP2probsoc for wave= 3

chunk 2 H1 test:Gender= 2  model Wave =  3 for HP2probsoc

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

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

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

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

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        333
                                                  LR chi2(48)     =     182.65
                                                  Prob > chi2     =     0.0000
Log likelihood = -85.065495                       Pseudo R2       =     0.5177

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1095324    .0321452      3.41    0.001      .0465289     .1725358
    _Ieduc_2 |   -13.53237    1231.492     -0.01    0.991     -2427.212     2400.147
    _Ieduc_3 |   -13.52493    1231.492     -0.01    0.991     -2427.204     2400.154
    _Ieduc_4 |   -12.60239    1231.492     -0.01    0.992     -2426.282     2401.077
    _Ieduc_5 |   -12.71374    1231.492     -0.01    0.992     -2426.393     2400.966
    _Ieduc_6 |   -14.01871    1231.492     -0.01    0.991     -2427.698      2399.66
    _Ieduc_7 |   -14.42024    1231.563     -0.01    0.991     -2428.239     2399.398
    _Ieduc_8 |           0   (omitted)
      occ1w3 |    -1.43031    4.480321     -0.32    0.750     -10.21158     7.350959
      occ2w3 |   -.9422793     4.54239     -0.21    0.836       -9.8452     7.960641
      occ3w3 |   -.9893619    4.495549     -0.22    0.826     -9.800476     7.821752
      occ4w3 |           0   (omitted)
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -.3813499    4.479039     -0.09    0.932     -9.160105     8.397405
      occ8w3 |           0   (omitted)
     marrw31 |   -1.356413    4.804963     -0.28    0.778     -10.77397     8.061141
     marrw32 |    1.424321    4.907376      0.29    0.772     -8.193959      11.0426
     marrw33 |    .9014745    4.669929      0.19    0.847     -8.251419     10.05437
     marrw35 |    .1665893    4.645112      0.04    0.971     -8.937664     9.270842
     marrw36 |    .3174753    4.648882      0.07    0.946     -8.794166     9.429116
      inc1w3 |    .8600896    4.513897      0.19    0.849     -7.986987     9.707166
      inc2w3 |    1.384829    4.490321      0.31    0.758     -7.416038      10.1857
      inc3w3 |    .4792744    4.482989      0.11    0.915     -8.307222      9.26577
      inc4w3 |    2.266942    4.835774      0.47    0.639        -7.211     11.74488
     radhlw3 |    .0131788    .0108242      1.22    0.223     -.0080363     .0343939
      havmil |    .0001731    .0072695      0.02    0.981     -.0140748      .014421
avgcumdosew3 |    .4373021    .1594734      2.74    0.006        .12474     .7498642
         bf1 |    .0565003    .0423978      1.33    0.183     -.0265978     .1395985
         bf4 |   -.5202783    .2238014     -2.32    0.020     -.9589209    -.0816356
         bf2 |    .0000421    .0001478      0.28    0.776     -.0002477     .0003318
        bf4m |    .2426577    .1977977      1.23    0.220     -.1450185      .630334
        bf5m |   -.0017451    .0026768     -0.65    0.514     -.0069915     .0035013
        bf7m |    .0007865    .0007919      0.99    0.321     -.0007656     .0023387
         bf8 |    .0000207    .0000544      0.38    0.704      -.000086     .0001273
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0669294    .0330398     -2.03    0.043     -.1316862    -.0021726
        bf22 |   -.0000944    .0001823     -0.52    0.605     -.0004517     .0002629
        bf29 |   -.0000309     .000047     -0.66    0.511     -.0001229     .0000611
        bf30 |    .0003246    .0004246      0.76    0.445     -.0005076     .0011567
        bf40 |    .0606979    .1844629      0.33    0.742     -.3008427     .4222385
       deaw3 |    .1696097    .2295421      0.74    0.460     -.2802844     .6195039
      dvcew3 |    .3810548    1.285314      0.30    0.767     -2.138115     2.900224
      sepaw3 |   -2.876602    1.529689     -1.88    0.060     -5.874737     .1215322
      accdw3 |    .1226563     .714668      0.17    0.864     -1.278067      1.52338
      movew3 |    1.918652    1.360681      1.41    0.159     -.7482334     4.585538
       illw3 |    .2671943    .2045213      1.31    0.191     -.1336601     .6680487
     shfamw3 |   -.0003116    .0095404     -0.03    0.974     -.0190104     .0183873
      shhlw3 |   -.0026048    .0074647     -0.35    0.727     -.0172353     .0120256
     shjobw3 |     .006075    .0086284      0.70    0.481     -.0108364     .0229864
    shrelaw3 |   -.0267274     .010033     -2.66    0.008     -.0463918     -.007063
     suprtw3 |   -.0065983    .0100162     -0.66    0.510     -.0262297     .0130331
     suchrw3 |    .0015649    .0064519      0.24    0.808     -.0110806     .0142105
    havmilsq |   -3.19e-06    .0000124     -0.26    0.797     -.0000275     .0000211
       _cons |    6.986764    1231.505      0.01    0.995     -2406.718     2420.692
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        54            13  |         67
     -     |        20           246  |        266
-----------+--------------------------+-----------
   Total   |        74           259  |        333

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   72.97%
Specificity                     Pr( -|~D)   94.98%
Positive predictive value       Pr( D| +)   80.60%
Negative predictive value       Pr(~D| -)   92.48%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.02%
False - rate for true D         Pr( -| D)   27.03%
False + rate for classified +   Pr(~D| +)   19.40%
False - rate for classified -   Pr( D| -)    7.52%
--------------------------------------------------
Correctly classified                        90.09%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       333
 number of covariate patterns =       333
            Pearson chi2(284) =       335.12
                  Prob > chi2 =         0.0199

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -176.392     Log-Lik Full Model:          -85.065
D(277):                      170.131     LR(48):                      182.653
                                         Prob > LR:                     0.000
McFadden's R2:                 0.518     McFadden's Adj R2:             0.200
Maximum Likelihood R2:         0.422     Cragg & Uhler's R2:            0.646
McKelvey and Zavoina's R2:     0.810     Efron's R2:                    0.561
Variance of y*:               17.273     Variance of error:             3.290
Count R2:                      0.901     Adj Count R2:                  0.554
AIC:                           0.847     AIC*n:                       282.131
BIC:                       -1438.724     BIC':                         96.138
Full main model for HP2pbfhm for wave= 3

chunk 2 H1 test:Gender= 1  model Wave =  3 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 14 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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 13 obs not used

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 6 obs not used

note: movew3 != 0 predicts failure perfectly
      movew3 dropped and 22 obs not used

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        248
                                                  LR chi2(42)     =      61.10
                                                  Prob > chi2     =     0.0286
Log likelihood = -43.736999                       Pseudo R2       =     0.4112

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0762859    .0508028      1.50    0.133     -.0232857     .1758575
    _Ieduc_2 |           0   (omitted)
    _Ieduc_3 |   -.1477637    .8109786     -0.18    0.855     -1.737253     1.441725
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.7596947    1.090598     -0.70    0.486     -2.897227     1.377837
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -10.90364    2018.344     -0.01    0.996     -3966.785     3944.977
      occ2w3 |   -10.89538    2018.344     -0.01    0.996     -3966.777     3944.986
      occ3w3 |   -9.963313    2018.344     -0.00    0.996     -3965.846     3945.919
      occ4w3 |    -10.3499    2018.344     -0.01    0.996     -3966.232     3945.532
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -10.56369    2018.344     -0.01    0.996     -3966.445     3945.318
      occ8w3 |           0   (omitted)
     marrw31 |    1.938945    1.834088      1.06    0.290     -1.655802     5.533692
     marrw32 |    2.869349     2.03424      1.41    0.158     -1.117687     6.856385
     marrw33 |   -2.070881    2.007923     -1.03    0.302     -6.006338     1.864576
     marrw35 |    3.548252    2.186549      1.62    0.105     -.7373048     7.833809
     marrw36 |           0   (omitted)
      inc1w3 |    12.37597    2018.344      0.01    0.995     -3943.505     3968.257
      inc2w3 |    12.75723    2018.343      0.01    0.995     -3943.123     3968.637
      inc3w3 |    11.01982    2018.344      0.01    0.996     -3944.861       3966.9
      inc4w3 |      11.952    2018.345      0.01    0.995     -3943.931     3967.835
     radhlw3 |     .032589    .0182947      1.78    0.075     -.0032679     .0684459
      havmil |    .0129536     .013774      0.94    0.347     -.0140429     .0399501
avgcumdosew3 |   -.3791136    .3273992     -1.16    0.247     -1.020804     .2625771
         bf1 |   -.1029605    .0825755     -1.25    0.212     -.2648056     .0588846
         bf4 |   -.1906164    .3464978     -0.55    0.582     -.8697396     .4885069
         bf2 |    .0004772    .0003548      1.35    0.179     -.0002181     .0011725
        bf4m |    .0772469    .2972932      0.26    0.795      -.505437     .6599308
        bf5m |   -.0019382    .0047879     -0.40    0.686     -.0113224      .007446
        bf7m |    .0012129     .001013      1.20    0.231     -.0007725     .0031983
         bf8 |   -3.27e-06    .0000957     -0.03    0.973     -.0001909     .0001843
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0430617    .0653802      0.66    0.510     -.0850811     .1712045
        bf22 |   -4.46e-06    .0002995     -0.01    0.988     -.0005915     .0005826
        bf29 |           0   (omitted)
        bf30 |     .000126    .0007197      0.18    0.861     -.0012845     .0015365
        bf40 |     .071783    .4795976      0.15    0.881     -.8682111     1.011777
       deaw3 |    .3272315    .4280065      0.76    0.445     -.5116458     1.166109
      dvcew3 |    1.631036    1.568401      1.04    0.298     -1.442973     4.705045
      sepaw3 |    .2595898    1.605075      0.16    0.872     -2.886299     3.405479
      accdw3 |   -.9114258    2.076173     -0.44    0.661     -4.980649     3.157798
      movew3 |           0   (omitted)
       illw3 |   -.5480408    .5150453     -1.06    0.287     -1.557511     .4614294
     shfamw3 |    .0143257    .0164517      0.87    0.384      -.017919     .0465703
      shhlw3 |   -.0109085    .0129224     -0.84    0.399     -.0362359      .014419
     shjobw3 |   -.0129256    .0143995     -0.90    0.369     -.0411481     .0152969
    shrelaw3 |   -.0047884     .012683     -0.38    0.706     -.0296466     .0200697
     suprtw3 |     .025454    .0177967      1.43    0.153     -.0094269     .0603349
     suchrw3 |    .0037567    .0120299      0.31    0.755     -.0198214     .0273349
    havmilsq |   -.0000259    .0000249     -1.04    0.299     -.0000746     .0000229
       _cons |   -12.84498    6.147159     -2.09    0.037     -24.89319      -.79677
-------------+----------------------------------------------------------------


Note: 5 failures and 0 successes completely determined.


Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         9             4  |         13
     -     |        13           222  |        235
-----------+--------------------------+-----------
   Total   |        22           226  |        248

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   40.91%
Specificity                     Pr( -|~D)   98.23%
Positive predictive value       Pr( D| +)   69.23%
Negative predictive value       Pr(~D| -)   94.47%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.77%
False - rate for true D         Pr( -| D)   59.09%
False + rate for classified +   Pr(~D| +)   30.77%
False - rate for classified -   Pr( D| -)    5.53%
--------------------------------------------------
Correctly classified                        93.15%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       248
 number of covariate patterns =       248
            Pearson chi2(205) =       151.48
                  Prob > chi2 =         0.9980

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:      -74.286     Log-Lik Full Model:          -43.737
D(192):                       87.474     LR(42):                       61.099
                                         Prob > LR:                     0.029
McFadden's R2:                 0.411     McFadden's Adj R2:            -0.343
Maximum Likelihood R2:         0.218     Cragg & Uhler's R2:            0.485
McKelvey and Zavoina's R2:     0.816     Efron's R2:                    0.329
Variance of y*:               17.878     Variance of error:             3.290
Count R2:                      0.931     Adj Count R2:                  0.227
AIC:                           0.804     AIC*n:                       199.474
BIC:                        -971.104     BIC':                        170.465
Full main model for HP2pbfhm for wave= 3

chunk 2 H1 test:Gender= 2  model Wave =  3 for HP2pbfhm

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

note: occ4w3 != 0 predicts failure perfectly
      occ4w3 dropped and 8 obs not used

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

note: marrw32 != 0 predicts failure perfectly
      marrw32 dropped and 7 obs not used

note: inc4w3 != 0 predicts failure perfectly
      inc4w3 dropped and 8 obs not used

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

note: movew3 != 0 predicts failure perfectly
      movew3 dropped and 9 obs not used

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        277
                                                  LR chi2(45)     =      88.17
                                                  Prob > chi2     =     0.0001
Log likelihood =  -80.45257                       Pseudo R2       =     0.3540

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0605232    .0301499      2.01    0.045      .0014305     .1196159
    _Ieduc_2 |    14.33097     3050.48      0.00    0.996       -5964.5     5993.162
    _Ieduc_3 |    14.57814     3050.48      0.00    0.996     -5964.253     5993.409
    _Ieduc_4 |    14.71229     3050.48      0.00    0.996     -5964.119     5993.543
    _Ieduc_5 |    14.46503     3050.48      0.00    0.996     -5964.366     5993.296
    _Ieduc_6 |    14.13284     3050.48      0.00    0.996     -5964.698     5992.964
    _Ieduc_7 |    16.45371    3050.482      0.01    0.996     -5962.382     5995.289
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -.9142061    3.466224     -0.26    0.792      -7.70788     5.879468
      occ2w3 |           0   (omitted)
      occ3w3 |   -.2867411    3.495557     -0.08    0.935     -7.137908     6.564426
      occ4w3 |           0   (omitted)
      occ5w3 |    2.578209     4.53518      0.57    0.570     -6.310581       11.467
      occ6w3 |           0   (omitted)
      occ7w3 |   -.5244179     3.46458     -0.15    0.880      -7.31487     6.266034
      occ8w3 |           0   (omitted)
     marrw31 |    13.57521    900.6841      0.02    0.988     -1751.733     1778.884
     marrw32 |           0   (omitted)
     marrw33 |     15.5368    900.6835      0.02    0.986      -1749.77     1780.844
     marrw35 |    15.43053    900.6834      0.02    0.986     -1749.877     1780.738
     marrw36 |    15.00571    900.6833      0.02    0.987     -1750.301     1780.313
      inc1w3 |    2.006505    3.516446      0.57    0.568     -4.885601     8.898612
      inc2w3 |    2.111761    3.483985      0.61    0.544     -4.716724     8.940246
      inc3w3 |    1.911831    3.463507      0.55    0.581     -4.876519      8.70018
      inc4w3 |           0   (omitted)
     radhlw3 |    .0113673    .0123354      0.92    0.357     -.0128096     .0355442
      havmil |   -.0010166    .0142076     -0.07    0.943     -.0288629     .0268297
avgcumdosew3 |   -.0338506    .1440343     -0.24    0.814     -.3161526     .2484513
         bf1 |   -.0040962    .0453653     -0.09    0.928     -.0930105     .0848181
         bf4 |   -.3790747    .2483688     -1.53    0.127     -.8658686     .1077192
         bf2 |    .0000525    .0001469      0.36    0.721     -.0002354     .0003404
        bf4m |    .1263528    .2275811      0.56    0.579     -.3196979     .5724036
        bf5m |   -.0049342    .0041169     -1.20    0.231     -.0130031     .0031348
        bf7m |   -.0004133    .0008454     -0.49    0.625     -.0020703     .0012437
         bf8 |    .0001156    .0000755      1.53    0.125     -.0000323     .0002635
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0078983    .0366468     -0.22    0.829     -.0797248     .0639282
        bf22 |     .000158    .0001863      0.85    0.396     -.0002071     .0005231
        bf29 |    9.34e-06    .0000425      0.22    0.826      -.000074     .0000927
        bf30 |   -.0000869    .0004483     -0.19    0.846     -.0009655     .0007917
        bf40 |   -.2779981    .1983152     -1.40    0.161     -.6666887     .1106924
       deaw3 |   -.0223131    .2253092     -0.10    0.921     -.4639109     .4192848
      dvcew3 |    1.571998    1.037736      1.51    0.130     -.4619271     3.605923
      sepaw3 |   -1.894764    1.527486     -1.24    0.215     -4.888582     1.099055
      accdw3 |   -.2729555    .6926052     -0.39    0.694     -1.630437     1.084526
      movew3 |           0   (omitted)
       illw3 |   -.1949663    .2468671     -0.79    0.430     -.6788169     .2888842
     shfamw3 |   -.0082258    .0094908     -0.87    0.386     -.0268274     .0103758
      shhlw3 |    .0062899    .0080613      0.78    0.435       -.00951     .0220898
     shjobw3 |   -.0009012    .0093159     -0.10    0.923     -.0191601     .0173576
    shrelaw3 |   -.0126452    .0092607     -1.37    0.172     -.0307958     .0055054
     suprtw3 |    -.004099    .0105306     -0.39    0.697     -.0247385     .0165405
     suchrw3 |   -.0078922    .0065901     -1.20    0.231     -.0208085     .0050241
    havmilsq |   -4.43e-06     .000039     -0.11    0.909     -.0000808      .000072
       _cons |   -32.88256    3180.672     -0.01    0.992     -6266.884     6201.119
-------------+----------------------------------------------------------------


Note: 5 failures and 0 successes completely determined.


Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        22             9  |         31
     -     |        24           222  |        246
-----------+--------------------------+-----------
   Total   |        46           231  |        277

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   47.83%
Specificity                     Pr( -|~D)   96.10%
Positive predictive value       Pr( D| +)   70.97%
Negative predictive value       Pr(~D| -)   90.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.90%
False - rate for true D         Pr( -| D)   52.17%
False + rate for classified +   Pr(~D| +)   29.03%
False - rate for classified -   Pr( D| -)    9.76%
--------------------------------------------------
Correctly classified                        88.09%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       277
 number of covariate patterns =       277
            Pearson chi2(231) =       439.38
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:     -124.537     Log-Lik Full Model:          -80.453
D(221):                      160.905     LR(45):                       88.169
                                         Prob > LR:                     0.000
McFadden's R2:                 0.354     McFadden's Adj R2:            -0.096
Maximum Likelihood R2:         0.273     Cragg & Uhler's R2:            0.460
McKelvey and Zavoina's R2:     0.796     Efron's R2:                    0.384
Variance of y*:               16.128     Variance of error:             3.290
Count R2:                      0.881     Adj Count R2:                  0.283
AIC:                           0.985     AIC*n:                       272.905
BIC:                       -1082.003     BIC':                        164.912
Full main model for HP2sxlife for wave= 3

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

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

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 8 obs not used

note: _Ieduc_8 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        304
                                                  LR chi2(47)     =     153.48
                                                  Prob > chi2     =     0.0000
Log likelihood = -86.082561                       Pseudo R2       =     0.4713

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1069256    .0319906      3.34    0.001      .0442252      .169626
    _Ieduc_2 |   -.7455102    2.711615     -0.27    0.783     -6.060177     4.569157
    _Ieduc_3 |   -1.187035     2.60622     -0.46    0.649     -6.295133     3.921063
    _Ieduc_4 |   -2.546669    2.819292     -0.90    0.366     -8.072379     2.979041
    _Ieduc_5 |   -.9083698    2.596245     -0.35    0.726     -5.996916     4.180177
    _Ieduc_6 |    -.821989     2.54798     -0.32    0.747     -5.815938      4.17196
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -13.83588    1847.337     -0.01    0.994     -3634.551     3606.879
      occ2w3 |    -14.1177    1847.337     -0.01    0.994     -3634.833     3606.597
      occ3w3 |   -15.12911    1847.338     -0.01    0.993     -3635.845     3605.586
      occ4w3 |   -14.04877    1847.338     -0.01    0.994     -3634.764     3606.666
      occ5w3 |   -13.39243    1847.338     -0.01    0.994     -3634.108     3607.323
      occ6w3 |           0   (omitted)
      occ7w3 |   -14.25779    1847.337     -0.01    0.994     -3634.973     3606.457
      occ8w3 |           0   (omitted)
     marrw31 |    1.917986    1.336919      1.43    0.151     -.7023282     4.538299
     marrw32 |   -.8798595    1.841469     -0.48    0.633     -4.489073     2.729354
     marrw33 |    .8814069    1.275273      0.69    0.489     -1.618082     3.380896
     marrw35 |    1.398611    1.615954      0.87    0.387     -1.768602     4.565823
     marrw36 |           0   (omitted)
      inc1w3 |    16.59262    1847.337      0.01    0.993     -3604.122     3637.307
      inc2w3 |    16.41393    1847.337      0.01    0.993       -3604.3     3637.128
      inc3w3 |     14.9931    1847.337      0.01    0.994     -3605.721     3635.708
      inc4w3 |    13.76529    1847.339      0.01    0.994     -3606.952     3634.482
     radhlw3 |    .0155883    .0090158      1.73    0.084     -.0020824     .0332591
      havmil |    .0032884    .0119659      0.27    0.783     -.0201643     .0267412
avgcumdosew3 |    .0366781    .0541231      0.68    0.498     -.0694012     .1427574
         bf1 |    .0224773    .0438725      0.51    0.608     -.0635113      .108466
         bf4 |   -.3119601    .2453847     -1.27    0.204     -.7929052      .168985
         bf2 |    .0000786    .0001745      0.45    0.652     -.0002634     .0004207
        bf4m |    .0103662    .2174828      0.05    0.962     -.4158923     .4366247
        bf5m |    .0028825    .0019867      1.45    0.147     -.0010113     .0067763
        bf7m |    .0013372    .0006507      2.05    0.040      .0000618     .0026126
         bf8 |   -.0000698    .0000479     -1.46    0.145     -.0001638     .0000241
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0288329    .0347084     -0.83    0.406       -.09686     .0391943
        bf22 |   -.0000907    .0001888     -0.48    0.631     -.0004608     .0002793
        bf29 |           0   (omitted)
        bf30 |   -5.44e-06    .0004196     -0.01    0.990     -.0008279     .0008171
        bf40 |    .3549975    .2522025      1.41    0.159     -.1393104     .8493054
       deaw3 |   -.1446966    .2515866     -0.58    0.565     -.6377974     .3484041
      dvcew3 |    .2312151    1.685819      0.14    0.891      -3.07293     3.535361
      sepaw3 |    1.563211    1.973158      0.79    0.428     -2.304108     5.430529
      accdw3 |   -1.029126    .9986452     -1.03    0.303     -2.986435     .9281827
      movew3 |   -.3161441    .7920977     -0.40    0.690     -1.868627     1.236339
       illw3 |    .2509498    .2730406      0.92    0.358     -.2841998     .7860995
     shfamw3 |   -.0049114    .0092237     -0.53    0.594     -.0229895     .0131668
      shhlw3 |   -.0135671    .0078785     -1.72    0.085     -.0290087     .0018746
     shjobw3 |    .0090088    .0079953      1.13    0.260     -.0066617     .0246793
    shrelaw3 |   -.0052844    .0083104     -0.64    0.525     -.0215726     .0110037
     suprtw3 |    .0083949    .0090554      0.93    0.354     -.0093533     .0261431
     suchrw3 |   -.0115343    .0079215     -1.46    0.145     -.0270603     .0039916
    havmilsq |   -.0000122    .0000253     -0.48    0.630     -.0000618     .0000374
       _cons |   -6.912277     3.93482     -1.76    0.079     -14.62438     .7998281
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        44            14  |         58
     -     |        25           221  |        246
-----------+--------------------------+-----------
   Total   |        69           235  |        304

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   63.77%
Specificity                     Pr( -|~D)   94.04%
Positive predictive value       Pr( D| +)   75.86%
Negative predictive value       Pr(~D| -)   89.84%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.96%
False - rate for true D         Pr( -| D)   36.23%
False + rate for classified +   Pr(~D| +)   24.14%
False - rate for classified -   Pr( D| -)   10.16%
--------------------------------------------------
Correctly classified                        87.17%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       304
 number of covariate patterns =       304
            Pearson chi2(256) =       202.32
                  Prob > chi2 =         0.9943

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -162.820     Log-Lik Full Model:          -86.083
D(248):                      172.165     LR(47):                      153.476
                                         Prob > LR:                     0.000
McFadden's R2:                 0.471     McFadden's Adj R2:             0.127
Maximum Likelihood R2:         0.396     Cragg & Uhler's R2:            0.603
McKelvey and Zavoina's R2:     0.800     Efron's R2:                    0.484
Variance of y*:               16.474     Variance of error:             3.290
Count R2:                      0.872     Adj Count R2:                  0.435
AIC:                           0.935     AIC*n:                       284.165
BIC:                       -1245.658     BIC':                        115.224
Full main model for HP2sxlife for wave= 3

chunk 2 H1 test:Gender= 2  model Wave =  3 for HP2sxlife

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

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

note: bf29 != 0 predicts success perfectly
      bf29 dropped and 4 obs not used

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        345
                                                  LR chi2(50)     =     168.03
                                                  Prob > chi2     =     0.0000
Log likelihood = -114.00457                       Pseudo R2       =     0.4243

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0813848    .0244496      3.33    0.001      .0334644     .1293053
    _Ieduc_2 |   -12.79022    653.1326     -0.02    0.984     -1292.907     1267.326
    _Ieduc_3 |   -11.94607    653.1326     -0.02    0.985     -1292.062      1268.17
    _Ieduc_4 |   -11.36768    653.1328     -0.02    0.986     -1291.484     1268.749
    _Ieduc_5 |   -12.54328    653.1327     -0.02    0.985      -1292.66     1267.573
    _Ieduc_6 |   -11.93918    653.1326     -0.02    0.985     -1292.055     1268.177
    _Ieduc_7 |   -12.87216    653.1524     -0.02    0.984     -1293.027     1267.283
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -2.703036     2.21975     -1.22    0.223     -7.053665     1.647593
      occ2w3 |   -2.165029    2.323461     -0.93    0.351     -6.718929     2.388871
      occ3w3 |   -2.030908    2.234964     -0.91    0.364     -6.411358     2.349542
      occ4w3 |   -1.625969    2.528132     -0.64    0.520     -6.581016     3.329078
      occ5w3 |    .7269315    2.820396      0.26    0.797     -4.800943     6.254806
      occ6w3 |   -.7633882    2.518786     -0.30    0.762     -5.700118     4.173342
      occ7w3 |   -1.433838    2.203631     -0.65    0.515     -5.752876       2.8852
      occ8w3 |           0   (omitted)
     marrw31 |    .3247443    1.774101      0.18    0.855     -3.152431     3.801919
     marrw32 |    .8501767    2.207491      0.39    0.700     -3.476427      5.17678
     marrw33 |    1.557872    1.575773      0.99    0.323     -1.530585     4.646329
     marrw35 |   -.4253418    1.619183     -0.26    0.793     -3.598882     2.748198
     marrw36 |    1.703593    1.601915      1.06    0.288     -1.436102     4.843288
      inc1w3 |    1.766812    2.253827      0.78    0.433     -2.650608     6.184231
      inc2w3 |    2.269344    2.224897      1.02    0.308     -2.091374     6.630061
      inc3w3 |    .9292343    2.201873      0.42    0.673     -3.386357     5.244826
      inc4w3 |    1.449624    2.775037      0.52    0.601     -3.989349     6.888597
     radhlw3 |    .0277216    .0091569      3.03    0.002      .0097745     .0456688
      havmil |    .0021336    .0032179      0.66    0.507     -.0041733     .0084405
avgcumdosew3 |    .1969924    .1165031      1.69    0.091     -.0313496     .4253343
         bf1 |    .0285984    .0382244      0.75    0.454       -.04632     .1035168
         bf4 |   -.4015139    .2038932     -1.97    0.049     -.8011373    -.0018905
         bf2 |   -.0001649    .0001225     -1.35    0.178     -.0004051     .0000753
        bf4m |    .3523301    .1864609      1.89    0.059     -.0131266     .7177867
        bf5m |   -.0026053     .001955     -1.33    0.183      -.006437     .0012264
        bf7m |   -.0000741    .0006237     -0.12    0.905     -.0012966     .0011483
         bf8 |   -5.22e-06    .0000423     -0.12    0.902     -.0000881     .0000777
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0120216     .031995     -0.38    0.707     -.0747307     .0506874
        bf22 |   -.0001004    .0001357     -0.74    0.459     -.0003664     .0001655
        bf29 |           0   (omitted)
        bf30 |   -.0002441    .0003438     -0.71    0.478     -.0009179     .0004298
        bf40 |     .095062    .1371931      0.69    0.488     -.1738314     .3639555
       deaw3 |    .0760781    .1918427      0.40    0.692     -.2999267     .4520829
      dvcew3 |    1.127371     .952705      1.18    0.237     -.7398962     2.994639
      sepaw3 |    .5833047     .936842      0.62    0.534     -1.252872     2.419481
      accdw3 |   -.5118992    .5859911     -0.87    0.382     -1.660421     .6366223
      movew3 |   -.6063637    1.823477     -0.33    0.739     -4.180313     2.967586
       illw3 |    .1168429    .1761008      0.66    0.507     -.2283082     .4619941
     shfamw3 |    .0084815     .007536      1.13    0.260     -.0062888     .0232518
      shhlw3 |    .0066923    .0066985      1.00    0.318     -.0064365     .0198212
     shjobw3 |   -.0046191    .0070704     -0.65    0.514     -.0184767     .0092386
    shrelaw3 |   -.0123617    .0074084     -1.67    0.095     -.0268819     .0021585
     suprtw3 |   -.0091554    .0078461     -1.17    0.243     -.0245335     .0062227
     suchrw3 |   -.0034248    .0055225     -0.62    0.535     -.0142486     .0073991
    havmilsq |   -2.54e-06    2.55e-06     -1.00    0.319     -7.52e-06     2.45e-06
       _cons |     1.83356    653.1407      0.00    0.998     -1278.299     1281.966
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        60            12  |         72
     -     |        30           243  |        273
-----------+--------------------------+-----------
   Total   |        90           255  |        345

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   66.67%
Specificity                     Pr( -|~D)   95.29%
Positive predictive value       Pr( D| +)   83.33%
Negative predictive value       Pr(~D| -)   89.01%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.71%
False - rate for true D         Pr( -| D)   33.33%
False + rate for classified +   Pr(~D| +)   16.67%
False - rate for classified -   Pr( D| -)   10.99%
--------------------------------------------------
Correctly classified                        87.83%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       345
 number of covariate patterns =       345
            Pearson chi2(294) =       343.22
                  Prob > chi2 =         0.0254

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -198.018     Log-Lik Full Model:         -114.005
D(289):                      228.009     LR(50):                      168.026
                                         Prob > LR:                     0.000
McFadden's R2:                 0.424     McFadden's Adj R2:             0.141
Maximum Likelihood R2:         0.386     Cragg & Uhler's R2:            0.565
McKelvey and Zavoina's R2:     0.693     Efron's R2:                    0.483
Variance of y*:               10.715     Variance of error:             3.290
Count R2:                      0.878     Adj Count R2:                  0.533
AIC:                           0.986     AIC*n:                       340.009
BIC:                       -1460.775     BIC':                        124.151
Full main model for HP2inthob for wave= 3

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

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 14 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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 15 obs not used

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 7 obs not used

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        276
                                                  LR chi2(42)     =     117.91
                                                  Prob > chi2     =     0.0000
Log likelihood = -51.649162                       Pseudo R2       =     0.5330

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0817005    .0490304      1.67    0.096     -.0143973     .1777983
    _Ieduc_2 |   -1.531634    1.790651     -0.86    0.392     -5.041245     1.977977
    _Ieduc_3 |   -1.560462    .8580328     -1.82    0.069     -3.242176     .1212509
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.5489735    .8124194     -0.68    0.499     -2.141286     1.043339
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -16.51737    1.787426     -9.24    0.000     -20.02066    -13.01407
      occ2w3 |   -19.33037    1.805963    -10.70    0.000        -22.87    -15.79075
      occ3w3 |   -17.45879           .         .        .             .            .
      occ4w3 |    -16.4147    1.784409     -9.20    0.000     -19.91207    -12.91732
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -16.18451      1.9014     -8.51    0.000     -19.91119    -12.45784
      occ8w3 |           0   (omitted)
     marrw31 |    .8557338    1.989445      0.43    0.667     -3.043506     4.754974
     marrw32 |    1.067638    2.133137      0.50    0.617     -3.113233     5.248509
     marrw33 |   -.0597495    1.809944     -0.03    0.974     -3.607174     3.487675
     marrw35 |    4.178796    2.178555      1.92    0.055     -.0910924     8.448685
     marrw36 |           0   (omitted)
      inc1w3 |    14.99624    2.448683      6.12    0.000      10.19691     19.79557
      inc2w3 |    15.54637      2.1702      7.16    0.000      11.29286     19.79989
      inc3w3 |    16.08957    2.238064      7.19    0.000      11.70305      20.4761
      inc4w3 |    20.06926    2.676679      7.50    0.000      14.82306     25.31545
     radhlw3 |    .0608448    .0162567      3.74    0.000      .0289822     .0927075
      havmil |     .004278    .0106932      0.40    0.689     -.0166802     .0252362
avgcumdosew3 |   -.3594081    .1656259     -2.17    0.030     -.6840289    -.0347874
         bf1 |   -1.832947    .1402107    -13.07    0.000     -2.107755    -1.558139
         bf4 |   -.1459909    .3386475     -0.43    0.666     -.8097278     .5177459
         bf2 |   -.0007134    .0002919     -2.44    0.015     -.0012855    -.0001412
        bf4m |   -.0648789    .3169386     -0.20    0.838     -.6860671     .5563094
        bf5m |   -.0059221    .0033107     -1.79    0.074     -.0124109     .0005667
        bf7m |     -.00068    .0010134     -0.67    0.502     -.0026661     .0013062
         bf8 |    .0000248    .0000707      0.35    0.726     -.0001137     .0001633
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    1.839452    .1331884     13.81    0.000      1.578408     2.100497
        bf22 |     .000278    .0003035      0.92    0.360     -.0003168     .0008728
        bf29 |           0   (omitted)
        bf30 |    .0006467     .000603      1.07    0.284     -.0005352     .0018286
        bf40 |    .2996032    .3950362      0.76    0.448     -.4746534      1.07386
       deaw3 |   -.6086987     .521237     -1.17    0.243     -1.630304      .412907
      dvcew3 |   -.2319255    1.621511     -0.14    0.886     -3.410029     2.946178
      sepaw3 |   -1.758194    2.087815     -0.84    0.400     -5.850235     2.333848
      accdw3 |    .9189185    1.049896      0.88    0.381     -1.138839     2.976676
      movew3 |   -1.391188    1.335043     -1.04    0.297     -4.007824     1.225448
       illw3 |   -.3817303    .3999312     -0.95    0.340     -1.165581     .4021205
     shfamw3 |    .0654585    .0176224      3.71    0.000      .0309192     .0999978
      shhlw3 |   -.0105181    .0103515     -1.02    0.310     -.0308067     .0097705
     shjobw3 |   -.0144707    .0115767     -1.25    0.211     -.0371606     .0082192
    shrelaw3 |   -.0392022    .0137786     -2.85    0.004     -.0662077    -.0121967
     suprtw3 |    .0070974    .0130297      0.54    0.586     -.0184403     .0326352
     suchrw3 |     -.00232    .0110986     -0.21    0.834     -.0240728     .0194327
    havmilsq |   -7.67e-06    .0000192     -0.40    0.690     -.0000453       .00003
       _cons |   -80.28913           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 32 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        23             7  |         30
     -     |        15           231  |        246
-----------+--------------------------+-----------
   Total   |        38           238  |        276

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   60.53%
Specificity                     Pr( -|~D)   97.06%
Positive predictive value       Pr( D| +)   76.67%
Negative predictive value       Pr(~D| -)   93.90%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.94%
False - rate for true D         Pr( -| D)   39.47%
False + rate for classified +   Pr(~D| +)   23.33%
False - rate for classified -   Pr( D| -)    6.10%
--------------------------------------------------
Correctly classified                        92.03%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       276
 number of covariate patterns =       276
            Pearson chi2(231) =       123.26
                  Prob > chi2 =         1.0000

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -110.602     Log-Lik Full Model:          -51.649
D(220):                      103.298     LR(42):                      117.906
                                         Prob > LR:                     0.000
McFadden's R2:                 0.533     McFadden's Adj R2:             0.027
Maximum Likelihood R2:         0.348     Cragg & Uhler's R2:            0.631
McKelvey and Zavoina's R2:     0.982     Efron's R2:                    0.500
Variance of y*:              180.636     Variance of error:             3.290
Count R2:                      0.920     Adj Count R2:                  0.421
AIC:                           0.780     AIC*n:                       215.298
BIC:                       -1133.190     BIC':                        118.151
Full main model for HP2inthob for wave= 3

chunk 2 H1 test:Gender= 2  model Wave =  3 for HP2inthob

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

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

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

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        337
                                                  LR chi2(49)     =     118.21
                                                  Prob > chi2     =     0.0000
Log likelihood = -107.57156                       Pseudo R2       =     0.3546

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0683881    .0247447      2.76    0.006      .0198893     .1168869
    _Ieduc_2 |   -13.79024    962.4068     -0.01    0.989     -1900.073     1872.492
    _Ieduc_3 |   -12.92792    962.4068     -0.01    0.989     -1899.211     1873.355
    _Ieduc_4 |   -12.05387    962.4069     -0.01    0.990     -1898.337     1874.229
    _Ieduc_5 |   -12.19345     962.407     -0.01    0.990     -1898.476      1874.09
    _Ieduc_6 |   -13.09489    962.4068     -0.01    0.989     -1899.378     1873.188
    _Ieduc_7 |    -13.1998    962.4102     -0.01    0.989     -1899.489      1873.09
    _Ieduc_8 |           0   (omitted)
      occ1w3 |     -1.2723    3.511631     -0.36    0.717     -8.154969      5.61037
      occ2w3 |   -2.590551    3.713618     -0.70    0.485     -9.869108     4.688006
      occ3w3 |   -.8635752    3.536644     -0.24    0.807      -7.79527      6.06812
      occ4w3 |           0   (omitted)
      occ5w3 |           0   (omitted)
      occ6w3 |   -.2036246    3.739879     -0.05    0.957     -7.533652     7.126403
      occ7w3 |   -.4066434     3.50728     -0.12    0.908     -7.280786     6.467499
      occ8w3 |           0   (omitted)
     marrw31 |   -2.820802    1.835568     -1.54    0.124     -6.418449      .776846
     marrw32 |    -2.10882    2.397053     -0.88    0.379     -6.806958     2.589318
     marrw33 |   -2.047151    1.625637     -1.26    0.208     -5.233341      1.13904
     marrw35 |   -2.933509    1.682447     -1.74    0.081     -6.231043     .3640262
     marrw36 |   -2.100943    1.718745     -1.22    0.222     -5.469621     1.267736
      inc1w3 |    1.771469    3.538577      0.50    0.617     -5.164014     8.706952
      inc2w3 |    1.229926     3.52319      0.35    0.727     -5.675399      8.13525
      inc3w3 |    1.602207    3.508288      0.46    0.648     -5.273911     8.478326
      inc4w3 |    2.650063    3.832399      0.69    0.489     -4.861301     10.16143
     radhlw3 |    .0254128     .010363      2.45    0.014      .0051018     .0457239
      havmil |    .0052121    .0043654      1.19    0.232      -.003344     .0137682
avgcumdosew3 |    .0592875    .0898505      0.66    0.509     -.1168163     .2353913
         bf1 |   -.0386178    .0465636     -0.83    0.407     -.1298807     .0526452
         bf4 |   -.3299735    .2318908     -1.42    0.155     -.7844712     .1245242
         bf2 |    5.14e-06    .0001261      0.04    0.967      -.000242     .0002523
        bf4m |      .24058    .2177227      1.10    0.269     -.1861487     .6673088
        bf5m |   -.0019924    .0019912     -1.00    0.317     -.0058951     .0019104
        bf7m |    -.000918    .0006896     -1.33    0.183     -.0022697     .0004336
         bf8 |    6.91e-06    .0000428      0.16    0.872     -.0000771     .0000909
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0290415    .0410365      0.71    0.479     -.0513885     .1094715
        bf22 |     .000145     .000139      1.04    0.297     -.0001275     .0004175
        bf29 |    .0000291    .0000389      0.75    0.455     -.0000472     .0001054
        bf30 |    .0005863    .0003477      1.69    0.092     -.0000953     .0012679
        bf40 |   -.1903404    .1540477     -1.24    0.217     -.4922683     .1115876
       deaw3 |   -.0727208     .201017     -0.36    0.718     -.4667069     .3212652
      dvcew3 |   -.3675995    .8921998     -0.41    0.680     -2.116279      1.38108
      sepaw3 |    1.146748    .9391994      1.22    0.222     -.6940491     2.987545
      accdw3 |   -.0400125    .5697822     -0.07    0.944     -1.156765      1.07674
      movew3 |    .1242816    1.400684      0.09    0.929     -2.621008     2.869572
       illw3 |    .0326786    .1772251      0.18    0.854     -.3146761     .3800333
     shfamw3 |   -.0089451    .0081686     -1.10    0.273     -.0249552     .0070651
      shhlw3 |   -.0019331    .0067351     -0.29    0.774     -.0151336     .0112673
     shjobw3 |    .0022608    .0074164      0.30    0.760      -.012275     .0167966
    shrelaw3 |    .0045217    .0078937      0.57    0.567     -.0109497     .0199931
     suprtw3 |   -.0034378    .0085075     -0.40    0.686     -.0201123     .0132366
     suchrw3 |   -.0106093    .0056039     -1.89    0.058     -.0215928     .0003741
    havmilsq |   -4.33e-06    6.65e-06     -0.65    0.515     -.0000174     8.70e-06
       _cons |    7.330327    962.4125      0.01    0.994     -1878.964     1893.624
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        33            12  |         45
     -     |        33           259  |        292
-----------+--------------------------+-----------
   Total   |        66           271  |        337

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   50.00%
Specificity                     Pr( -|~D)   95.57%
Positive predictive value       Pr( D| +)   73.33%
Negative predictive value       Pr(~D| -)   88.70%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.43%
False - rate for true D         Pr( -| D)   50.00%
False + rate for classified +   Pr(~D| +)   26.67%
False - rate for classified -   Pr( D| -)   11.30%
--------------------------------------------------
Correctly classified                        86.65%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       337
 number of covariate patterns =       337
            Pearson chi2(287) =       317.53
                  Prob > chi2 =         0.1040

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -166.677     Log-Lik Full Model:         -107.572
D(281):                      215.143     LR(49):                      118.210
                                         Prob > LR:                     0.000
McFadden's R2:                 0.355     McFadden's Adj R2:             0.019
Maximum Likelihood R2:         0.296     Cragg & Uhler's R2:            0.471
McKelvey and Zavoina's R2:     0.678     Efron's R2:                    0.373
Variance of y*:               10.209     Variance of error:             3.290
Count R2:                      0.866     Adj Count R2:                  0.318
AIC:                           0.971     AIC*n:                       327.143
BIC:                       -1420.300     BIC':                        166.974
Full main model for HP2vacatn for wave= 3

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

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 18 obs not used

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 7 obs not used

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        286
                                                  LR chi2(45)     =     130.35
                                                  Prob > chi2     =     0.0000
Log likelihood = -52.374274                       Pseudo R2       =     0.5544

-------------+----------------------------------------------------------------
    HP2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1141267    .0450696      2.53    0.011       .025792     .2024615
    _Ieduc_2 |    1.212945    1.630503      0.74    0.457     -1.982782     4.408672
    _Ieduc_3 |   -1.181748    .8345653     -1.42    0.157     -2.817465     .4539703
    _Ieduc_4 |   -.2703336    1.707405     -0.16    0.874     -3.616786     3.076119
    _Ieduc_5 |    .0781642     .821705      0.10    0.924     -1.532348     1.688676
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -13.38278    1622.421     -0.01    0.993      -3193.27     3166.504
      occ2w3 |   -12.82938    1622.421     -0.01    0.994     -3192.717     3167.058
      occ3w3 |   -12.16922    1622.422     -0.01    0.994     -3192.057     3167.719
      occ4w3 |   -9.847245    1622.421     -0.01    0.995     -3189.735      3170.04
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -10.21639    1622.421     -0.01    0.995     -3190.104     3169.671
      occ8w3 |           0   (omitted)
     marrw31 |    2.471663    1.877772      1.32    0.188     -1.208702     6.152028
     marrw32 |    3.882172    2.040109      1.90    0.057      -.116367     7.880711
     marrw33 |    .7861586    1.848468      0.43    0.671     -2.836772     4.409089
     marrw35 |    5.481699    2.097529      2.61    0.009      1.370617     9.592781
     marrw36 |           0   (omitted)
      inc1w3 |    12.51469    1622.421      0.01    0.994     -3167.373     3192.402
      inc2w3 |    14.55722    1622.421      0.01    0.993     -3165.329     3194.444
      inc3w3 |    14.35316    1622.421      0.01    0.993     -3165.533      3194.24
      inc4w3 |    15.92527    1622.422      0.01    0.992     -3163.963     3195.813
     radhlw3 |    .0197321    .0147075      1.34    0.180     -.0090941     .0485583
      havmil |    .0234742    .0160068      1.47    0.143     -.0078985      .054847
avgcumdosew3 |    .1032883    .1755565      0.59    0.556      -.240796     .4473726
         bf1 |   -.4769574    .3289335     -1.45    0.147     -1.121655     .1677405
         bf4 |   -.1442369    .2873042     -0.50    0.616     -.7073429     .4188691
         bf2 |    .0000186    .0002978      0.06    0.950     -.0005651     .0006023
        bf4m |   -.1956152    .2497206     -0.78    0.433     -.6850586     .2938281
        bf5m |   -.0071533    .0043294     -1.65    0.098     -.0156388     .0013321
        bf7m |    .0000185    .0010386      0.02    0.986     -.0020172     .0020542
         bf8 |   -.0000173    .0000922     -0.19    0.851     -.0001981     .0001635
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .4362509    .3222411      1.35    0.176     -.1953299     1.067832
        bf22 |    .0001349    .0003106      0.43    0.664     -.0004739     .0007437
        bf29 |           0   (omitted)
        bf30 |   -.0009931    .0006553     -1.52    0.130     -.0022775     .0002912
        bf40 |    .5185801    .3611964      1.44    0.151     -.1893518     1.226512
       deaw3 |    .2097501    .3135963      0.67    0.504     -.4048875     .8243876
      dvcew3 |    2.012022    1.543197      1.30    0.192     -1.012588     5.036632
      sepaw3 |   -2.054184    1.443349     -1.42    0.155     -4.883097     .7747288
      accdw3 |    .2022258     1.25899      0.16    0.872     -2.265349     2.669801
      movew3 |   -4.177869    1.807922     -2.31    0.021     -7.721331    -.6344073
       illw3 |   -.4549089    .4293751     -1.06    0.289     -1.296469     .3866508
     shfamw3 |    .0141549    .0145895      0.97    0.332     -.0144399     .0427498
      shhlw3 |     .004885     .011315      0.43    0.666     -.0172919     .0270619
     shjobw3 |   -.0003857    .0112584     -0.03    0.973     -.0224516     .0216803
    shrelaw3 |    -.008433    .0120996     -0.70    0.486     -.0321477     .0152817
     suprtw3 |    .0050194    .0152005      0.33    0.741     -.0247729     .0348118
     suchrw3 |   -.0175411    .0097951     -1.79    0.073     -.0367391     .0016569
    havmilsq |    -.000046    .0000341     -1.35    0.178     -.0001129     .0000209
       _cons |   -25.70032    13.82795     -1.86    0.063     -52.80261      1.40197
-------------+----------------------------------------------------------------


Note: 8 failures and 0 successes completely determined.


Logistic model for HP2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        24             6  |         30
     -     |        17           239  |        256
-----------+--------------------------+-----------
   Total   |        41           245  |        286

Classified + if predicted Pr(D) >= .5
True D defined as HP2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   58.54%
Specificity                     Pr( -|~D)   97.55%
Positive predictive value       Pr( D| +)   80.00%
Negative predictive value       Pr(~D| -)   93.36%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.45%
False - rate for true D         Pr( -| D)   41.46%
False + rate for classified +   Pr(~D| +)   20.00%
False - rate for classified -   Pr( D| -)    6.64%
--------------------------------------------------
Correctly classified                        91.96%
--------------------------------------------------


Logistic model for HP2vacatn, goodness-of-fit test


       number of observations =       286
 number of covariate patterns =       286
            Pearson chi2(240) =       528.62
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2vacatn

Log-Lik Intercept Only:     -117.549     Log-Lik Full Model:          -52.374
D(230):                      104.749     LR(45):                      130.349
                                         Prob > LR:                     0.000
McFadden's R2:                 0.554     McFadden's Adj R2:             0.078
Maximum Likelihood R2:         0.366     Cragg & Uhler's R2:            0.653
McKelvey and Zavoina's R2:     0.907     Efron's R2:                    0.558
Variance of y*:               35.214     Variance of error:             3.290
Count R2:                      0.920     Adj Count R2:                  0.439
AIC:                           0.758     AIC*n:                       216.749
BIC:                       -1196.130     BIC':                        124.170
Full main model for HP2vacatn for wave= 3

chunk 2 H1 test:Gender= 2  model Wave =  3 for HP2vacatn

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

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

note: marrw32 != 0 predicts failure perfectly
      marrw32 dropped and 8 obs not used

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

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        329
                                                  LR chi2(48)     =     107.68
                                                  Prob > chi2     =     0.0000
Log likelihood = -106.83646                       Pseudo R2       =     0.3351

-------------+----------------------------------------------------------------
    HP2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0746889      .02598      2.87    0.004      .0237689     .1256088
    _Ieduc_2 |   -16.28929    1372.198     -0.01    0.991     -2705.747     2673.169
    _Ieduc_3 |   -16.27345    1372.198     -0.01    0.991     -2705.731     2673.185
    _Ieduc_4 |   -13.92789    1372.198     -0.01    0.992     -2703.386      2675.53
    _Ieduc_5 |   -15.70958    1372.198     -0.01    0.991     -2705.168     2673.749
    _Ieduc_6 |   -15.75581    1372.198     -0.01    0.991     -2705.214     2673.702
    _Ieduc_7 |   -16.71287    1372.201     -0.01    0.990     -2706.178     2672.752
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -.9957645    2.610666     -0.38    0.703     -6.112575     4.121046
      occ2w3 |    .3619615     2.64581      0.14    0.891      -4.82373     5.547653
      occ3w3 |   -.2672451    2.620799     -0.10    0.919     -5.403917     4.869426
      occ4w3 |           0   (omitted)
      occ5w3 |           0   (omitted)
      occ6w3 |    .7685654    2.898646      0.27    0.791     -4.912676     6.449807
      occ7w3 |   -.2239682    2.598386     -0.09    0.931     -5.316711     4.868774
      occ8w3 |           0   (omitted)
     marrw31 |   -3.154883    1.936003     -1.63    0.103     -6.949379     .6396133
     marrw32 |           0   (omitted)
     marrw33 |   -1.629296    1.549774     -1.05    0.293     -4.666797     1.408206
     marrw35 |   -.9785838    1.561258     -0.63    0.531     -4.038593     2.081425
     marrw36 |   -.3736998    1.605068     -0.23    0.816     -3.519575     2.772176
      inc1w3 |    1.236811    2.644541      0.47    0.640     -3.946394     6.420017
      inc2w3 |    .3422181    2.612526      0.13    0.896     -4.778239     5.462675
      inc3w3 |     .477638    2.599192      0.18    0.854     -4.616684      5.57196
      inc4w3 |    .3174794    3.090064      0.10    0.918     -5.738935     6.373894
     radhlw3 |    .0219342    .0098316      2.23    0.026      .0026647     .0412037
      havmil |    .0027203    .0039816      0.68    0.494     -.0050834      .010524
avgcumdosew3 |    .1848178    .1050999      1.76    0.079     -.0211742     .3908099
         bf1 |   -.0115945     .040594     -0.29    0.775     -.0911573     .0679684
         bf4 |   -.0350483    .2076999     -0.17    0.866     -.4421326      .372036
         bf2 |    -.000079    .0001334     -0.59    0.554     -.0003406     .0001825
        bf4m |   -.0423071    .1886429     -0.22    0.823     -.4120403     .3274261
        bf5m |    .0008456    .0017602      0.48    0.631     -.0026043     .0042955
        bf7m |   -.0004985    .0006465     -0.77    0.441     -.0017657     .0007687
         bf8 |   -.0000606    .0000411     -1.48    0.140     -.0001411     .0000199
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0059388    .0344891      0.17    0.863     -.0616586     .0735362
        bf22 |     .000128    .0001403      0.91    0.362      -.000147     .0004031
        bf29 |    .0000416    .0000406      1.02    0.305      -.000038     .0001212
        bf30 |   -.0003884    .0003734     -1.04    0.298     -.0011201     .0003434
        bf40 |   -.1764055    .1673262     -1.05    0.292     -.5043588     .1515477
       deaw3 |    .3451488    .2008083      1.72    0.086     -.0484283     .7387259
      dvcew3 |   -.5492396    .9270299     -0.59    0.554     -2.366185     1.267706
      sepaw3 |    1.201095    .9159312      1.31    0.190     -.5940969     2.996287
      accdw3 |    .4787823    .5402897      0.89    0.376     -.5801659     1.537731
      movew3 |   -.0774101    1.282853     -0.06    0.952     -2.591756     2.436936
       illw3 |   -.2768508    .1854421     -1.49    0.135     -.6403106     .0866091
     shfamw3 |   -.0081517    .0081915     -1.00    0.320     -.0242067     .0079032
      shhlw3 |      .00718    .0069706      1.03    0.303     -.0064821     .0208421
     shjobw3 |   -.0010439    .0078157     -0.13    0.894     -.0163623     .0142745
    shrelaw3 |   -.0076648    .0080911     -0.95    0.343     -.0235231     .0081936
     suprtw3 |    .0076145    .0086776      0.88    0.380     -.0093932     .0246222
     suchrw3 |   -.0085201    .0055112     -1.55    0.122     -.0193219     .0022816
    havmilsq |   -2.61e-06    5.42e-06     -0.48    0.630     -.0000132     8.01e-06
       _cons |    12.03817    1372.201      0.01    0.993     -2677.427     2701.503
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        27            10  |         37
     -     |        36           256  |        292
-----------+--------------------------+-----------
   Total   |        63           266  |        329

Classified + if predicted Pr(D) >= .5
True D defined as HP2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   42.86%
Specificity                     Pr( -|~D)   96.24%
Positive predictive value       Pr( D| +)   72.97%
Negative predictive value       Pr(~D| -)   87.67%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.76%
False - rate for true D         Pr( -| D)   57.14%
False + rate for classified +   Pr(~D| +)   27.03%
False - rate for classified -   Pr( D| -)   12.33%
--------------------------------------------------
Correctly classified                        86.02%
--------------------------------------------------


Logistic model for HP2vacatn, goodness-of-fit test


       number of observations =       329
 number of covariate patterns =       329
            Pearson chi2(280) =       296.45
                  Prob > chi2 =         0.2388

Measures of Fit for logistic of HP2vacatn

Log-Lik Intercept Only:     -160.675     Log-Lik Full Model:         -106.836
D(273):                      213.673     LR(48):                      107.678
                                         Prob > LR:                     0.000
McFadden's R2:                 0.335     McFadden's Adj R2:            -0.013
Maximum Likelihood R2:         0.279     Cragg & Uhler's R2:            0.448
McKelvey and Zavoina's R2:     0.632     Efron's R2:                    0.351
Variance of y*:                8.945     Variance of error:             3.290
Count R2:                      0.860     Adj Count R2:                  0.270
AIC:                           0.990     AIC*n:                       325.673
BIC:                       -1368.651     BIC':                        170.533

.
. title4 "trimming male moderator models of dose and HP2work relationship in wave 3 "
-------------
trimming male moderator models of dose and HP2work relationship in wave 3
-------------

. * male models
.         forvalues j=3/3 {
  2. di as input "Gender =1 HP2work model"
  3.         logit HP2work age bf8 illw`j' shjobw`j' havmilsq avgcumdosew`j' if gender==1
  4.                         estat class
  5.                         estat gof
  6.                         fitstat
  7. }
Gender =1 HP2work model

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -148.75217
Iteration 2:   log likelihood = -147.11486
Iteration 3:   log likelihood = -147.09824
Iteration 4:   log likelihood = -147.09823

Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      51.55
                                                  Prob > chi2     =     0.0000
Log likelihood = -147.09823                       Pseudo R2       =     0.1491

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0473544    .0138047      3.43    0.001      .0202977     .0744111
         bf8 |   -.0000527    .0000245     -2.15    0.032     -.0001007    -4.62e-06
       illw3 |    .7688236    .1582366      4.86    0.000      .4586855     1.078962
     shjobw3 |    .0115141    .0039727      2.90    0.004      .0037277     .0193004
    havmilsq |   -1.04e-06    1.75e-06     -0.59    0.552     -4.46e-06     2.38e-06
avgcumdosew3 |    .0105615    .0472406      0.22    0.823     -.0820282     .1031513
       _cons |    -4.59543    .8195918     -5.61    0.000     -6.201801     -2.98906
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        17             6  |         23
     -     |        53           264  |        317
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   24.29%
Specificity                     Pr( -|~D)   97.78%
Positive predictive value       Pr( D| +)   73.91%
Negative predictive value       Pr(~D| -)   83.28%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.22%
False - rate for true D         Pr( -| D)   75.71%
False + rate for classified +   Pr(~D| +)   26.09%
False - rate for classified -   Pr( D| -)   16.72%
--------------------------------------------------
Correctly classified                        82.65%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       324
            Pearson chi2(317) =       321.28
                  Prob > chi2 =         0.4224

Measures of Fit for logit of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -147.098
D(333):                      294.196     LR(6):                        51.549
                                         Prob > LR:                     0.000
McFadden's R2:                 0.149     McFadden's Adj R2:             0.109
Maximum Likelihood R2:         0.141     Cragg & Uhler's R2:            0.220
McKelvey and Zavoina's R2:     0.240     Efron's R2:                    0.164
Variance of y*:                4.329     Variance of error:             3.290
Count R2:                      0.826     Adj Count R2:                  0.157
AIC:                           0.906     AIC*n:                       308.196
BIC:                       -1646.842     BIC':                        -16.576

.
.
. forvalues j=3/3 {
  2. title4 "trimmed HP2work main effects models wave `j' for H1 part 2 with dose ns"
  3.
. }
-------------
trimmed HP2work main effects models wave 3 for H1 part 2 with dose ns
-------------

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


  begin with full model


p = 0.8231 >= 0.1000  removing avgcumdosew3


p = 0.5467 >= 0.1000  removing havmilsq


Logistic regression                               Number of obs   =        340
                                                  LR chi2(4)      =      51.04
                                                  Prob > chi2     =     0.0000
Log likelihood = -147.35095                       Pseudo R2       =     0.1476

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0477661    .0137843      3.47    0.001      .0207495     .0747828
         bf8 |   -.0000502    .0000239     -2.10    0.036     -.0000971    -3.37e-06
       illw3 |    .7513091    .1545821      4.86    0.000      .4483337     1.054285
     shjobw3 |     .011716    .0039653      2.95    0.003      .0039441     .0194878
       _cons |   -4.626957    .8195405     -5.65    0.000     -6.233227    -3.020687
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        16             7  |         23
     -     |        54           263  |        317
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   22.86%
Specificity                     Pr( -|~D)   97.41%
Positive predictive value       Pr( D| +)   69.57%
Negative predictive value       Pr(~D| -)   82.97%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.59%
False - rate for true D         Pr( -| D)   77.14%
False + rate for classified +   Pr(~D| +)   30.43%
False - rate for classified -   Pr( D| -)   17.03%
--------------------------------------------------
Correctly classified                        82.06%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       272
            Pearson chi2(267) =       278.53
                  Prob > chi2 =         0.3013

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -147.351
D(335):                      294.702     LR(4):                        51.044
                                         Prob > LR:                     0.000
McFadden's R2:                 0.148     McFadden's Adj R2:             0.119
Maximum Likelihood R2:         0.139     Cragg & Uhler's R2:            0.218
McKelvey and Zavoina's R2:     0.237     Efron's R2:                    0.162
Variance of y*:                4.312     Variance of error:             3.290
Count R2:                      0.821     Adj Count R2:                  0.129
AIC:                           0.896     AIC*n:                       304.702
BIC:                       -1657.995     BIC':                        -27.728

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


  begin with full model


p = 0.9255 >= 0.1000  removing bf8


p = 0.8830 >= 0.1000  removing shjobw3


p = 0.5343 >= 0.1000  removing havmilsq


p = 0.6152 >= 0.1000  removing illw3


p = 0.1142 >= 0.1000  removing avgcumdosew3


Logistic regression                               Number of obs   =        362
                                                  LR chi2(1)      =      42.20
                                                  Prob > chi2     =     0.0000
Log likelihood =  -185.1665                       Pseudo R2       =     0.1023

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .070115    .0116471      6.02    0.000       .047287     .0929429
       _cons |   -4.733748    .6446886     -7.34    0.000     -5.997314    -3.470181
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        20            14  |         34
     -     |        73           255  |        328
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.51%
Specificity                     Pr( -|~D)   94.80%
Positive predictive value       Pr( D| +)   58.82%
Negative predictive value       Pr(~D| -)   77.74%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.20%
False - rate for true D         Pr( -| D)   78.49%
False + rate for classified +   Pr(~D| +)   41.18%
False - rate for classified -   Pr( D| -)   22.26%
--------------------------------------------------
Correctly classified                        75.97%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =        49
             Pearson chi2(47) =        58.24
                  Prob > chi2 =         0.1261

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -185.167
D(360):                      370.333     LR(1):                        42.199
                                         Prob > LR:                     0.000
McFadden's R2:                 0.102     McFadden's Adj R2:             0.093
Maximum Likelihood R2:         0.110     Cragg & Uhler's R2:            0.162
McKelvey and Zavoina's R2:     0.174     Efron's R2:                    0.127
Variance of y*:                3.982     Variance of error:             3.290
Count R2:                      0.760     Adj Count R2:                  0.065
AIC:                           1.034     AIC*n:                       374.333
BIC:                       -1750.659     BIC':                        -36.308

.
.
. scalar SigDoseWkFw3 = "no"

.
.
. des bf8

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


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


. * male sign main effects in main effects model: 4- age, bf8, illw3 shjobw3
. * male main effects model avgcumdosew3 was not signif.
. * male hp2wk w3  mediators: age illw3 ageXillw3 bf8
. * female signif main effects in main effects model
. * female hp2wk w3 mediators: radhlw3 age ageXillw3 bf1 bf4 bf4m bf40
. *  hypothnuym pt dv wave gender signif
.
.
.
.
. title4 " 1. Summary matrix construction Paid employment partition: first two rows"
-------------
 1. Summary matrix construction Paid employment partition: first two rows
-------------

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

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

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

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

.     matrix rownames HP2wkMw3 = workM

.     matrix rownames HP2wkFw3 = workF

.         matrix define HP2wkMw3= (1, 2, 3, 1, 0 ,4,  0, 4 )

.         matrix define HP2wkFw3= (1, 2, 3, 2, 0, 1,  0, 6 )

.
.         matrix define H1pt2w3 = (HP2wkMw3 \ HP2wkFw3)

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

.     matrix rownames H1pt2w3 = HP2wkMw3 WHP2wkFw3

.     matlist H1pt2w3

   | hypnum    ptnum    wave    medsig    numMAsig    numModsig    numMed    numMed
-------------+----------------------------------------------------------------------------------------
HP2wkMw3   |         1            2            3            1            0            4            0            4
WHP2wkFw3   |         1            2            3            2            0            1            0            6

.
. scalar SigDoseWKMw3 = "no"

. scalar MainEffwkMw3 = "workM: age  bf8  illw3  shjobw3"

.
. scalar list `MainEffwkMw3'
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
  wkMedFw3 = radhlw3 age bf40 bf4m bf1
  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
.
.
.
. title4 "testing male hp2work moderators for hypothesis 1 pt 2 wave 3"
-------------
testing male hp2work moderators for hypothesis 1 pt 2 wave 3
-------------

. * Dose work relationship washes out for males in wave 3 also
. cap gen hp2hmcare=HP2hmcare

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

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


age               double   %8.0g                    *   Respondent's age


occ1w3            double   %15.0g        LABJ           professional executive administration now


occ2w3            double   %15.0g        LABJ           technical sales admin support now


occ3w3            double   %15.0g        LABJ           service occup protective services now


occ4w3            double   %15.0g        LABJ           precision prod mechan craft construction now


occ5w3            double   %15.0g        LABJ           factory laborer machinist transp cleaner now


occ6w3            double   %15.0g        LABJ           farming agricul forestry fishing trapping logging now


occ7w3            double   %15.0g        LABJ           homemaking or caregiving now


occ8w3            double   %15.0g        LABJ           student now


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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


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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


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


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


bf2               float    %9.0g                        bf2 = max(0, efradw3 - 1.61252E-006) * bf1


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


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


bf7m              float    %9.0g                        bf7m = max(0, radtlw3 - 2.12558E-007) * bf4m


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


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


bf17              float    %9.0g                        bf17 = max(0, 20 - ecprw3) * bf15m


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


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


bf29              float    %9.0g                        bf29 = max(0, 18 - CSsocspt) * bf8


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.9905 >= 0.1000  removing bf8


p = 0.8719 >= 0.1000  removing marrw33


p = 0.8567 >= 0.1000  removing shjobw3


p = 0.6579 >= 0.1000  removing marrw35


p = 0.5426 >= 0.1000  removing havmilsq


p = 0.5673 >= 0.1000  removing illw3


p = 0.4857 >= 0.1000  removing suprtw3


p = 0.5745 >= 0.1000  removing marrw34


p = 0.4113 >= 0.1000  removing marrw36


p = 0.1132 >= 0.1000  removing avgcumdosew1


Logistic regression                               Number of obs   =        362
                                                  LR chi2(1)      =      42.20
                                                  Prob > chi2     =     0.0000
Log likelihood =  -185.1665                       Pseudo R2       =     0.1023

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .070115    .0116471      6.02    0.000       .047287     .0929429
       _cons |   -4.733748    .6446886     -7.34    0.000     -5.997314    -3.470181
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =        49
             Pearson chi2(47) =        58.24
                  Prob > chi2 =         0.1261

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        20            14  |         34
     -     |        73           255  |        328
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.51%
Specificity                     Pr( -|~D)   94.80%
Positive predictive value       Pr( D| +)   58.82%
Negative predictive value       Pr(~D| -)   77.74%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.20%
False - rate for true D         Pr( -| D)   78.49%
False + rate for classified +   Pr(~D| +)   41.18%
False - rate for classified -   Pr( D| -)   22.26%
--------------------------------------------------
Correctly classified                        75.97%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -185.167
D(360):                      370.333     LR(1):                        42.199
                                         Prob > LR:                     0.000
McFadden's R2:                 0.102     McFadden's Adj R2:             0.093
Maximum Likelihood R2:         0.110     Cragg & Uhler's R2:            0.162
McKelvey and Zavoina's R2:     0.174     Efron's R2:                    0.127
Variance of y*:                3.982     Variance of error:             3.290
Count R2:                      0.760     Adj Count R2:                  0.065
AIC:                           1.034     AIC*n:                       374.333
BIC:                       -1750.659     BIC':                        -36.308

.
. scalar MainEffwkFw3 = "age"

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

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


age               double   %8.0g                    *   Respondent's age


occ1w3            double   %15.0g        LABJ           professional executive administration now


occ2w3            double   %15.0g        LABJ           technical sales admin support now


occ3w3            double   %15.0g        LABJ           service occup protective services now


occ4w3            double   %15.0g        LABJ           precision prod mechan craft construction now


occ5w3            double   %15.0g        LABJ           factory laborer machinist transp cleaner now


occ6w3            double   %15.0g        LABJ           farming agricul forestry fishing trapping logging now


occ7w3            double   %15.0g        LABJ           homemaking or caregiving now


occ8w3            double   %15.0g        LABJ           student now


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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


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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


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


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


bf2               float    %9.0g                        bf2 = max(0, efradw3 - 1.61252E-006) * bf1


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


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


bf7m              float    %9.0g                        bf7m = max(0, radtlw3 - 2.12558E-007) * bf4m


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


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


bf17              float    %9.0g                        bf17 = max(0, 20 - ecprw3) * bf15m


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


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


bf29              float    %9.0g                        bf29 = max(0, 18 - CSsocspt) * bf8


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


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


note: marrw34 dropped because of collinearity


  begin with full model


p = 0.8272 >= 0.1000  removing avgcumdosew1


p = 0.5691 >= 0.1000  removing marrw36


p = 0.5489 >= 0.1000  removing havmilsq


p = 0.5439 >= 0.1000  removing marrw35


Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      54.97
                                                  Prob > chi2     =     0.0000
Log likelihood =  -145.3871                       Pseudo R2       =     0.1590

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     marrw33 |   -.9533134    .4976353     -1.92    0.055     -1.928661     .0220339
         bf8 |   -.0000528    .0000242     -2.18    0.029     -.0001002    -5.32e-06
     shjobw3 |    .0109505    .0039896      2.74    0.006       .003131     .0187701
         age |    .0475117    .0137133      3.46    0.001      .0206342     .0743892
       illw3 |    .7534933     .157365      4.79    0.000      .4450635     1.061923
     suprtw3 |    .0095264    .0057237      1.66    0.096     -.0016919     .0207447
       _cons |   -4.534902    .8292162     -5.47    0.000     -6.160136    -2.909668
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       320
            Pearson chi2(313) =       320.59
                  Prob > chi2 =         0.3716

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        18             7  |         25
     -     |        52           263  |        315
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   25.71%
Specificity                     Pr( -|~D)   97.41%
Positive predictive value       Pr( D| +)   72.00%
Negative predictive value       Pr(~D| -)   83.49%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.59%
False - rate for true D         Pr( -| D)   74.29%
False + rate for classified +   Pr(~D| +)   28.00%
False - rate for classified -   Pr( D| -)   16.51%
--------------------------------------------------
Correctly classified                        82.65%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -145.387
D(333):                      290.774     LR(6):                        54.972
                                         Prob > LR:                     0.000
McFadden's R2:                 0.159     McFadden's Adj R2:             0.119
Maximum Likelihood R2:         0.149     Cragg & Uhler's R2:            0.234
McKelvey and Zavoina's R2:     0.253     Efron's R2:                    0.177
Variance of y*:                4.403     Variance of error:             3.290
Count R2:                      0.826     Adj Count R2:                  0.157
AIC:                           0.896     AIC*n:                       304.774
BIC:                       -1650.265     BIC':                        -19.998

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

. di "`cn1'"
marrw33 bf8 shjobw3 age illw3 suprtw3 _cons

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

. di `leng1'
43

. local leng1b `leng1'-6

. di `leng1b'
37

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

. di "`nuvlist'"
marrw33 bf8 shjobw3 age illw3 suprtw3

. local rhsvars = "`nuvlist'"

. local nuvlist= "`nuvlist'"

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

. di "`nuvlist'"
marrw33 bf8 shjobw3 age illw3 suprtw3

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


  begin with full model


p = 0.9998 >= 0.1000  removing marrw33


p = 0.9539 >= 0.1000  removing shjobw3


p = 0.4193 >= 0.1000  removing suprtw3


p = 0.1605 >= 0.1000  removing bf8


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      37.81
                                                  Prob > chi2     =     0.0000
Log likelihood = -153.96835                       Pseudo R2       =     0.1094

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .050053    .0120837      4.14    0.000      .0263694     .0737367
       illw3 |     .450018    .1335457      3.37    0.001      .1882732     .7117629
       _cons |   -4.209924    .6577161     -6.40    0.000     -5.499024    -2.920824
-------------+----------------------------------------------------------------

. di "`rhsvars'"
marrw33 bf8 shjobw3 age illw3 suprtw3

. matrix define c=e(b)

. local cn2: colnames(c)

. di "`cn2'"
age illw3 _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 = -155.70854
Iteration 2:   log likelihood = -154.73483
Iteration 3:   log likelihood =  -154.7292
Iteration 4:   log likelihood =  -154.7292

Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      36.29
                                                  Prob > chi2     =     0.0000
Log likelihood =  -154.7292                       Pseudo R2       =     0.1050

-------------+----------------------------------------------------------------
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .029911    .0118759      2.52    0.012      .0066346     .0531873
       illw3 |    .6323839    .1414947      4.47    0.000      .3550594     .9097083
       _cons |    -3.26854    .6276516     -5.21    0.000     -4.498715    -2.038366
-------------+----------------------------------------------------------------

.
.
.
. di "`rhsvars'"
age illw3

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

. di "`varlist2'"
age illw3

.
.  * constructing potential moderators
. foreach var in age illw3 {
  2. cap gen `var'Xd3 = `var'* avgcumdosew3
  3. }

.
. *x  no signif male moderators for paid employment
.
. logit hp2work `rhsvars' illw3Xd3 if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -155.25678
Iteration 2:   log likelihood = -154.38518
Iteration 3:   log likelihood = -154.38145
Iteration 4:   log likelihood = -154.38145

Logistic regression                               Number of obs   =        340
                                                  LR chi2(3)      =      36.98
                                                  Prob > chi2     =     0.0000
Log likelihood = -154.38145                       Pseudo R2       =     0.1070

-------------+----------------------------------------------------------------
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0293019    .0119141      2.46    0.014      .0059507     .0526531
       illw3 |    .5890952      .14968      3.94    0.000      .2957278     .8824626
    illw3Xd3 |    .0284995    .0363345      0.78    0.433     -.0427148     .0997139
       _cons |   -3.238806    .6288194     -5.15    0.000     -4.471269    -2.006342
-------------+----------------------------------------------------------------

. fitstat

Measures of Fit for logit of hp2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -154.381
D(336):                      308.763     LR(3):                        36.983
                                         Prob > LR:                     0.000
McFadden's R2:                 0.107     McFadden's Adj R2:             0.084
Maximum Likelihood R2:         0.103     Cragg & Uhler's R2:            0.161
McKelvey and Zavoina's R2:     0.160     Efron's R2:                    0.127
Variance of y*:                3.919     Variance of error:             3.290
Count R2:                      0.818     Adj Count R2:                  0.114
AIC:                           0.932     AIC*n:                       316.763
BIC:                       -1649.763     BIC':                        -19.496

.
. scalar wkModMw3 = "none"

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

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

. * Moderator testing for women also
. * Dose work relationship for females in wave 3 washes out also
.
. forvalues j=3/3 {
  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' `w3bf'
  4. sw, pr(.1): logistic HP2work  age  havmilsq ///
>    avgcumdosew3  illw`j' shjobw`j' suprtw`j' if gender==2, coef
  5. estat gof
  6. estat class
  7. fitstat
  8. }
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


occ1w3            double   %15.0g        LABJ           professional executive administration now


occ2w3            double   %15.0g        LABJ           technical sales admin support now


occ3w3            double   %15.0g        LABJ           service occup protective services now


occ4w3            double   %15.0g        LABJ           precision prod mechan craft construction now


occ5w3            double   %15.0g        LABJ           factory laborer machinist transp cleaner now


occ6w3            double   %15.0g        LABJ           farming agricul forestry fishing trapping logging now


occ7w3            double   %15.0g        LABJ           homemaking or caregiving now


occ8w3            double   %15.0g        LABJ           student now


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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


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


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


bf2               float    %9.0g                        bf2 = max(0, efradw3 - 1.61252E-006) * bf1


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


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


bf7m              float    %9.0g                        bf7m = max(0, radtlw3 - 2.12558E-007) * bf4m


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


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


bf17              float    %9.0g                        bf17 = max(0, 20 - ecprw3) * bf15m


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


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


bf29              float    %9.0g                        bf29 = max(0, 18 - CSsocspt) * bf8


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.8907 >= 0.1000  removing suprtw3


p = 0.8830 >= 0.1000  removing shjobw3


p = 0.5343 >= 0.1000  removing havmilsq


p = 0.6152 >= 0.1000  removing illw3


p = 0.1142 >= 0.1000  removing avgcumdosew3


Logistic regression                               Number of obs   =        362
                                                  LR chi2(1)      =      42.20
                                                  Prob > chi2     =     0.0000
Log likelihood =  -185.1665                       Pseudo R2       =     0.1023

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .070115    .0116471      6.02    0.000       .047287     .0929429
       _cons |   -4.733748    .6446886     -7.34    0.000     -5.997314    -3.470181
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =        49
             Pearson chi2(47) =        58.24
                  Prob > chi2 =         0.1261

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        20            14  |         34
     -     |        73           255  |        328
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.51%
Specificity                     Pr( -|~D)   94.80%
Positive predictive value       Pr( D| +)   58.82%
Negative predictive value       Pr(~D| -)   77.74%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.20%
False - rate for true D         Pr( -| D)   78.49%
False + rate for classified +   Pr(~D| +)   41.18%
False - rate for classified -   Pr( D| -)   22.26%
--------------------------------------------------
Correctly classified                        75.97%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -185.167
D(360):                      370.333     LR(1):                        42.199
                                         Prob > LR:                     0.000
McFadden's R2:                 0.102     McFadden's Adj R2:             0.093
Maximum Likelihood R2:         0.110     Cragg & Uhler's R2:            0.162
McKelvey and Zavoina's R2:     0.174     Efron's R2:                    0.127
Variance of y*:                3.982     Variance of error:             3.290
Count R2:                      0.760     Adj Count R2:                  0.065
AIC:                           1.034     AIC*n:                       374.333
BIC:                       -1750.659     BIC':                        -36.308

.
. replace ageXd3 = age*avgcumdosew3
(0 real changes made)

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

. di "`cn3'"
age _cons

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

. di `leng3'


. local leng1b `leng1'-6

. di `leng3b'


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

. di "`nuvlist3'"
mar

. local rhsvars3 = "`nuvlist3'"

. local nuvlist3= "`nuvlist3'"

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

. di "`nuvlist3'"
mar

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

. scalar wkModMw3="none"

.
. *x no significant female moderator for paid employment
. forvalues j=3/3 {
  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' `w3bf'
  4. sw, pr(.1): logistic HP2work  age  havmilsq ///
>    avgcumdosew3  ageXd3 illw`j' shjobw`j' suprtw`j' if gender==2, coef
  5. estat gof
  6. estat class
  7. fitstat
  8. }
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


occ1w3            double   %15.0g        LABJ           professional executive administration now


occ2w3            double   %15.0g        LABJ           technical sales admin support now


occ3w3            double   %15.0g        LABJ           service occup protective services now


occ4w3            double   %15.0g        LABJ           precision prod mechan craft construction now


occ5w3            double   %15.0g        LABJ           factory laborer machinist transp cleaner now


occ6w3            double   %15.0g        LABJ           farming agricul forestry fishing trapping logging now


occ7w3            double   %15.0g        LABJ           homemaking or caregiving now


occ8w3            double   %15.0g        LABJ           student now


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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


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


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


bf2               float    %9.0g                        bf2 = max(0, efradw3 - 1.61252E-006) * bf1


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


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


bf7m              float    %9.0g                        bf7m = max(0, radtlw3 - 2.12558E-007) * bf4m


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


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


bf17              float    %9.0g                        bf17 = max(0, 20 - ecprw3) * bf15m


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


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


bf29              float    %9.0g                        bf29 = max(0, 18 - CSsocspt) * bf8


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.8808 >= 0.1000  removing suprtw3


p = 0.8844 >= 0.1000  removing shjobw3


p = 0.8698 >= 0.1000  removing ageXd3


p = 0.5343 >= 0.1000  removing havmilsq


p = 0.6152 >= 0.1000  removing illw3


p = 0.1142 >= 0.1000  removing avgcumdosew3


Logistic regression                               Number of obs   =        362
                                                  LR chi2(1)      =      42.20
                                                  Prob > chi2     =     0.0000
Log likelihood =  -185.1665                       Pseudo R2       =     0.1023

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .070115    .0116471      6.02    0.000       .047287     .0929429
       _cons |   -4.733748    .6446886     -7.34    0.000     -5.997314    -3.470181
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =        49
             Pearson chi2(47) =        58.24
                  Prob > chi2 =         0.1261

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        20            14  |         34
     -     |        73           255  |        328
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.51%
Specificity                     Pr( -|~D)   94.80%
Positive predictive value       Pr( D| +)   58.82%
Negative predictive value       Pr(~D| -)   77.74%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.20%
False - rate for true D         Pr( -| D)   78.49%
False + rate for classified +   Pr(~D| +)   41.18%
False - rate for classified -   Pr( D| -)   22.26%
--------------------------------------------------
Correctly classified                        75.97%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -185.167
D(360):                      370.333     LR(1):                        42.199
                                         Prob > LR:                     0.000
McFadden's R2:                 0.102     McFadden's Adj R2:             0.093
Maximum Likelihood R2:         0.110     Cragg & Uhler's R2:            0.162
McKelvey and Zavoina's R2:     0.174     Efron's R2:                    0.127
Variance of y*:                3.982     Variance of error:             3.290
Count R2:                      0.760     Adj Count R2:                  0.065
AIC:                           1.034     AIC*n:                       374.333
BIC:                       -1750.659     BIC':                        -36.308

.
. title4 " Mediator analysis for Dose=>paid employment wave three"
-------------
 Mediator analysis for Dose=>paid employment wave three
-------------

. title4 "age may be a male mediator for dose- paid employment impact"
-------------
age may be a male mediator for dose- paid employment impact
-------------

.
. *  we test for the possibility by testing a probit analysis
. glm radhlw3 avgcumdosew3 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1695.1855

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

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

                                                   AIC             =  9.983444
Log likelihood   = -1695.185473                    BIC             =  424265.5

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .9606492    .7224692      1.33    0.184     -.4553645     2.376663
       _cons |    46.19995    2.117563     21.82    0.000       42.0496      50.3503
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  327.9117
Iteration 2:   deviance =  327.3424
Iteration 3:   deviance =   327.342
Iteration 4:   deviance =   327.342

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  327.3419871                    (1/df) Deviance =  .9684674
Pearson          =   339.544695                    (1/df) Pearson  =   1.00457

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

                                                   BIC             = -1642.842

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0094116    .0021904      4.30    0.000      .0051185     .0137048
       _cons |   -1.312207    .1427935     -9.19    0.000     -1.592077    -1.032337
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. di as input "age is a possible male mediator for paid employment"
age is a possible male mediator for paid employment

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

Iteration 0:   log likelihood = -1330.6336

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

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

                                                   AIC             =  7.839021
Log likelihood   = -1330.633586                    BIC             =   47957.2

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .5433648    .2472657      2.20    0.028       .058733     1.027997
       _cons |    48.52021    .7247376     66.95    0.000      47.09975     49.94067
-------------+----------------------------------------------------------------

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

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.)

.
.
. di as input "Illness in wave 3 is a possible mediator for dose-paid employment impact"
Illness in wave 3 is a possible mediator for dose-paid employment impact

. glm illw3 avgcumdosew3 if gender==1, family(gaussian) link(identity)

Iteration 0:   log likelihood = -461.99206

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

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

                                                   AIC             =  2.729365
Log likelihood   = -461.9920626                    BIC             = -1668.714

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .038211    .0192139      1.99    0.047      .0005524     .0758696
       _cons |    .4504952    .0563162      8.00    0.000      .3401176     .5608729
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  315.5535
Iteration 2:   deviance =  315.5149
Iteration 3:   deviance =  315.5148
Iteration 4:   deviance =  315.5148

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  315.5148102                    (1/df) Deviance =  .9334758
Pearson          =  336.1884602                    (1/df) Pearson  =  .9946404

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

                                                   BIC             = -1654.669

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    .4173011    .0774431      5.39    0.000      .2655154     .5690869
       _cons |   -1.077182    .0906493    -11.88    0.000     -1.254852     -.899513
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. * constructing an interaction
.
.
. di as input "Interaction of age & illness in wave 3 is moderator that mediates for males"
Interaction of age & illness in wave 3 is moderator that mediates for males

.
. cap gen ageXillw3 = age*illw3

. glm illw3 avgcumdosew3 if gender==1, family(gaussian) link(identity)

Iteration 0:   log likelihood = -461.99206

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

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

                                                   AIC             =  2.729365
Log likelihood   = -461.9920626                    BIC             = -1668.714

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .038211    .0192139      1.99    0.047      .0005524     .0758696
       _cons |    .4504952    .0563162      8.00    0.000      .3401176     .5608729
-------------+----------------------------------------------------------------

. glm hp2work illw3 avgcumdosew3 ageXillw3 if gender==1, family(binomial) ///
>    irls scale(dev) link(probit)

Iteration 1:   deviance =  306.4966
Iteration 2:   deviance =  306.1716
Iteration 3:   deviance =  306.1695
Iteration 4:   deviance =  306.1695

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  306.1695162                    (1/df) Deviance =  .9112188
Pearson          =  333.6560038                    (1/df) Pearson  =  .9930238

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

                                                   BIC             = -1652.356

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |   -.9049112    .4534263     -2.00    0.046      -1.79361    -.0162121
avgcumdosew3 |    -.004425    .0291879     -0.15    0.879     -.0616323     .0527822
   ageXillw3 |    .0235805    .0080114      2.94    0.003      .0078785     .0392825
       _cons |   -1.048466    .0954586    -10.98    0.000     -1.235561    -.8613702
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
. des bf8

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


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


. title4 "bf8 is a male mediator of paid employment"
-------------
bf8 is a male mediator of paid employment
-------------

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

. foreach var in `w3bf'{
  2. glm `var' avgcumdosew3 if gender==1, family(gaussian) link(identity)
  3. glm hp2work `var' illw3 avgcumdosew3 ageXillw3 if gender==1, family(binomial) ///
>    irls scale(dev) link(probit)
  4. }

Iteration 0:   log likelihood = -1551.9192

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

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

                                                   AIC             =  9.140701
Log likelihood   =  -1551.91925                    BIC             =  181536.3

-------------+----------------------------------------------------------------
             |                 OIM
          bf1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    -.002304    .4740456     -0.00    0.996     -.9314164     .9268084
       _cons |    32.04104    1.389431     23.06    0.000      29.31781     34.76428
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  301.0309
Iteration 2:   deviance =  300.1656
Iteration 3:   deviance =  300.1621
Iteration 4:   deviance =  300.1621
Iteration 5:   deviance =  300.1621

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  300.1621391                    (1/df) Deviance =  .8960064
Pearson          =  331.1205639                    (1/df) Pearson  =  .9884196

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

                                                   BIC             = -1652.535

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf1 |    .0089452    .0034596      2.59    0.010      .0021644     .0157259
       illw3 |     -.77203    .4386134     -1.76    0.078     -1.631697     .0876365
avgcumdosew3 |     -.00216    .0295424     -0.07    0.942     -.0600621     .0557421
   ageXillw3 |     .020558    .0077394      2.66    0.008       .005389     .0357271
       _cons |   -1.346332    .1529226     -8.80    0.000     -1.646055     -1.04661
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1027.1072

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

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

                                                   AIC             =  6.053572
Log likelihood   = -1027.107224                    BIC             =  6403.723

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.0357675    .1012648     -0.35    0.724     -.2342429     .1627078
       _cons |    12.54064    .2968079     42.25    0.000      11.95891     13.12238
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  282.7342
Iteration 2:   deviance =  280.9952
Iteration 3:   deviance =  280.9756
Iteration 4:   deviance =  280.9756
Iteration 5:   deviance =  280.9756

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   280.975559                    (1/df) Deviance =   .838733
Pearson          =  310.5734169                    (1/df) Pearson  =  .9270848

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

                                                   BIC             = -1671.721

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0819747    .0150372     -5.45    0.000     -.1114471    -.0525023
       illw3 |   -.5388859    .4267744     -1.26    0.207     -1.375348     .2975765
avgcumdosew3 |    .0024099    .0278188      0.09    0.931      -.052114     .0569338
   ageXillw3 |    .0153271    .0074554      2.06    0.040      .0007149     .0299394
       _cons |   -.0701321    .2003312     -0.35    0.726     -.4627742     .3225099
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3110.5209

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

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

                                                   AIC             =  18.30895
Log likelihood   = -3110.520925                    BIC             =  1.76e+09

-------------+----------------------------------------------------------------
             |                 OIM
          bf2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -40.64822    46.41724     -0.88    0.381     -131.6243      50.3279
       _cons |    1991.578    136.0493     14.64    0.000      1724.926     2258.229
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  299.7774
Iteration 2:   deviance =  299.1194
Iteration 3:   deviance =  299.1177
Iteration 4:   deviance =  299.1177
Iteration 5:   deviance =  299.1177

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  299.1177398                    (1/df) Deviance =  .8928888
Pearson          =  333.2413587                    (1/df) Pearson  =  .9947503

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

                                                   BIC             = -1653.579

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf2 |    .0000949    .0000336      2.82    0.005       .000029     .0001608
       illw3 |   -.6262331     .449099     -1.39    0.163     -1.506451     .2539847
avgcumdosew3 |    .0027738    .0281975      0.10    0.922     -.0524922     .0580398
   ageXillw3 |    .0180516    .0079115      2.28    0.023      .0025454     .0335579
       _cons |   -1.256084    .1228394    -10.23    0.000     -1.496845    -1.015323
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1060.7697

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

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

                                                   AIC             =  6.251587
Log likelihood   = -1060.769747                    BIC             =  8237.445

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.0292413    .1118039     -0.26    0.794     -.2483729     .1898903
       _cons |    20.35328     .327698     62.11    0.000        19.711     20.99556
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  284.2146
Iteration 2:   deviance =  282.8347
Iteration 3:   deviance =  282.8223
Iteration 4:   deviance =  282.8223
Iteration 5:   deviance =  282.8223

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  282.8222621                    (1/df) Deviance =  .8442456
Pearson          =  311.8592054                    (1/df) Pearson  =   .930923

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

                                                   BIC             = -1669.875

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.0702538    .0135383     -5.19    0.000     -.0967884    -.0437191
       illw3 |   -.5205682    .4244129     -1.23    0.220     -1.352402     .3112658
avgcumdosew3 |    .0026156    .0277534      0.09    0.925       -.05178     .0570112
   ageXillw3 |    .0151759    .0074121      2.05    0.041      .0006484     .0297034
       _cons |    .3364223    .2818414      1.19    0.233     -.2159766     .8888213
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood =  -2273.014

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

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

                                                   AIC             =  13.38244
Log likelihood   = -2273.013968                    BIC             =  1.28e+07

-------------+----------------------------------------------------------------
             |                 OIM
         bf5m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    9.087842    3.952764      2.30    0.021      1.340566     16.83512
       _cons |    102.4403    11.58558      8.84    0.000      79.73302     125.1477
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  304.1111
Iteration 2:   deviance =  303.3297
Iteration 3:   deviance =   303.318
Iteration 4:   deviance =   303.318
Iteration 5:   deviance =   303.318

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  303.3180183                    (1/df) Deviance =  .9054269
Pearson          =  334.3846422                    (1/df) Pearson  =  .9981631

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

                                                   BIC             = -1649.379

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf5m |   -.0008032    .0004666     -1.72    0.085     -.0017178     .0001114
       illw3 |   -.8955598    .4670831     -1.92    0.055     -1.811026     .0199063
avgcumdosew3 |    .0024508    .0286972      0.09    0.932     -.0537946     .0586962
   ageXillw3 |    .0244622    .0082752      2.96    0.003      .0082431     .0406812
       _cons |   -1.001258    .0981618    -10.20    0.000     -1.193652    -.8088645
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2733.8489

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

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

                                                   AIC             =  16.09323
Log likelihood   = -2733.848861                    BIC             =  1.92e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf7m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    9.565438       15.33      0.62    0.533     -20.48082     39.61169
       _cons |    1022.573    44.93236     22.76    0.000      934.5073     1110.639
-------------+----------------------------------------------------------------

Iteration 1:   deviance =   306.253
Iteration 2:   deviance =  305.9082
Iteration 3:   deviance =  305.9062
Iteration 4:   deviance =  305.9062
Iteration 5:   deviance =  305.9062

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  305.9062256                    (1/df) Deviance =  .9131529
Pearson          =  334.7424736                    (1/df) Pearson  =  .9992313

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

                                                   BIC             = -1646.791

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf7m |    -.000056    .0001041     -0.54    0.591       -.00026      .000148
       illw3 |   -.8870307      .45488     -1.95    0.051     -1.778579     .0045177
avgcumdosew3 |   -.0034059    .0290164     -0.12    0.907      -.060277     .0534652
   ageXillw3 |    .0233076    .0080353      2.90    0.004      .0075586     .0390565
       _cons |   -.9935662    .1388801     -7.15    0.000     -1.265766    -.7213662
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3529.6624

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  6.13e+07
Deviance         =  2.07081e+10                    (1/df) Deviance =  6.13e+07
Pearson          =  2.07081e+10                    (1/df) Pearson  =  6.13e+07

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

                                                   AIC             =  20.77448
Log likelihood   = -3529.662384                    BIC             =  2.07e+10

-------------+----------------------------------------------------------------
             |                 OIM
          bf8 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     355.615    159.2444      2.23    0.026       43.5018     667.7282
       _cons |    2733.121    466.7464      5.86    0.000      1818.315     3647.927
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  302.6209
Iteration 2:   deviance =  301.3338
Iteration 3:   deviance =  301.2925
Iteration 4:   deviance =  301.2924
Iteration 5:   deviance =  301.2924

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  301.2924095                    (1/df) Deviance =  .8993803
Pearson          =  336.2938827                    (1/df) Pearson  =  1.003862

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

                                                   BIC             = -1651.404

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf8 |    -.000027    .0000125     -2.15    0.031     -.0000516    -2.44e-06
       illw3 |   -.9474576    .4820727     -1.97    0.049     -1.892303    -.0026126
avgcumdosew3 |    .0061317    .0278623      0.22    0.826     -.0484774     .0607408
   ageXillw3 |    .0256323     .008669      2.96    0.003      .0086413     .0426233
       _cons |   -1.016811    .0955984    -10.64    0.000     -1.204181    -.8294416
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2696.8709

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

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

                                                   AIC             =  15.87571
Log likelihood   = -2696.870867                    BIC             =  1.54e+08

-------------+----------------------------------------------------------------
             |                 OIM
        bf15m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -3.628301     13.7502     -0.26    0.792     -30.57819     23.32159
       _cons |     115.892    40.30193      2.88    0.004      36.90167     194.8823
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  306.0016
Iteration 2:   deviance =  305.6478
Iteration 3:   deviance =  305.6457
Iteration 4:   deviance =  305.6457

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  305.6457012                    (1/df) Deviance =  .9123752
Pearson          =  333.5001091                    (1/df) Pearson  =  .9955227

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

                                                   BIC             = -1647.051

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       bf15m |    .0000806     .000105      0.77    0.443     -.0001252     .0002864
       illw3 |   -.8957517    .4543388     -1.97    0.049     -1.786239    -.0052639
avgcumdosew3 |   -.0042893    .0292684     -0.15    0.883     -.0616544     .0530759
   ageXillw3 |    .0235238    .0080267      2.93    0.003      .0077918     .0392559
       _cons |   -1.061944    .0973897    -10.90    0.000     -1.252824     -.871064
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3469.0024

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  4.29e+07
Deviance         =  1.44935e+10                    (1/df) Deviance =  4.29e+07
Pearson          =  1.44935e+10                    (1/df) Pearson  =  4.29e+07

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

                                                   AIC             =  20.41766
Log likelihood   = -3469.002409                    BIC             =  1.45e+10

-------------+----------------------------------------------------------------
             |                 OIM
         bf17 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -17.08696    133.2235     -0.13    0.898     -278.2002     244.0263
       _cons |    434.0573    390.4791      1.11    0.266     -331.2677     1199.382
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  306.2652
Iteration 2:   deviance =  305.7886
Iteration 3:   deviance =  305.7001
Iteration 4:   deviance =  305.5515
Iteration 5:   deviance =  305.1672
Iteration 6:   deviance =  305.0101
Iteration 7:   deviance =  304.9255
Iteration 8:   deviance =  304.8717
Iteration 9:   deviance =  304.8247
Iteration 10:  deviance =  304.7365
Iteration 11:  deviance =  304.6723
Iteration 12:  deviance =  304.6508
Iteration 13:  deviance =  304.6429
Iteration 14:  deviance =  304.6398
Iteration 15:  deviance =  304.6384
Iteration 16:  deviance =  304.6377
Iteration 17:  deviance =  304.6373
Iteration 18:  deviance =   304.637
Iteration 19:  deviance =  304.6369
Iteration 20:  deviance =  304.6368
Iteration 21:  deviance =  304.6367
Iteration 22:  deviance =  304.6366
Iteration 23:  deviance =  304.6366
Iteration 24:  deviance =  304.6365
Iteration 25:  deviance =  304.6365
Iteration 26:  deviance =  304.6365
Iteration 27:  deviance =  304.6364
Iteration 28:  deviance =  304.6364
Iteration 29:  deviance =  304.6364
Iteration 30:  deviance =  304.6364
Iteration 31:  deviance =  304.6364
Iteration 32:  deviance =  304.6364
Iteration 33:  deviance =  304.6364
Iteration 34:  deviance =  304.6364
Iteration 35:  deviance =  304.6363
Iteration 36:  deviance =  304.6363
Iteration 37:  deviance =  304.6363
Iteration 38:  deviance =  304.6363
Iteration 39:  deviance =  304.6363
Iteration 40:  deviance =  304.6363
Iteration 41:  deviance =  304.6363
Iteration 42:  deviance =  304.6363
Iteration 43:  deviance =  304.6363
Iteration 44:  deviance =  304.6363
Iteration 45:  deviance =  304.6363
Iteration 46:  deviance =  304.6363
Iteration 47:  deviance =  304.6363
Iteration 48:  deviance =  304.6363
Iteration 49:  deviance =  304.6363
Iteration 50:  deviance =  304.6363
Iteration 51:  deviance =  304.6363
Iteration 52:  deviance =  304.6363
Iteration 53:  deviance =  304.6363
Iteration 54:  deviance =  304.6363
Iteration 55:  deviance =  304.6363
Iteration 56:  deviance =  304.6363
Iteration 57:  deviance =  304.6363
Iteration 58:  deviance =  304.6363
Iteration 59:  deviance =  304.6363
Iteration 60:  deviance =  304.6363
Iteration 61:  deviance =  304.6363
Iteration 62:  deviance =  304.6363
Iteration 63:  deviance =  304.6363
Iteration 64:  deviance =  304.6363
Iteration 65:  deviance =  304.6363
Iteration 66:  deviance =  304.6363
Iteration 67:  deviance =  304.6363
Iteration 68:  deviance =  304.6363

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   304.636255                    (1/df) Deviance =   .909362
Pearson          =  328.9419784                    (1/df) Pearson  =  .9819164

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

                                                   BIC             = -1648.061

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf17 |   -.0061172    .0135397     -0.45    0.651     -.0326545     .0204201
       illw3 |   -.8919627    .4536997     -1.97    0.049     -1.781198    -.0027277
avgcumdosew3 |   -.0045617     .029111     -0.16    0.875     -.0616181     .0524948
   ageXillw3 |     .023281    .0080101      2.91    0.004      .0075815     .0389804
       _cons |    -1.03774    .0956856    -10.85    0.000     -1.225281    -.8502001
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1596.6648

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

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

                                                   AIC             =  9.403911
Log likelihood   = -1596.664807                    BIC             =  236789.9

-------------+----------------------------------------------------------------
             |                 OIM
         bf20 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.1398753    .5407236     -0.26    0.796     -1.199674     .9199234
       _cons |    70.35574    1.584865     44.39    0.000      67.24947     73.46202
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  300.1457
Iteration 2:   deviance =  299.0235
Iteration 3:   deviance =  299.0152
Iteration 4:   deviance =  299.0152
Iteration 5:   deviance =  299.0152

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  299.0152272                    (1/df) Deviance =  .8925828
Pearson          =    330.25436                    (1/df) Pearson  =  .9858339

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

                                                   BIC             = -1653.682

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf20 |    .0088228     .003147      2.80    0.005      .0026548     .0149908
       illw3 |   -.7807362    .4376076     -1.78    0.074     -1.638431      .076959
avgcumdosew3 |   -.0015929    .0300016     -0.05    0.958      -.060395     .0572092
   ageXillw3 |    .0206881    .0077194      2.68    0.007      .0055584     .0358178
       _cons |   -1.683938    .2508128     -6.71    0.000     -2.175522    -1.192354
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3143.6434

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

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

                                                   AIC             =  18.50378
Log likelihood   = -3143.643356                    BIC             =  2.14e+09

-------------+----------------------------------------------------------------
             |                 OIM
         bf22 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    72.68941    51.16675      1.42    0.155     -27.59557     172.9744
       _cons |     2107.73    149.9701     14.05    0.000      1813.794     2401.666
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  305.3026
Iteration 2:   deviance =  304.9396
Iteration 3:   deviance =  304.9374
Iteration 4:   deviance =  304.9374
Iteration 5:   deviance =  304.9374

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  304.9374153                    (1/df) Deviance =  .9102609
Pearson          =  331.1091682                    (1/df) Pearson  =  .9883856

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

                                                   BIC             = -1647.759

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf22 |    .0000371    .0000318      1.17    0.243     -.0000252     .0000993
       illw3 |    -.918145    .4518314     -2.03    0.042     -1.803718    -.0325717
avgcumdosew3 |    -.006472    .0296204     -0.22    0.827     -.0645268     .0515829
   ageXillw3 |    .0231361    .0079661      2.90    0.004      .0075229     .0387493
       _cons |   -1.114315    .1113817    -10.00    0.000     -1.332619    -.8960105
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3683.6189

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  1.52e+08
Deviance         =  5.12210e+10                    (1/df) Deviance =  1.52e+08
Pearson          =  5.12210e+10                    (1/df) Pearson  =  1.52e+08

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

                                                   AIC             =  21.68011
Log likelihood   = -3683.618914                    BIC             =  5.12e+10

-------------+----------------------------------------------------------------
             |                 OIM
         bf29 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    72.89759    250.4485      0.29    0.771     -417.9724     563.7676
       _cons |    1316.168    734.0664      1.79    0.073     -122.5761     2754.911
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  306.2986
Iteration 2:   deviance =  305.9514
Iteration 3:   deviance =  305.9494
Iteration 4:   deviance =  305.9494

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  305.9493576                    (1/df) Deviance =  .9132817
Pearson          =  332.9706028                    (1/df) Pearson  =  .9939421

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

                                                   BIC             = -1646.747

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf29 |    2.79e-06    5.58e-06      0.50    0.617     -8.15e-06     .0000137
       illw3 |   -.9120386    .4552478     -2.00    0.045     -1.804308    -.0197692
avgcumdosew3 |   -.0047071    .0293276     -0.16    0.872     -.0621882      .052774
   ageXillw3 |    .0237101    .0080424      2.95    0.003      .0079473     .0394729
       _cons |   -1.052896    .0959692    -10.97    0.000     -1.240992    -.8647998
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2661.1782

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

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

                                                   AIC             =  15.66575
Log likelihood   =  -2661.17822                    BIC             =  1.25e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf30 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -8.740799    12.37991     -0.71    0.480     -33.00497     15.52337
       _cons |    499.3279     36.2856     13.76    0.000      428.2095     570.4464
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  302.7978
Iteration 2:   deviance =  302.3054
Iteration 3:   deviance =  302.3037
Iteration 4:   deviance =  302.3037
Iteration 5:   deviance =  302.3037

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  302.3036646                    (1/df) Deviance =   .902399
Pearson          =  330.9769023                    (1/df) Pearson  =  .9879908

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

                                                   BIC             = -1650.393

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf30 |    .0002605    .0001257      2.07    0.038      .0000141      .000507
       illw3 |    -.704577    .4520917     -1.56    0.119     -1.590661     .1815065
avgcumdosew3 |   -.0017053    .0295427     -0.06    0.954      -.059608     .0561974
   ageXillw3 |    .0200764    .0079446      2.53    0.012      .0045054     .0356475
       _cons |   -1.198337    .1213319     -9.88    0.000     -1.436144     -.960531
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -658.90158

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

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

                                                   AIC             =  3.887656
Log likelihood   = -658.9015808                    BIC             = -1010.158

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .0494693    .0342875      1.44    0.149      -.017733     .1166715
       _cons |    2.083835    .1004969     20.74    0.000      1.886864     2.280805
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  300.0331
Iteration 2:   deviance =  299.3058
Iteration 3:   deviance =  299.3023
Iteration 4:   deviance =  299.3023
Iteration 5:   deviance =  299.3023

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       335
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   299.302286                    (1/df) Deviance =  .8934397
Pearson          =  332.1283637                    (1/df) Pearson  =   .991428

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

                                                   BIC             = -1653.394

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .1459653    .0519808      2.81    0.005      .0440849     .2478458
       illw3 |   -.8596898    .4456734     -1.93    0.054     -1.733194     .0138141
avgcumdosew3 |    -.004707    .0285947     -0.16    0.869     -.0607516     .0513375
   ageXillw3 |    .0204911    .0078874      2.60    0.009       .005032     .0359502
       _cons |   -1.321598    .1388504     -9.52    0.000     -1.593739    -1.049456
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. **** male mediators of dose paid employment: bf8, age, illw3 ageXillw3
. scalar wkMedMw3 = "bf8 age illw3 ageXillw3"

.
. title4 "Female mediator models for dose-paid employment"
-------------
Female mediator models for dose-paid employment
-------------

. glm radhlw3 avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1798.7074

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

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

                                                   AIC             =  9.921253
Log likelihood   = -1798.707367                    BIC             =  425821.1

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    2.751602     1.03038      2.67    0.008      .7320943      4.77111
       _cons |    57.70689    2.190692     26.34    0.000      53.41321     62.00057
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =    395.05
Iteration 2:   deviance =  394.6898
Iteration 3:   deviance =  394.6898
Iteration 4:   deviance =  394.6898

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  394.6897802                    (1/df) Deviance =  1.093323
Pearson          =  364.9268795                    (1/df) Pearson  =  1.010878

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

                                                   BIC             =  -1733.19

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0091162    .0022772      4.00    0.000       .004653     .0135795
       _cons |   -1.244306    .1697735     -7.33    0.000     -1.577055    -.9115557
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. glm age avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood =  -1408.064

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

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

                                                   AIC             =  7.768948
Log likelihood   =  -1408.06405                    BIC             =  47606.63

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.058366    .3512614      3.01    0.003      .3699069     1.746826
       _cons |    48.94293    .7468173     65.54    0.000      47.47919     50.40666
-------------+----------------------------------------------------------------

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

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.)

. glm illw3 avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -562.81042

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

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

                                                   AIC             =  3.111903
Log likelihood   = -562.8104237                    BIC             = -1655.676

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .1284565    .0342268      3.75    0.000      .0613733     .1955398
       _cons |    .5563644    .0727696      7.65    0.000      .4137387     .6989902
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  410.7265
Iteration 2:   deviance =  410.1776
Iteration 3:   deviance =  410.1774
Iteration 4:   deviance =  410.1774

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  410.1774283                    (1/df) Deviance =  1.136226
Pearson          =  362.4869354                    (1/df) Pearson  =  1.004119

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

                                                   BIC             = -1717.702

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    .1024787    .0628325      1.63    0.103     -.0206709     .2256282
       _cons |   -.7324278     .090138     -8.13    0.000      -.909095    -.5557606
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * interaction of ageXillw3 impacts paid employment as mediator and moderator
. glm illw3 avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -562.81042

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

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

                                                   AIC             =  3.111903
Log likelihood   = -562.8104237                    BIC             = -1655.676

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .1284565    .0342268      3.75    0.000      .0613733     .1955398
       _cons |    .5563644    .0727696      7.65    0.000      .4137387     .6989902
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  392.5389
Iteration 2:   deviance =  391.8976
Iteration 3:   deviance =  391.8969
Iteration 4:   deviance =  391.8969
Iteration 5:   deviance =  391.8969

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  391.8968943                    (1/df) Deviance =  1.091635
Pearson          =  370.0301694                    (1/df) Pearson  =  1.030725

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

                                                   BIC             = -1724.194

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
   ageXillw3 |    .0187409    .0060019      3.12    0.002      .0069775     .0305044
       illw3 |   -.9562978     .343609     -2.78    0.005     -1.629759    -.2828366
avgcumdosew3 |    .0662197    .0429198      1.54    0.123     -.0179015      .150341
       _cons |     -.79789    .1001619     -7.97    0.000     -.9942036    -.6015764
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
.
.
.
. title4 "bf8 is a male mediator of paid employment"
-------------
bf8 is a male mediator of paid employment
-------------

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

. foreach var in `w3bf'{
  2. glm `var' avgcumdosew3 if gender==2, family(gaussian) link(identity)
  3. glm hp2work `var' illw3 avgcumdosew3  if gender==2, family(binomial) irls scale(dev) link(probit)
  4.
.
. }

Iteration 0:   log likelihood = -1647.6213

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

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

                                                   AIC             =  9.088823
Log likelihood   = -1647.621315                    BIC             =    184026

-------------+----------------------------------------------------------------
             |                 OIM
          bf1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.403532    .6795752      2.07    0.039      .0715889     2.735475
       _cons |    37.53913    1.444846     25.98    0.000      34.70728     40.37097
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  400.7858
Iteration 2:   deviance =  400.3649
Iteration 3:   deviance =  400.3647
Iteration 4:   deviance =  400.3647

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.3647141                    (1/df) Deviance =  1.115222
Pearson          =  362.3414503                    (1/df) Pearson  =  1.009308

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

                                                   BIC             = -1715.726

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf1 |    .0075263    .0035043      2.15    0.032      .0006579     .0143947
       illw3 |    .0566488    .0651687      0.87    0.385     -.0710796     .1843771
avgcumdosew3 |    .0748818    .0422562      1.77    0.076      -.007939     .1577025
       _cons |   -1.099425    .1680193     -6.54    0.000     -1.428737    -.7701136
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1109.6569

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

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

                                                   AIC             =  6.124831
Log likelihood   = -1109.656873                    BIC             =   7479.99

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.4386292    .1543885     -2.84    0.004     -.7412252    -.1360333
       _cons |    11.01475    .3282456     33.56    0.000       10.3714      11.6581
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  368.0458
Iteration 2:   deviance =  367.7561
Iteration 3:   deviance =  367.7558
Iteration 4:   deviance =  367.7558

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  367.7557582                    (1/df) Deviance =  1.024389
Pearson          =  356.2171479                    (1/df) Pearson  =  .9922483

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

                                                   BIC             = -1748.335

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0912403     .015392     -5.93    0.000     -.1214082    -.0610725
       illw3 |   -.0442384    .0678425     -0.65    0.514     -.1772072     .0887305
avgcumdosew3 |    .0676603     .041034      1.65    0.099     -.0127647     .1480854
       _cons |     .179333    .1922188      0.93    0.351     -.1974089     .5560748
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3335.9695

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

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

                                                   AIC             =  18.39102
Log likelihood   = -3335.969457                    BIC             =  2.04e+09

-------------+----------------------------------------------------------------
             |                 OIM
          bf2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -14.66006    71.15136     -0.21    0.837     -154.1142      124.794
       _cons |    2486.833     151.275     16.44    0.000       2190.34     2783.327
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  400.7561
Iteration 2:   deviance =  400.3769
Iteration 3:   deviance =  400.3768
Iteration 4:   deviance =  400.3768

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.3767744                    (1/df) Deviance =  1.115256
Pearson          =  362.4243987                    (1/df) Pearson  =  1.009539

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

                                                   BIC             = -1715.714

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf2 |    .0000693    .0000321      2.16    0.031      6.50e-06     .0001322
       illw3 |    .0579184    .0652264      0.89    0.375      -.069923     .1857598
avgcumdosew3 |    .0863439     .041937      2.06    0.040      .0041489      .168539
       _cons |   -.9883744    .1289169     -7.67    0.000     -1.241047    -.7357019
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1141.3116

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

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

                                                   AIC             =  6.299237
Log likelihood   = -1141.311602                    BIC             =  9310.664

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    -.441173    .1684561     -2.62    0.009      -.771341    -.1110051
       _cons |    18.82772    .3581548     52.57    0.000      18.12575     19.52969
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  376.2521
Iteration 2:   deviance =  376.1219
Iteration 3:   deviance =  376.1216
Iteration 4:   deviance =  376.1216
Iteration 5:   deviance =  376.1216

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  376.1216056                    (1/df) Deviance =  1.047692
Pearson          =   352.597962                    (1/df) Pearson  =   .982167

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

                                                   BIC             = -1739.969

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.0718043    .0138855     -5.17    0.000     -.0990193    -.0445893
       illw3 |   -.0199722      .06741     -0.30    0.767     -.1520934      .112149
avgcumdosew3 |     .070842    .0412807      1.72    0.086     -.0100667     .1517506
       _cons |    .5296971    .2777901      1.91    0.057     -.0147615     1.074156
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2474.3315

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

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

                                                   AIC             =   13.6437
Log likelihood   = -2474.331507                    BIC             =  1.77e+07

-------------+----------------------------------------------------------------
             |                 OIM
         bf5m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    11.51759    6.626993      1.74    0.082     -1.471077     24.50626
       _cons |    146.1251    14.08966     10.37    0.000      118.5098     173.7403
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  406.0898
Iteration 2:   deviance =  405.5971
Iteration 3:   deviance =  405.5969
Iteration 4:   deviance =  405.5969
Iteration 5:   deviance =  405.5969

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  405.5968814                    (1/df) Deviance =  1.129796
Pearson          =  362.2771278                    (1/df) Pearson  =  1.009128

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

                                                   BIC             = -1710.494

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf5m |    .0000253     .000346      0.07    0.942     -.0006528     .0007034
       illw3 |    .0757307    .0648804      1.17    0.243     -.0514326      .202894
avgcumdosew3 |    .0816456    .0425803      1.92    0.055     -.0018103     .1651014
       _cons |   -.8200136    .1118444     -7.33    0.000     -1.039225    -.6008026
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2919.8803

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

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

                                                   AIC             =  16.09851
Log likelihood   = -2919.880264                    BIC             =  2.06e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf7m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -9.882168    22.61375     -0.44    0.662     -54.20431     34.43997
       _cons |    1192.342    48.07913     24.80    0.000      1098.109     1286.575
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  405.7923
Iteration 2:   deviance =  405.3032
Iteration 3:   deviance =   405.303
Iteration 4:   deviance =   405.303

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  405.3030164                    (1/df) Deviance =  1.128978
Pearson          =  362.1616249                    (1/df) Pearson  =  1.008807

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

                                                   BIC             = -1710.788

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf7m |   -.0000542    .0001026     -0.53    0.598     -.0002553      .000147
       illw3 |    .0715496    .0653324      1.10    0.273     -.0564996     .1995988
avgcumdosew3 |    .0819746    .0424018      1.93    0.053     -.0011314     .1650805
       _cons |   -.7500788    .1604213     -4.68    0.000     -1.064499    -.4356588
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3888.8378

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  1.19e+08
Deviance         =  4.29211e+10                    (1/df) Deviance =  1.19e+08
Pearson          =  4.29211e+10                    (1/df) Pearson  =  1.19e+08

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

                                                   AIC             =  21.43712
Log likelihood   =  -3888.83781                    BIC             =  4.29e+10

-------------+----------------------------------------------------------------
             |                 OIM
          bf8 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    474.4107    326.3149      1.45    0.146     -165.1547     1113.976
       _cons |    5499.472    693.7785      7.93    0.000      4139.691     6859.253
-------------+----------------------------------------------------------------

Iteration 1:   deviance =   406.001
Iteration 2:   deviance =  405.5105
Iteration 3:   deviance =  405.5103
Iteration 4:   deviance =  405.5103

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   405.510287                    (1/df) Deviance =  1.129555
Pearson          =  362.2128945                    (1/df) Pearson  =   1.00895

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

                                                   BIC             =  -1710.58

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf8 |    2.02e-06    6.97e-06      0.29    0.772     -.0000116     .0000157
       illw3 |    .0763832    .0648403      1.18    0.239     -.0507015     .2034678
avgcumdosew3 |    .0810208    .0425231      1.91    0.057     -.0023229     .1643645
       _cons |   -.8280872    .1080894     -7.66    0.000     -1.039939    -.6162358
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2865.4294

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

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

                                                   AIC             =  15.79851
Log likelihood   =  -2865.42935                    BIC             =  1.53e+08

-------------+----------------------------------------------------------------
             |                 OIM
        bf15m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -16.31159    19.46379     -0.84    0.402     -54.45991     21.83674
       _cons |    119.7135    41.38199      2.89    0.004      38.60629     200.8207
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  403.0022
Iteration 2:   deviance =  401.3838
Iteration 3:   deviance =  400.8551
Iteration 4:   deviance =  400.4877
Iteration 5:   deviance =  400.1075
Iteration 6:   deviance =  399.7784
Iteration 7:   deviance =  399.6168
Iteration 8:   deviance =  399.5208
Iteration 9:   deviance =  399.4454
Iteration 10:  deviance =  399.3984
Iteration 11:  deviance =  399.3819
Iteration 12:  deviance =  399.3763
Iteration 13:  deviance =  399.3744
Iteration 14:  deviance =  399.3737
Iteration 15:  deviance =  399.3734
Iteration 16:  deviance =  399.3733
Iteration 17:  deviance =  399.3732
Iteration 18:  deviance =  399.3732
Iteration 19:  deviance =  399.3732
Iteration 20:  deviance =  399.3732
Iteration 21:  deviance =  399.3732
Iteration 22:  deviance =  399.3732
Iteration 23:  deviance =  399.3732
Iteration 24:  deviance =  399.3732
Iteration 25:  deviance =  399.3732
Iteration 26:  deviance =  399.3732
Iteration 27:  deviance =  399.3732
Iteration 28:  deviance =  399.3732
Iteration 29:  deviance =  399.3732

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  399.3731679                    (1/df) Deviance =   1.11246
Pearson          =   350.463985                    (1/df) Pearson  =  .9762228

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

                                                   BIC             = -1716.717

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       bf15m |   -.0185517    .1405693     -0.13    0.895     -.2940624     .2569591
       illw3 |    .0637593     .064584      0.99    0.324     -.0628231     .1903417
avgcumdosew3 |    .0795244    .0419333      1.90    0.058     -.0026634     .1617122
       _cons |    -.779424    .1009676     -7.72    0.000     -.9773168    -.5815312
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3826.3372

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  8.43e+07
Deviance         =  3.04172e+10                    (1/df) Deviance =  8.43e+07
Pearson          =  3.04172e+10                    (1/df) Pearson  =  8.43e+07

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

                                                   AIC             =  21.09277
Log likelihood   = -3826.337161                    BIC             =  3.04e+10

-------------+----------------------------------------------------------------
             |                 OIM
         bf17 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -210.5363    274.7014     -0.77    0.443     -748.9411     327.8686
       _cons |    1283.326     584.043      2.20    0.028      138.6227     2428.029
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  404.4868
Iteration 2:   deviance =  403.3612
Iteration 3:   deviance =  403.0401
Iteration 4:   deviance =  402.7883
Iteration 5:   deviance =  402.5042
Iteration 6:   deviance =  402.3328
Iteration 7:   deviance =  402.2311
Iteration 8:   deviance =  402.1401
Iteration 9:   deviance =  402.0781
Iteration 10:  deviance =  402.0571
Iteration 11:  deviance =    402.05
Iteration 12:  deviance =  402.0475
Iteration 13:  deviance =  402.0467
Iteration 14:  deviance =  402.0463
Iteration 15:  deviance =  402.0462
Iteration 16:  deviance =  402.0462
Iteration 17:  deviance =  402.0462
Iteration 18:  deviance =  402.0461
Iteration 19:  deviance =  402.0461
Iteration 20:  deviance =  402.0461
Iteration 21:  deviance =  402.0461
Iteration 22:  deviance =  402.0461
Iteration 23:  deviance =  402.0461
Iteration 24:  deviance =  402.0461
Iteration 25:  deviance =  402.0461

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  402.0461284                    (1/df) Deviance =  1.119906
Pearson          =  355.4109876                    (1/df) Pearson  =  .9900028

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

                                                   BIC             = -1714.044

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf17 |   -.0009418    .0098647     -0.10    0.924     -.0202762     .0183926
       illw3 |    .0690879    .0646796      1.07    0.285     -.0576818     .1958576
avgcumdosew3 |    .0802034    .0421293      1.90    0.057     -.0023685     .1627752
       _cons |   -.7949403    .1007866     -7.89    0.000     -.9924784    -.5974022
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1708.7675

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

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

                                                   AIC             =  9.425716
Log likelihood   = -1708.767472                    BIC             =  258597.4

-------------+----------------------------------------------------------------
             |                 OIM
         bf20 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.430073    .8042536      1.78    0.075     -.1462347     3.006382
       _cons |    75.65323    1.709925     44.24    0.000      72.30184     79.00463
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  400.9177
Iteration 2:   deviance =  400.4591
Iteration 3:   deviance =  400.4589
Iteration 4:   deviance =  400.4589

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.4588662                    (1/df) Deviance =  1.115484
Pearson          =  362.8847271                    (1/df) Pearson  =  1.010821

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

                                                   BIC             = -1715.632

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf20 |    .0064287    .0030571      2.10    0.035      .0004369     .0124206
       illw3 |    .0564777    .0651612      0.87    0.386     -.0712358     .1841913
avgcumdosew3 |    .0763386    .0422654      1.81    0.071     -.0065001     .1591772
       _cons |   -1.303581    .2556066     -5.10    0.000     -1.804561    -.8026017
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3441.3735

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  1.01e+07
Deviance         =   3647330298                    (1/df) Deviance =  1.01e+07
Pearson          =   3647330298                    (1/df) Pearson  =  1.01e+07

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

                                                   AIC             =  18.97175
Log likelihood   = -3441.373501                    BIC             =  3.65e+09

-------------+----------------------------------------------------------------
             |                 OIM
         bf22 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    198.9575    95.12376      2.09    0.036      12.51832     385.3966
       _cons |    3099.215    202.2427     15.32    0.000      2702.826     3495.603
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  404.7126
Iteration 2:   deviance =  404.2497
Iteration 3:   deviance =  404.2495
Iteration 4:   deviance =  404.2495

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  404.2495058                    (1/df) Deviance =  1.126043
Pearson          =  361.0837357                    (1/df) Pearson  =  1.005804

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

                                                   BIC             = -1711.841

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf22 |    .0000268    .0000236      1.14    0.256     -.0000194      .000073
       illw3 |    .0662768    .0652813      1.02    0.310     -.0616722     .1942257
avgcumdosew3 |    .0787126    .0424878      1.85    0.064      -.004562     .1619871
       _cons |   -.8976713    .1234173     -7.27    0.000     -1.139565    -.6557778
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3484.9822

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  1.28e+07
Deviance         =   4637909003                    (1/df) Deviance =  1.28e+07
Pearson          =   4637909003                    (1/df) Pearson  =  1.28e+07

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

                                                   AIC             =  19.21202
Log likelihood   = -3484.982169                    BIC             =  4.64e+09

-------------+----------------------------------------------------------------
             |                 OIM
         bf29 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    40.03151    107.2661      0.37    0.709     -170.2062     250.2692
       _cons |    265.9396    228.0586      1.17    0.244     -181.0471     712.9263
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  405.4201
Iteration 2:   deviance =   404.937
Iteration 3:   deviance =  404.9369
Iteration 4:   deviance =  404.9369

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  404.9368816                    (1/df) Deviance =  1.127958
Pearson          =  362.1381099                    (1/df) Pearson  =  1.008741

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

                                                   BIC             = -1711.154

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf29 |     .000015    .0000199      0.75    0.452     -.0000241      .000054
       illw3 |    .0693319    .0654643      1.06    0.290     -.0589757     .1976395
avgcumdosew3 |    .0823559    .0423081      1.95    0.052     -.0005665     .1652783
       _cons |   -.8176021    .1003576     -8.15    0.000     -1.014299    -.6209049
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2855.9026

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

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

                                                   AIC             =  15.74602
Log likelihood   = -2855.902622                    BIC             =  1.45e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf30 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    45.42508    18.95962      2.40    0.017      8.264914     82.58525
       _cons |     474.094    40.31007     11.76    0.000      395.0877     553.1003
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  403.2568
Iteration 2:   deviance =  402.8398
Iteration 3:   deviance =  402.8396
Iteration 4:   deviance =  402.8396
Iteration 5:   deviance =  402.8396

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  402.8396329                    (1/df) Deviance =  1.122116
Pearson          =  362.9011676                    (1/df) Pearson  =  1.010867

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

                                                   BIC             = -1713.251

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf30 |    .0001877    .0001196      1.57    0.116     -.0000466     .0004221
       illw3 |    .0850723     .065274      1.30    0.192     -.0428624     .2130069
avgcumdosew3 |    .0727348    .0430132      1.69    0.091     -.0115696     .1570391
       _cons |   -.9155104    .1202543     -7.61    0.000     -1.151204    -.6798163
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -818.14796

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

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

                                                   AIC             =  4.518722
Log likelihood   = -818.1479598                    BIC             = -199.8996

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .152897    .0691596      2.21    0.027      .0173466     .2884474
       _cons |    2.981537    .1470404     20.28    0.000      2.693343     3.269731
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  401.3653
Iteration 2:   deviance =  400.9889
Iteration 3:   deviance =  400.9888
Iteration 4:   deviance =  400.9888

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.9887605                    (1/df) Deviance =   1.11696
Pearson          =  359.9660415                    (1/df) Pearson  =  1.002691

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

                                                   BIC             = -1715.102

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .0689094    .0331691      2.08    0.038      .0038992     .1339195
       illw3 |    .0376887    .0670381      0.56    0.574     -.0937035     .1690809
avgcumdosew3 |    .0782343    .0423534      1.85    0.065     -.0047769     .1612455
       _cons |   -1.010896      .13795     -7.33    0.000     -1.281273    -.7405191
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

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

. scalar list
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
  wkMedFw3 = radhlw3 age bf40 bf4m bf1
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

.
.
.
.
.
. *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
. *------  Chunk 3    Dose=> hp2hmcare impact for males and females
. *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.
. title "2.  Wave 3 part2  H1: dose home care relationship " ///
>  " Wave 3 Dose -  HP2home care Main effects identification"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****         2.  Wave 3 part2  H1: dose home care relationship           *****
*****       Wave 3 Dose -  HP2home care Main effects identification       *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:43:44  *****
*******************************************************************************
*******************************************************************************


.
. *  review of general model for men and women
.
. forvalues j=3/3 {
  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.
.         forvalues k=1/2 {
  6.   local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  7.    title  "chunk 3 H1 test pt 2 :Gender= `k'  model Wave =  `j' for `e(depvar)' "
  8.                 di _skip(4)
  9.
.
.       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' radhlw3 ///
>                 illw`j' shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j' ///
>                  havmilsq if gender==`k', coef  difficult iterate(50)
 10.                         estat class
 11.                         estat gof
 12.                         fitstat
 13. }
 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 1  model Wave =  3 for hp2work      *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:43:44  *****
*******************************************************************************
*******************************************************************************


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

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

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

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

note: _Ieduc_7 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: radhlw3 omitted because of collinearity

Logistic regression                               Number of obs   =        315
                                                  LR chi2(48)     =     139.93
                                                  Prob > chi2     =     0.0000
Log likelihood = -96.893664                       Pseudo R2       =     0.4193

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0323974    .0293162      1.11    0.269     -.0250612      .089856
    _Ieduc_2 |   -4.152531    2.287775     -1.82    0.070     -8.636488     .3314257
    _Ieduc_3 |   -1.864493    1.608696     -1.16    0.246     -5.017479     1.288493
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -1.404302     1.64491     -0.85    0.393     -4.628265     1.819662
    _Ieduc_6 |   -2.017048     1.54335     -1.31    0.191     -5.041958     1.007861
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -11.82929    1296.263     -0.01    0.993     -2552.458     2528.799
      occ2w3 |   -11.65702    1296.263     -0.01    0.993     -2552.286     2528.971
      occ3w3 |   -12.78325    1296.263     -0.01    0.992     -2553.412     2527.846
      occ4w3 |   -10.84152    1296.263     -0.01    0.993      -2551.47     2529.787
      occ5w3 |   -10.72665    1296.263     -0.01    0.993     -2551.356     2529.903
      occ6w3 |           0   (omitted)
      occ7w3 |   -11.31316    1296.263     -0.01    0.993     -2551.942     2529.316
      occ8w3 |           0   (omitted)
     marrw31 |    .3643704    1.429352      0.25    0.799     -2.437107     3.165848
     marrw32 |   -2.206121    1.844343     -1.20    0.232     -5.820966     1.408725
     marrw33 |   -.7934545    1.390519     -0.57    0.568     -3.518821     1.931912
     marrw35 |   -.2775718    1.556356     -0.18    0.858     -3.327973     2.772829
     marrw36 |           0   (omitted)
      inc1w3 |    14.70395    1296.262      0.01    0.991     -2525.924     2555.332
      inc2w3 |    14.77269    1296.262      0.01    0.991     -2525.855       2555.4
      inc3w3 |    14.57764    1296.262      0.01    0.991      -2526.05     2555.205
      inc4w3 |    15.74154    1296.263      0.01    0.990     -2524.886      2556.37
     radhlw3 |    .0078686    .0080582      0.98    0.329      -.007925     .0236623
      havmil |    .0027954    .0078952      0.35    0.723     -.0126789     .0182698
avgcumdosew3 |    .0057068    .0769937      0.07    0.941     -.1451981     .1566117
         bf1 |   -.0445389    .0484618     -0.92    0.358     -.1395224     .0504446
         bf4 |   -.0327423    .2796012     -0.12    0.907     -.5807506      .515266
         bf2 |    .0000822    .0001677      0.49    0.624     -.0002465     .0004108
        bf4m |    -.341802    .2609957     -1.31    0.190     -.8533441     .1697402
        bf5m |    .0012439    .0017995      0.69    0.489     -.0022831     .0047709
        bf7m |    .0005614    .0005422      1.04    0.300     -.0005013     .0016241
         bf8 |   -.0000499    .0000448     -1.11    0.265     -.0001376     .0000379
       bf15m |   -.0000712    .0003918     -0.18    0.856     -.0008391     .0006966
        bf17 |           0   (omitted)
        bf20 |     .019063    .0407736      0.47    0.640     -.0608518     .0989778
        bf22 |    .0000146    .0001733      0.08    0.933     -.0003251     .0003543
        bf29 |    .0000124    .0000229      0.54    0.589     -.0000325     .0000572
        bf30 |    -.000416    .0004185     -0.99    0.320     -.0012364     .0004043
        bf40 |    .1486565    .2411791      0.62    0.538     -.3240459     .6213588
       deaw3 |   -.6566764    .3112091     -2.11    0.035     -1.266635    -.0467177
      dvcew3 |    .7731044    1.122755      0.69    0.491     -1.427455     2.973664
      sepaw3 |    .1659839    1.359372      0.12    0.903     -2.498337     2.830305
      accdw3 |    .7493757    .6472786      1.16    0.247      -.519267     2.018018
      movew3 |    .9688514    .5333557      1.82    0.069     -.0765066     2.014209
     radhlw3 |           0   (omitted)
       illw3 |    .2806377    .2813528      1.00    0.319     -.2708037      .832079
     shfamw3 |    .0045809    .0088802      0.52    0.606     -.0128239     .0219857
      shhlw3 |   -.0144819       .0077     -1.88    0.060     -.0295736     .0006098
     shjobw3 |   -.0101653    .0077745     -1.31    0.191     -.0254031     .0050725
    shrelaw3 |   -.0092584    .0083742     -1.11    0.269     -.0256716     .0071547
     suprtw3 |   -.0009401    .0080071     -0.12    0.907     -.0166337     .0147535
     suchrw3 |    -.004683    .0069496     -0.67    0.500     -.0183041      .008938
    havmilsq |   -7.50e-06    .0000145     -0.52    0.604     -.0000359     .0000209
       _cons |    3.229911    4.235709      0.76    0.446     -5.071927     11.53175
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        37            14  |         51
     -     |        33           231  |        264
-----------+--------------------------+-----------
   Total   |        70           245  |        315

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   52.86%
Specificity                     Pr( -|~D)   94.29%
Positive predictive value       Pr( D| +)   72.55%
Negative predictive value       Pr(~D| -)   87.50%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.71%
False - rate for true D         Pr( -| D)   47.14%
False + rate for classified +   Pr(~D| +)   27.45%
False - rate for classified -   Pr( D| -)   12.50%
--------------------------------------------------
Correctly classified                        85.08%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       315
 number of covariate patterns =       315
            Pearson chi2(266) =       247.97
                  Prob > chi2 =         0.7796

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -166.857     Log-Lik Full Model:          -96.894
D(258):                      193.787     LR(48):                      139.928
                                         Prob > LR:                     0.000
McFadden's R2:                 0.419     McFadden's Adj R2:             0.078
Maximum Likelihood R2:         0.359     Cragg & Uhler's R2:            0.549
McKelvey and Zavoina's R2:     0.758     Efron's R2:                    0.437
Variance of y*:               13.609     Variance of error:             3.290
Count R2:                      0.851     Adj Count R2:                  0.329
AIC:                           0.977     AIC*n:                       307.787
BIC:                       -1290.376     BIC':                        136.196


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  chunk 3 H1 test pt 2 :Gender= 2  model Wave =  3 for HP2hmcare     *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:43:46  *****
*******************************************************************************
*******************************************************************************


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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

note: bf29 != 0 predicts success perfectly
      bf29 dropped and 4 obs not used

note: _Ieduc_8 omitted because of collinearity
note: radhlw3 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        353
                                                  LR chi2(50)     =     144.83
                                                  Prob > chi2     =     0.0000
Log likelihood = -154.51255                       Pseudo R2       =     0.3191

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0784129    .0199184      3.94    0.000      .0393735     .1174522
    _Ieduc_2 |   -16.15888     2.72009     -5.94    0.000     -21.49016     -10.8276
    _Ieduc_3 |   -16.70929    2.647033     -6.31    0.000     -21.89738     -11.5212
    _Ieduc_4 |   -15.65931    2.672964     -5.86    0.000     -20.89823     -10.4204
    _Ieduc_5 |   -16.93546    2.621945     -6.46    0.000     -22.07438    -11.79654
    _Ieduc_6 |   -17.12993    2.678622     -6.40    0.000     -22.37993    -11.87993
    _Ieduc_7 |    -16.6826    3.290952     -5.07    0.000     -23.13274    -10.23245
    _Ieduc_8 |           0   (omitted)
      occ1w3 |    -17.5089    2870.034     -0.01    0.995     -5642.673     5607.655
      occ2w3 |   -17.42465    2870.034     -0.01    0.995     -5642.589     5607.739
      occ3w3 |   -17.38618    2870.034     -0.01    0.995      -5642.55     5607.778
      occ4w3 |   -17.97919    2870.035     -0.01    0.995     -5643.144     5607.185
      occ5w3 |   -16.19886    2870.035     -0.01    0.995     -5641.365     5608.967
      occ6w3 |           0   (omitted)
      occ7w3 |   -17.37679    2870.034     -0.01    0.995     -5642.541     5607.787
      occ8w3 |           0   (omitted)
     marrw31 |    .1254457    1.662878      0.08    0.940     -3.133735     3.384627
     marrw32 |     .689276     1.96339      0.35    0.726     -3.158897     4.537449
     marrw33 |    1.411752    1.537008      0.92    0.358     -1.600728     4.424232
     marrw35 |    .6824445    1.564972      0.44    0.663     -2.384844     3.749733
     marrw36 |    .9604788    1.548632      0.62    0.535     -2.074784     3.995742
      inc1w3 |    18.76205    2870.034      0.01    0.995     -5606.402     5643.926
      inc2w3 |    18.64464    2870.034      0.01    0.995     -5606.519     5643.809
      inc3w3 |    18.13548    2870.034      0.01    0.995     -5607.029       5643.3
      inc4w3 |    18.63139    2870.035      0.01    0.995     -5606.533     5643.796
     radhlw3 |   -.0056373    .0071331     -0.79    0.429     -.0196178     .0083433
      havmil |    .0003358    .0026887      0.12    0.901      -.004934     .0056056
avgcumdosew3 |   -.1458758    .0962788     -1.52    0.130     -.3345788     .0428272
         bf1 |   -.0155334    .0271811     -0.57    0.568     -.0688074     .0377407
         bf4 |   -.4865728    .1784134     -2.73    0.006     -.8362568    -.1368889
         bf2 |    .0000926    .0001019      0.91    0.364     -.0001072     .0002923
        bf4m |    .3213367    .1603015      2.00    0.045      .0071515      .635522
        bf5m |    -.000883    .0014167     -0.62    0.533     -.0036598     .0018937
        bf7m |    .0002998     .000443      0.68    0.499     -.0005684      .001168
         bf8 |    6.84e-06    .0000322      0.21    0.832     -.0000563       .00007
       bf15m |   -.0163741    .5454805     -0.03    0.976     -1.085496     1.052748
        bf17 |    .0008202     .027274      0.03    0.976     -.0526359     .0542763
        bf20 |      .00093    .0215397      0.04    0.966      -.041287      .043147
        bf22 |   -.0000872    .0001081     -0.81    0.420     -.0002991     .0001247
        bf29 |           0   (omitted)
        bf30 |    .0000251    .0002916      0.09    0.931     -.0005465     .0005967
        bf40 |    .1300079    .1227916      1.06    0.290     -.1106593     .3706751
       deaw3 |    .0165155    .1614822      0.10    0.919     -.2999837     .3330147
      dvcew3 |    .6982802    .7163028      0.97    0.330     -.7056474     2.102208
      sepaw3 |   -.4992309    .8307882     -0.60    0.548     -2.127546     1.129084
      accdw3 |   -.1706856    .4639657     -0.37    0.713     -1.080042     .7386705
      movew3 |   -.4464406    1.157043     -0.39    0.700     -2.714203     1.821322
     radhlw3 |           0   (omitted)
       illw3 |   -.0890834    .1513588     -0.59    0.556     -.3857412     .2075743
     shfamw3 |   -.0035626    .0062149     -0.57    0.566     -.0157435     .0086183
      shhlw3 |    .0080043    .0056769      1.41    0.159     -.0031221     .0191308
     shjobw3 |   -.0042351    .0058007     -0.73    0.465     -.0156043     .0071341
    shrelaw3 |   -.0103149    .0062344     -1.65    0.098      -.022534     .0019042
     suprtw3 |   -.0017061    .0061593     -0.28    0.782     -.0137782      .010366
     suchrw3 |   -.0030007    .0044692     -0.67    0.502     -.0117602     .0057587
    havmilsq |   -1.55e-06    2.58e-06     -0.60    0.549     -6.61e-06     3.52e-06
       _cons |    10.07155           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        76            29  |        105
     -     |        45           203  |        248
-----------+--------------------------+-----------
   Total   |       121           232  |        353

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   62.81%
Specificity                     Pr( -|~D)   87.50%
Positive predictive value       Pr( D| +)   72.38%
Negative predictive value       Pr(~D| -)   81.85%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   12.50%
False - rate for true D         Pr( -| D)   37.19%
False + rate for classified +   Pr(~D| +)   27.62%
False - rate for classified -   Pr( D| -)   18.15%
--------------------------------------------------
Correctly classified                        79.04%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       353
 number of covariate patterns =       353
            Pearson chi2(301) =       338.41
                  Prob > chi2 =         0.0677

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -226.929     Log-Lik Full Model:         -154.513
D(296):                      309.025     LR(50):                      144.834
                                         Prob > LR:                     0.000
McFadden's R2:                 0.319     McFadden's Adj R2:             0.068
Maximum Likelihood R2:         0.337     Cragg & Uhler's R2:            0.465
McKelvey and Zavoina's R2:     0.954     Efron's R2:                    0.369
Variance of y*:               71.431     Variance of error:             3.290
Count R2:                      0.790     Adj Count R2:                  0.388
AIC:                           1.198     AIC*n:                       423.025
BIC:                       -1427.449     BIC':                        148.490

.
.   title4 "Male Main effects model for dose=> homcare wave 3"
-------------
Male Main effects model for dose=> homcare wave 3
-------------

.   logit hp2hmcare age radhlw3 avgcumdosew3 bf4 bf4m bf40 if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -133.30015
Iteration 2:   log likelihood = -130.66001
Iteration 3:   log likelihood = -130.56564
Iteration 4:   log likelihood = -130.56534
Iteration 5:   log likelihood = -130.56534

Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      84.62
                                                  Prob > chi2     =     0.0000
Log likelihood = -130.56534                       Pseudo R2       =     0.2447

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0212427    .0145356      1.46    0.144     -.0072466     .0497319
     radhlw3 |   -.0004747    .0052658     -0.09    0.928     -.0107954     .0098461
avgcumdosew3 |    .0109468     .049766      0.22    0.826     -.0865928     .1084864
         bf4 |   -.0254029    .2104548     -0.12    0.904     -.4378867     .3870809
        bf4m |    -.172073      .19389     -0.89    0.375     -.5520905     .2079444
        bf40 |    .1415116    .0924687      1.53    0.126     -.0397237     .3227469
       _cons |    .7537844    1.701465      0.44    0.658     -2.581025     4.088594
-------------+----------------------------------------------------------------

.
. di as input "Male trimmed model for dose-home care impact in wv 3: dose not signif"
Male trimmed model for dose-home care impact in wv 3: dose not signif

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

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

.
. scalar SigDoseHmcareMw3 = "no"

. scalar MainEffhmcareMw3= "none"

. scalar list
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
  wkMedFw3 = radhlw3 age bf40 bf4m bf1
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

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

. logit hp2hmcare age radhlw3 avgcumdosew3 ageXd3 illw3 if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -149.81879
Iteration 2:   log likelihood = -148.25194
Iteration 3:   log likelihood = -148.24243
Iteration 4:   log likelihood = -148.24243

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      49.26
                                                  Prob > chi2     =     0.0000
Log likelihood = -148.24243                       Pseudo R2       =     0.1425

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0437867    .0172121      2.54    0.011      .0100515     .0775219
     radhlw3 |    .0144867    .0043947      3.30    0.001      .0058733     .0231002
avgcumdosew3 |    .3109469    .7827747      0.40    0.691     -1.223263     1.845157
      ageXd3 |   -.0057849    .0134227     -0.43    0.666     -.0320929      .020523
       illw3 |      .40549    .1399082      2.90    0.004      .1312749      .679705
       _cons |   -4.648689    .9666744     -4.81    0.000     -6.543336    -2.754042
-------------+----------------------------------------------------------------

. cap gen radhlw3Xillw3 = radhlw3*illw3

. cap drop radhlw3Xd1

. cap gen radhlw3Xd3 = radhlw3*avgcumdosew3

. cap drop illw3Xd1

. cap gen illw3Xd3 = illw3*avgcumdosew3

.
.
. * there are no significant moderators for male dose=hmcare relationship
. scalar hmcareModMw3 = "none"

.
. *---------   Male moderator tests for Dose-Hmcare in wave 3: --------------------
.
. title "Dose-home care impact relationship reveals no male moderators"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   Dose-home care impact relationship reveals no male moderators     *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:43:51  *****
*******************************************************************************
*******************************************************************************


. logit hp2hmcare radhlw3 avgcumdosew3 illw3 radhlw3Xillw3 radhlw3Xd3 illw3Xd3 ///
>    if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -153.71153
Iteration 2:   log likelihood = -152.25962
Iteration 3:   log likelihood = -152.22817
Iteration 4:   log likelihood = -152.22779
Iteration 5:   log likelihood = -152.22779

Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      41.29
                                                  Prob > chi2     =     0.0000
Log likelihood = -152.22779                       Pseudo R2       =     0.1194

--------------+----------------------------------------------------------------
     hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
--------------+----------------------------------------------------------------
      radhlw3 |    .0200281    .0064545      3.10    0.002      .0073775     .0326787
 avgcumdosew3 |   -.1252158    .2932467     -0.43    0.669     -.6999688     .4495372
        illw3 |     .677266    .2824634      2.40    0.016      .1236479     1.230884
radhlw3Xillw3 |   -.0042432    .0039636     -1.07    0.284     -.0120118     .0035254
   radhlw3Xd3 |    .0007389    .0042983      0.17    0.864     -.0076857     .0091635
     illw3Xd3 |    .0384326    .0812891      0.47    0.636      -.120891     .1977563
        _cons |   -2.652783    .4389838     -6.04    0.000     -3.513175    -1.792391
--------------+----------------------------------------------------------------

. estat gof


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       306
            Pearson chi2(299) =       319.87
                  Prob > chi2 =         0.1945

. estat class

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         8             5  |         13
     -     |        62           265  |        327
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   11.43%
Specificity                     Pr( -|~D)   98.15%
Positive predictive value       Pr( D| +)   61.54%
Negative predictive value       Pr(~D| -)   81.04%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.85%
False - rate for true D         Pr( -| D)   88.57%
False + rate for classified +   Pr(~D| +)   38.46%
False - rate for classified -   Pr( D| -)   18.96%
--------------------------------------------------
Correctly classified                        80.29%
--------------------------------------------------

. fitstat

Measures of Fit for logit of hp2hmcare

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -152.228
D(333):                      304.456     LR(6):                        41.290
                                         Prob > LR:                     0.000
McFadden's R2:                 0.119     McFadden's Adj R2:             0.079
Maximum Likelihood R2:         0.114     Cragg & Uhler's R2:            0.179
McKelvey and Zavoina's R2:     0.208     Efron's R2:                    0.130
Variance of y*:                4.154     Variance of error:             3.290
Count R2:                      0.803     Adj Count R2:                  0.043
AIC:                           0.937     AIC*n:                       318.456
BIC:                       -1636.583     BIC':                         -6.317

.
.
. title "testing female moderators for hp2hmcare"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              testing female moderators for hp2hmcare                *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:43:52  *****
*******************************************************************************
*******************************************************************************


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

. * Dose work relationship for females in wave 3 washes out also
. set more off

. forvalues j=3/3 {
  2. di _skip(4)
  3. di as input "For females hp2hmcare on wave 1 with dose ns"
  4. des  age   avgcumdosew`j' `w3bf'
  5. sw, pr(.1) : logistic HP2work  age ageXd3 havmilsq  radhlw3 ///
>    avgcumdosew3 shhlw`j' shjobw`j' shrelaw`j' suprtw`j' if gender==2, coef
  6. estat gof
  7. estat class
  8. fitstat
  9. }

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


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


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


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


bf2               float    %9.0g                        bf2 = max(0, efradw3 - 1.61252E-006) * bf1


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


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


bf7m              float    %9.0g                        bf7m = max(0, radtlw3 - 2.12558E-007) * bf4m


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


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


bf17              float    %9.0g                        bf17 = max(0, 20 - ecprw3) * bf15m


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


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


bf29              float    %9.0g                        bf29 = max(0, 18 - CSsocspt) * bf8


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.9182 >= 0.1000  removing suprtw3


p = 0.7426 >= 0.1000  removing ageXd3


p = 0.6508 >= 0.1000  removing shjobw3


p = 0.5093 >= 0.1000  removing havmilsq


p = 0.2667 >= 0.1000  removing avgcumdosew3


p = 0.1760 >= 0.1000  removing shrelaw3


Logistic regression                               Number of obs   =        362
                                                  LR chi2(3)      =      53.20
                                                  Prob > chi2     =     0.0000
Log likelihood = -179.66436                       Pseudo R2       =     0.1290

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0620088    .0121491      5.10    0.000       .038197     .0858205
     radhlw3 |    .0094571    .0040894      2.31    0.021       .001442     .0174723
      shhlw3 |    .0071506    .0039107      1.83    0.067     -.0005143     .0148155
       _cons |    -5.23516    .6896916     -7.59    0.000     -6.586931     -3.88339
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       324
            Pearson chi2(320) =       354.73
                  Prob > chi2 =         0.0882

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        25            10  |         35
     -     |        68           259  |        327
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   26.88%
Specificity                     Pr( -|~D)   96.28%
Positive predictive value       Pr( D| +)   71.43%
Negative predictive value       Pr(~D| -)   79.20%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.72%
False - rate for true D         Pr( -| D)   73.12%
False + rate for classified +   Pr(~D| +)   28.57%
False - rate for classified -   Pr( D| -)   20.80%
--------------------------------------------------
Correctly classified                        78.45%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -179.664
D(358):                      359.329     LR(3):                        53.203
                                         Prob > LR:                     0.000
McFadden's R2:                 0.129     McFadden's Adj R2:             0.110
Maximum Likelihood R2:         0.137     Cragg & Uhler's R2:            0.201
McKelvey and Zavoina's R2:     0.221     Efron's R2:                    0.167
Variance of y*:                4.223     Variance of error:             3.290
Count R2:                      0.785     Adj Count R2:                  0.161
AIC:                           1.015     AIC*n:                       367.329
BIC:                       -1749.880     BIC':                        -35.529

.
. scalar SigdoseHmcareFw3="no"

.
. * capturing significant vars to test as moderators
. local cn4: colnames(e(b))

. di "`cn4'"
age radhlw3 shhlw3 _cons

. local leng4 = length( "`cn4'")

. di `leng4'
24

. local leng4b `leng4'-6

. di `leng3b'


. local nuvlist4 = substr("`cn4'",4,`leng4b')

. di "`nuvlist4'"
radhlw3 shhlw3 _c

. local rhsvars4 = "`nuvlist4'"

. local nuvlist4= "`nuvlist4'"

. local nuvlist4= substr("`cn4'",1,`leng4b')

. di "`nuvlist4'"
age radhlw3 shhlw3

.
. cap gen shhlw3Xd3 = shhlw3*avgcumdosew3

.
. title "No sig female moderators for dose-hmcare impact are found here"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   No sig female moderators for dose-hmcare impact are found here    *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:02  *****
*******************************************************************************
*******************************************************************************


. logit hp2hmcare age shhlw3  avgcumdosew3 ageXd3 shhlw3Xd3 if gender==2

Iteration 0:   log likelihood = -233.72859
Iteration 1:   log likelihood = -194.59265
Iteration 2:   log likelihood =  -193.8132
Iteration 3:   log likelihood =  -193.8113
Iteration 4:   log likelihood =  -193.8113

Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =      79.83
                                                  Prob > chi2     =     0.0000
Log likelihood =  -193.8113                       Pseudo R2       =     0.1708

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0869437    .0159483      5.45    0.000      .0556857     .1182017
      shhlw3 |    .0025983    .0052389      0.50    0.620     -.0076698     .0128663
avgcumdosew3 |   -.5753628    .7013698     -0.82    0.412     -1.950022     .7992968
      ageXd3 |    .0054767    .0110707      0.49    0.621     -.0162215     .0271749
   shhlw3Xd3 |    .0024363    .0033657      0.72    0.469     -.0041603     .0090329
       _cons |   -5.058574    .9113937     -5.55    0.000     -6.844872    -3.272275
-------------+----------------------------------------------------------------

.
. set more off

. *---------- Mediator relationships for home care are tested below: -------------
. title "Mediator relationships of Dose - home care impact are tested"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****    Mediator relationships of Dose - home care impact are tested     *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:04  *****
*******************************************************************************
*******************************************************************************


. forvalues k=1/2 {
  2. forvalues j=3/3 {
  3. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  4. di _skip(2)
  5. di as input "Trimmed gender=`k' hp2hmcare impact of dose in wave `j' "
  6. des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' `w3bf'
  7. sw, pr(.1): logistic hp2hmcare  age  havmilsq ///
>    avgcumdosew3  ageXd3 illw`j' shjobw`j' suprtw`j' if gender==`k', coef
  8. estat gof
  9. estat class
 10. fitstat
 11. }
 12. }

Trimmed gender=1 hp2hmcare impact of dose in wave 3

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


age               double   %8.0g                    *   Respondent's age


occ1w3            double   %15.0g        LABJ           professional executive administration now


occ2w3            double   %15.0g        LABJ           technical sales admin support now


occ3w3            double   %15.0g        LABJ           service occup protective services now


occ4w3            double   %15.0g        LABJ           precision prod mechan craft construction now


occ5w3            double   %15.0g        LABJ           factory laborer machinist transp cleaner now


occ6w3            double   %15.0g        LABJ           farming agricul forestry fishing trapping logging now


occ7w3            double   %15.0g        LABJ           homemaking or caregiving now


occ8w3            double   %15.0g        LABJ           student now


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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


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


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


bf2               float    %9.0g                        bf2 = max(0, efradw3 - 1.61252E-006) * bf1


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


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


bf7m              float    %9.0g                        bf7m = max(0, radtlw3 - 2.12558E-007) * bf4m


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


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


bf17              float    %9.0g                        bf17 = max(0, 20 - ecprw3) * bf15m


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


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


bf29              float    %9.0g                        bf29 = max(0, 18 - CSsocspt) * bf8


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.8890 >= 0.1000  removing shjobw3


p = 0.7169 >= 0.1000  removing avgcumdosew3


p = 0.6181 >= 0.1000  removing ageXd3


p = 0.3884 >= 0.1000  removing suprtw3


p = 0.3741 >= 0.1000  removing havmilsq


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      37.81
                                                  Prob > chi2     =     0.0000
Log likelihood = -153.96835                       Pseudo R2       =     0.1094

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .050053    .0120837      4.14    0.000      .0263694     .0737367
       illw3 |     .450018    .1335457      3.37    0.001      .1882732     .7117629
       _cons |   -4.209924    .6577161     -6.40    0.000     -5.499024    -2.920824
-------------+----------------------------------------------------------------


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       108
            Pearson chi2(105) =       123.84
                  Prob > chi2 =         0.1012

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         9             5  |         14
     -     |        61           265  |        326
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   12.86%
Specificity                     Pr( -|~D)   98.15%
Positive predictive value       Pr( D| +)   64.29%
Negative predictive value       Pr(~D| -)   81.29%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.85%
False - rate for true D         Pr( -| D)   87.14%
False + rate for classified +   Pr(~D| +)   35.71%
False - rate for classified -   Pr( D| -)   18.71%
--------------------------------------------------
Correctly classified                        80.59%
--------------------------------------------------

Measures of Fit for logistic of hp2hmcare

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -153.968
D(337):                      307.937     LR(2):                        37.809
                                         Prob > LR:                     0.000
McFadden's R2:                 0.109     McFadden's Adj R2:             0.092
Maximum Likelihood R2:         0.105     Cragg & Uhler's R2:            0.165
McKelvey and Zavoina's R2:     0.170     Efron's R2:                    0.126
Variance of y*:                3.965     Variance of error:             3.290
Count R2:                      0.806     Adj Count R2:                  0.057
AIC:                           0.923     AIC*n:                       313.937
BIC:                       -1656.418     BIC':                        -26.151

Trimmed gender=2 hp2hmcare impact of dose in wave 3

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


age               double   %8.0g                    *   Respondent's age


occ1w3            double   %15.0g        LABJ           professional executive administration now


occ2w3            double   %15.0g        LABJ           technical sales admin support now


occ3w3            double   %15.0g        LABJ           service occup protective services now


occ4w3            double   %15.0g        LABJ           precision prod mechan craft construction now


occ5w3            double   %15.0g        LABJ           factory laborer machinist transp cleaner now


occ6w3            double   %15.0g        LABJ           farming agricul forestry fishing trapping logging now


occ7w3            double   %15.0g        LABJ           homemaking or caregiving now


occ8w3            double   %15.0g        LABJ           student now


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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


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


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


bf2               float    %9.0g                        bf2 = max(0, efradw3 - 1.61252E-006) * bf1


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


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


bf7m              float    %9.0g                        bf7m = max(0, radtlw3 - 2.12558E-007) * bf4m


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


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


bf17              float    %9.0g                        bf17 = max(0, 20 - ecprw3) * bf15m


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


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


bf29              float    %9.0g                        bf29 = max(0, 18 - CSsocspt) * bf8


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.8360 >= 0.1000  removing ageXd3


p = 0.7775 >= 0.1000  removing suprtw3


p = 0.3880 >= 0.1000  removing havmilsq


p = 0.3482 >= 0.1000  removing shjobw3


p = 0.2310 >= 0.1000  removing illw3


p = 0.1422 >= 0.1000  removing avgcumdosew3


Logistic regression                               Number of obs   =        362
                                                  LR chi2(1)      =      75.69
                                                  Prob > chi2     =     0.0000
Log likelihood = -195.46039                       Pseudo R2       =     0.1622

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0916735    .0119861      7.65    0.000      .0681811     .1151659
       _cons |   -5.391274       .6487     -8.31    0.000     -6.662703    -4.119845
-------------+----------------------------------------------------------------


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =        49
             Pearson chi2(47) =        40.39
                  Prob > chi2 =         0.7413

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        62            32  |         94
     -     |        63           205  |        268
-----------+--------------------------+-----------
   Total   |       125           237  |        362

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   49.60%
Specificity                     Pr( -|~D)   86.50%
Positive predictive value       Pr( D| +)   65.96%
Negative predictive value       Pr(~D| -)   76.49%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   13.50%
False - rate for true D         Pr( -| D)   50.40%
False + rate for classified +   Pr(~D| +)   34.04%
False - rate for classified -   Pr( D| -)   23.51%
--------------------------------------------------
Correctly classified                        73.76%
--------------------------------------------------

Measures of Fit for logistic of hp2hmcare

Log-Lik Intercept Only:     -233.306     Log-Lik Full Model:         -195.460
D(360):                      390.921     LR(1):                        75.691
                                         Prob > LR:                     0.000
McFadden's R2:                 0.162     McFadden's Adj R2:             0.154
Maximum Likelihood R2:         0.189     Cragg & Uhler's R2:            0.260
McKelvey and Zavoina's R2:     0.264     Efron's R2:                    0.208
Variance of y*:                4.472     Variance of error:             3.290
Count R2:                      0.738     Adj Count R2:                  0.240
AIC:                           1.091     AIC*n:                       394.921
BIC:                       -1730.071     BIC':                        -69.799

.
. scalar hmcareModFw3 = "none"

.
.
.
. * age and illw3 are a female mediators of dose - home care impact
.
. * age is a male and female mediator with impact on home care
. glm age avgcumdosew3 if gender==1,  fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1330.6336

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

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

                                                   AIC             =  7.839021
Log likelihood   = -1330.633586                    BIC             =   47957.2

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .5433648    .2472657      2.20    0.028       .058733     1.027997
       _cons |    48.52021    .7247376     66.95    0.000      47.09975     49.94067
-------------+----------------------------------------------------------------

. 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.)

.
. glm age avgcumdosew3 if gender==2,  fam(gaussian) link(identity)

Iteration 0:   log likelihood =  -1408.064

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

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

                                                   AIC             =  7.768948
Log likelihood   =  -1408.06405                    BIC             =  47606.63

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.058366    .3512614      3.01    0.003      .3699069     1.746826
       _cons |    48.94293    .7468173     65.54    0.000      47.47919     50.40666
-------------+----------------------------------------------------------------

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

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.)

.
.
. * illw3 is a male mediator wrt dose home care impact
. glm illw3 avgcumdosew3 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -461.99206

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

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

                                                   AIC             =  2.729365
Log likelihood   = -461.9920626                    BIC             = -1668.714

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .038211    .0192139      1.99    0.047      .0005524     .0758696
       _cons |    .4504952    .0563162      8.00    0.000      .3401176     .5608729
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =   325.666
Iteration 2:   deviance =  325.6236
Iteration 3:   deviance =  325.6236
Iteration 4:   deviance =  325.6236

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  325.6235917                    (1/df) Deviance =  .9633834
Pearson          =    335.97027                    (1/df) Pearson  =  .9939949

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

                                                   BIC             =  -1644.56

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    .3422616    .0758391      4.51    0.000      .1936197     .4909035
       _cons |   -1.024423    .0902165    -11.36    0.000     -1.201244    -.8476019
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm illw3 avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -562.81042

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

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

                                                   AIC             =  3.111903
Log likelihood   = -562.8104237                    BIC             = -1655.676

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .1284565    .0342268      3.75    0.000      .0613733     .1955398
       _cons |    .5563644    .0727696      7.65    0.000      .4137387     .6989902
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  463.6739
Iteration 2:   deviance =   463.093
Iteration 3:   deviance =  463.0929
Iteration 4:   deviance =  463.0929

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  463.0929333                    (1/df) Deviance =  1.282806
Pearson          =  362.4107813                    (1/df) Pearson  =  1.003908

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

                                                   BIC             = -1664.786

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    .1203099    .0649774      1.85    0.064     -.0070435     .2476634
       _cons |   -.4898124    .0909036     -5.39    0.000     -.6679803    -.3116445
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
. scalar hmcareMedMw3 = "age illw3"

. scalar hmcareMedFw3 = "age illw3"

. scalar list
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
  wkMedFw3 = radhlw3 age bf40 bf4m bf1
  wkMedMw3 = bf8 age illw3 ageXillw3
  wkModFw3 = none
  wkModMw3 = none
MainEffwkFw3 = age
MainEffwkMw3 = workM: age  bf8  illw3  shjobw3
SigDoseWKMw3 = no
SigDoseWkFw3 = no

.
. * conclusion "age & illw3 are main effects as possible male & female mediators"
. * conclusion title "their interaction is not a mediator"
.
.
.
.
. * Other non-signif test results for mediators of the dose-homecare impact
.
. glm illw3Xd3 illw3 avgcumdosew3 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -910.27475

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

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

                                                   AIC             =  5.372204
Log likelihood   = -910.2747528                    BIC             =  2247.363

-------------+----------------------------------------------------------------
             |                 OIM
     illw3Xd3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    1.785312    .2036071      8.77    0.000      1.386249     2.184374
avgcumdosew3 |     1.08337    .0723425     14.98    0.000      .9415811     1.225159
       _cons |   -1.330357    .2298973     -5.79    0.000     -1.780947    -.8797666
-------------+----------------------------------------------------------------

. glm hp2hmcare illw3Xd3 illw3 avgcumdosew3 if gender==1, fam(binomial) ///
>   irls scale(dev) link(probit)

Iteration 1:   deviance =  324.9852
Iteration 2:   deviance =  324.7765
Iteration 3:   deviance =   324.755
Iteration 4:   deviance =  324.7539
Iteration 5:   deviance =  324.7539
Iteration 6:   deviance =  324.7539

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  324.7538899                    (1/df) Deviance =  .9665294
Pearson          =  334.7330022                    (1/df) Pearson  =  .9962292

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

                                                   BIC             = -1633.772

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    illw3Xd3 |    .0296527    .0383533      0.77    0.439     -.0455184     .1048239
       illw3 |    .3037802    .0878109      3.46    0.001       .131674     .4758864
avgcumdosew3 |   -.0397572    .0621297     -0.64    0.522     -.1615292     .0820148
       _cons |   -.9819848      .10943     -8.97    0.000     -1.196464     -.767506
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. glm illw3Xd3 illw3 avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -985.70781

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       360
                                                   Scale parameter =  13.48151
Deviance         =  4853.341842                    (1/df) Deviance =  13.48151
Pearson          =  4853.341842                    (1/df) Pearson  =  13.48151

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

                                                   AIC             =  5.447426
Log likelihood   = -985.7078088                    BIC             =  2731.357

-------------+----------------------------------------------------------------
             |                 OIM
     illw3Xd3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    1.708471    .1689681     10.11    0.000      1.377299     2.039642
avgcumdosew3 |    2.232994    .1120046     19.94    0.000      2.013469     2.452519
       _cons |   -2.648599     .251824    -10.52    0.000     -3.142165    -2.155033
-------------+----------------------------------------------------------------

. glm hp2hmcare illw3Xd3 illw3 avgcumdosew3 if gender==2, fam(binomial) ///
>    irls scale(dev) link(probit)

Iteration 1:   deviance =   460.104
Iteration 2:   deviance =  459.2782
Iteration 3:   deviance =  459.2401
Iteration 4:   deviance =  459.2395
Iteration 5:   deviance =  459.2395
Iteration 6:   deviance =  459.2395

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  459.2395051                    (1/df) Deviance =  1.279219
Pearson          =  360.8121049                    (1/df) Pearson  =  1.005048

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

                                                   BIC             = -1656.851

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    illw3Xd3 |   -.0506129    .0397971     -1.27    0.203     -.1286138     .0273881
       illw3 |    .1996924    .0831248      2.40    0.016      .0367707     .3626141
avgcumdosew3 |    .0648611    .0733042      0.88    0.376     -.0788126     .2085348
       _cons |   -.5685167    .1207782     -4.71    0.000     -.8052376    -.3317958
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. glm havmilsq avgcumdosew3 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood =   -4357.43

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  7.98e+09
Deviance         =  2.69659e+12                    (1/df) Deviance =  7.98e+09
Pearson          =  2.69659e+12                    (1/df) Pearson  =  7.98e+09

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

                                                   AIC             =  25.64371
Log likelihood   = -4357.430049                    BIC             =  2.70e+12

-------------+----------------------------------------------------------------
             |                 OIM
     havmilsq |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    -1575.31    1817.197     -0.87    0.386     -5136.952     1986.331
       _cons |    18893.16    5326.219      3.55    0.000      8453.963     29332.36
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =   345.527
Iteration 2:   deviance =  345.1721
Iteration 3:   deviance =  345.1646
Iteration 4:   deviance =  345.1644
Iteration 5:   deviance =  345.1644
Iteration 6:   deviance =  345.1644

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  345.1644251                    (1/df) Deviance =  1.021197
Pearson          =  339.1838387                    (1/df) Pearson  =  1.003502

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

                                                   BIC             = -1625.019

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    havmilsq |   -9.19e-07    1.39e-06     -0.66    0.509     -3.65e-06     1.81e-06
       _cons |   -.8078353    .0797621    -10.13    0.000     -.9641661    -.6515045
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. glm havmilsq avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -5315.4087

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  3.08e+11
Deviance         =  1.11219e+14                    (1/df) Deviance =  3.08e+11
Pearson          =  1.11219e+14                    (1/df) Pearson  =  3.08e+11

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

                                                   AIC             =  29.29702
Log likelihood   = -5315.408686                    BIC             =  1.11e+14

-------------+----------------------------------------------------------------
             |                 OIM
     havmilsq |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    8378.635    16610.83      0.50    0.614     -24177.99     40935.26
       _cons |    50752.51    35316.31      1.44    0.151     -18466.18     119971.2
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  466.1751
Iteration 2:   deviance =  465.0334
Iteration 3:   deviance =    464.73
Iteration 4:   deviance =  464.6076
Iteration 5:   deviance =  464.5797
Iteration 6:   deviance =  464.5779
Iteration 7:   deviance =  464.5779
Iteration 8:   deviance =  464.5779

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  464.5778963                    (1/df) Deviance =  1.286919
Pearson          =  360.2475414                    (1/df) Pearson  =  .9979156

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

                                                   BIC             = -1663.302

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    havmilsq |   -7.46e-07    1.04e-06     -0.72    0.475     -2.79e-06     1.30e-06
       _cons |   -.3815177    .0787742     -4.84    0.000     -.5359124     -.227123
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm radhlw3 avgcumdosew3 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1695.1855

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

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

                                                   AIC             =  9.983444
Log likelihood   = -1695.185473                    BIC             =  424265.5

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .9606492    .7224692      1.33    0.184     -.4553645     2.376663
       _cons |    46.19995    2.117563     21.82    0.000       42.0496      50.3503
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  319.2576
Iteration 2:   deviance =  318.3456
Iteration 3:   deviance =  318.3441
Iteration 4:   deviance =  318.3441

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  318.3440747                    (1/df) Deviance =  .9418464
Pearson          =  342.3257119                    (1/df) Pearson  =  1.012798

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

                                                   BIC             =  -1651.84

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0115758    .0022053      5.25    0.000      .0072534     .0158982
       _cons |   -1.437377    .1466803     -9.80    0.000     -1.724866    -1.149889
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. glm radhlw3 avgcumdosew3 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1798.7074

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

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

                                                   AIC             =  9.921253
Log likelihood   = -1798.707367                    BIC             =  425821.1

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    2.751602     1.03038      2.67    0.008      .7320943      4.77111
       _cons |    57.70689    2.190692     26.34    0.000      53.41321     62.00057
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  466.2486
Iteration 2:   deviance =  465.6482
Iteration 3:   deviance =  465.6481
Iteration 4:   deviance =  465.6481

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  465.6481297                    (1/df) Deviance =  1.289884
Pearson          =  362.9350038                    (1/df) Pearson  =   1.00536

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

                                                   BIC             = -1662.231

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0026441    .0022316      1.18    0.236     -.0017297     .0070179
       _cons |   -.5636837    .1583099     -3.56    0.000     -.8739654    -.2534021
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. title4 "*------- summary matrix construction for dose home care"
-------------
*------- summary matrix construction for dose home care
-------------

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

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

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

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

.     matrix rownames HP2hmcrMw3 = hmcareM

.     matrix rownames HP2hmcrFw3 = hmcareF

.     matrix define HP2hmcrFw3= (1, 2, 3, 2, 0 ,2,  0  , 2 )

.         matrix define HP2hmcrMw3= (1, 2, 3, 1, 0 , 4,  0  , 2 )

.         matrix define H1pt2w3 = (HP2wkMw3 \ HP2wkFw3 \ HP2hmcrMw3 \HP2hmcrFw3)

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

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

.     matrix rownames H1pt2w3 = HP2wkMw3 WHP2wkFw3 HP2hmcrMw3 HP2hmcrFw3

.         matlist H1pt2w3

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
HP2wkMw3   |         1            2            3            1            0            4            0            4
WHP2wkFw3   |         1            2            3            2            0            1            0            6
HP2hmcrMw3   |         1            2            3            1            0            4            0            2
HP2hmcrFw3   |         1            2            3            2            0            2            0            2

.
. * see scalar list for names of variables
. scalar list
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
  wkMedFw3 = radhlw3 age bf40 bf4m bf1
  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 prob soc impact relationship HP2probsoc
. *-------------------------------------------------------------------------------
. *      General model for all part 2 of Nottingham Health Profile
.
. title " 3. Wave 3 part2   H1: Test of hypothesis 1 Part 2 "


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****         3. Wave 3 part2   H1: Test of hypothesis 1 Part 2           *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:49  *****
*******************************************************************************
*******************************************************************************


. title " Wave 3 Dose - HP2probsoc Main effects identification"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        Wave 3 Dose - HP2probsoc Main effects identification         *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:49  *****
*******************************************************************************
*******************************************************************************


. forvalues j=3/3 {
  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 as input "Full main model for `var' for wave= `j' "
  7. di _skip(4)
  8. di as input  "chunk 4 H1 test:Gender= `k'  model Wave =  `j' for `e(depvar)' "
  9. di _skip(4)
 10. title "Full Nottingham Part 2 subscale models for male and then females"
 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:49  *****
*******************************************************************************
*******************************************************************************


i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 14 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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 15 obs not used

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

note: marrw32 != 0 predicts failure perfectly
      marrw32 dropped and 20 obs not used

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

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        266
                                                  LR chi2(44)     =     125.89
                                                  Prob > chi2     =     0.0000
Log likelihood =  -51.38371                       Pseudo R2       =     0.5506

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1094616    .0479486      2.28    0.022       .015484     .2034392
    _Ieduc_2 |    .7414425    1.297886      0.57    0.568     -1.802367     3.285252
    _Ieduc_3 |   -1.614771    .8291042     -1.95    0.051     -3.239785     .0102435
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -1.309884    1.008415     -1.30    0.194     -3.286342     .6665737
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -14.19493    1124.783     -0.01    0.990     -2218.729     2190.339
      occ2w3 |   -12.80013    1124.783     -0.01    0.991     -2217.335     2191.734
      occ3w3 |   -14.84881    1124.785     -0.01    0.989     -2219.387     2189.689
      occ4w3 |   -13.35572    1124.784     -0.01    0.991     -2217.891      2191.18
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -14.19043    1124.784     -0.01    0.990     -2218.726     2190.345
      occ8w3 |           0   (omitted)
     marrw31 |    3.074981    1.891094      1.63    0.104     -.6314958     6.781458
     marrw32 |           0   (omitted)
     marrw33 |    1.087086    1.851071      0.59    0.557     -2.540947     4.715119
     marrw35 |    2.144183    1.926965      1.11    0.266     -1.632599     5.920964
     marrw36 |           0   (omitted)
      inc1w3 |    12.66541    1124.784      0.01    0.991      -2191.87     2217.201
      inc2w3 |    14.23621    1124.783      0.01    0.990     -2190.299     2218.771
      inc3w3 |    11.68224    1124.783      0.01    0.992     -2192.853     2216.217
      inc4w3 |    13.15717    1124.785      0.01    0.991     -2191.381     2217.695
     radhlw3 |    .0116102     .013936      0.83    0.405     -.0157038     .0389242
      havmil |     .010259    .0190025      0.54    0.589     -.0269853     .0475032
avgcumdosew3 |     .013934    .0740721      0.19    0.851     -.1312447     .1591127
         bf1 |    .0049612    .0648373      0.08    0.939     -.1221176     .1320399
         bf4 |    .3309901    .3608169      0.92    0.359      -.376198     1.038178
         bf2 |    .0003753    .0003121      1.20    0.229     -.0002364      .000987
        bf4m |   -.7073564    .3457629     -2.05    0.041     -1.385039    -.0296735
        bf5m |    .0055743    .0030295      1.84    0.066     -.0003633     .0115119
        bf7m |    .0005904     .001055      0.56    0.576     -.0014774     .0026582
         bf8 |   -.0001253    .0000745     -1.68    0.093     -.0002713     .0000207
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0283325    .0488173     -0.58    0.562     -.1240127     .0673477
        bf22 |     .000352    .0002932      1.20    0.230     -.0002227     .0009267
        bf29 |   -.0000333    .0000588     -0.57    0.572     -.0001486      .000082
        bf30 |   -.0013785    .0007131     -1.93    0.053     -.0027761     .0000191
        bf40 |   -.3600239    .3692219     -0.98    0.330     -1.083686     .3636377
       deaw3 |   -.5217994    .4891348     -1.07    0.286     -1.480486     .4368872
      dvcew3 |   -.5047921    1.728469     -0.29    0.770     -3.892529     2.882945
      sepaw3 |    1.877558    1.625412      1.16    0.248     -1.308191     5.063307
      accdw3 |   -1.417017    1.419234     -1.00    0.318     -4.198664     1.364631
      movew3 |   -1.057894    1.576256     -0.67    0.502       -4.1473     2.031511
       illw3 |    .0330976    .3751226      0.09    0.930     -.7021292     .7683243
     shfamw3 |     .012083    .0115403      1.05    0.295     -.0105354     .0347015
      shhlw3 |   -.0165557    .0125582     -1.32    0.187     -.0411693     .0080578
     shjobw3 |     .032774    .0134379      2.44    0.015      .0064363     .0591118
    shrelaw3 |   -.0108059    .0117883     -0.92    0.359     -.0339106     .0122988
     suprtw3 |    -.014138    .0155065     -0.91    0.362     -.0445303     .0162542
     suchrw3 |    .0131393    .0111977      1.17    0.241     -.0088078     .0350865
    havmilsq |    -.000014    .0000386     -0.36    0.717     -.0000896     .0000616
       _cons |    .4495347    5.049973      0.09    0.929      -9.44823      10.3473
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        27             5  |         32
     -     |        14           220  |        234
-----------+--------------------------+-----------
   Total   |        41           225  |        266

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   65.85%
Specificity                     Pr( -|~D)   97.78%
Positive predictive value       Pr( D| +)   84.38%
Negative predictive value       Pr(~D| -)   94.02%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.22%
False - rate for true D         Pr( -| D)   34.15%
False + rate for classified +   Pr(~D| +)   15.62%
False - rate for classified -   Pr( D| -)    5.98%
--------------------------------------------------
Correctly classified                        92.86%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       266
 number of covariate patterns =       266
            Pearson chi2(221) =       138.28
                  Prob > chi2 =         1.0000

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -114.331     Log-Lik Full Model:          -51.384
D(210):                      102.767     LR(44):                      125.895
                                         Prob > LR:                     0.000
McFadden's R2:                 0.551     McFadden's Adj R2:             0.061
Maximum Likelihood R2:         0.377     Cragg & Uhler's R2:            0.654
McKelvey and Zavoina's R2:     0.833     Efron's R2:                    0.549
Variance of y*:               19.713     Variance of error:             3.290
Count R2:                      0.929     Adj Count R2:                  0.537
AIC:                           0.807     AIC*n:                       214.767
BIC:                       -1069.767     BIC':                        119.779
Full main model for HP2probsoc for wave= 3

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:51  *****
*******************************************************************************
*******************************************************************************


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

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

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

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

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        333
                                                  LR chi2(48)     =     182.65
                                                  Prob > chi2     =     0.0000
Log likelihood = -85.065495                       Pseudo R2       =     0.5177

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1095324    .0321452      3.41    0.001      .0465289     .1725358
    _Ieduc_2 |   -13.53237    1231.492     -0.01    0.991     -2427.212     2400.147
    _Ieduc_3 |   -13.52493    1231.492     -0.01    0.991     -2427.204     2400.154
    _Ieduc_4 |   -12.60239    1231.492     -0.01    0.992     -2426.282     2401.077
    _Ieduc_5 |   -12.71374    1231.492     -0.01    0.992     -2426.393     2400.966
    _Ieduc_6 |   -14.01871    1231.492     -0.01    0.991     -2427.698      2399.66
    _Ieduc_7 |   -14.42024    1231.563     -0.01    0.991     -2428.239     2399.398
    _Ieduc_8 |           0   (omitted)
      occ1w3 |    -1.43031    4.480321     -0.32    0.750     -10.21158     7.350959
      occ2w3 |   -.9422793     4.54239     -0.21    0.836       -9.8452     7.960641
      occ3w3 |   -.9893619    4.495549     -0.22    0.826     -9.800476     7.821752
      occ4w3 |           0   (omitted)
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -.3813499    4.479039     -0.09    0.932     -9.160105     8.397405
      occ8w3 |           0   (omitted)
     marrw31 |   -1.356413    4.804963     -0.28    0.778     -10.77397     8.061141
     marrw32 |    1.424321    4.907376      0.29    0.772     -8.193959      11.0426
     marrw33 |    .9014745    4.669929      0.19    0.847     -8.251419     10.05437
     marrw35 |    .1665893    4.645112      0.04    0.971     -8.937664     9.270842
     marrw36 |    .3174753    4.648882      0.07    0.946     -8.794166     9.429116
      inc1w3 |    .8600896    4.513897      0.19    0.849     -7.986987     9.707166
      inc2w3 |    1.384829    4.490321      0.31    0.758     -7.416038      10.1857
      inc3w3 |    .4792744    4.482989      0.11    0.915     -8.307222      9.26577
      inc4w3 |    2.266942    4.835774      0.47    0.639        -7.211     11.74488
     radhlw3 |    .0131788    .0108242      1.22    0.223     -.0080363     .0343939
      havmil |    .0001731    .0072695      0.02    0.981     -.0140748      .014421
avgcumdosew3 |    .4373021    .1594734      2.74    0.006        .12474     .7498642
         bf1 |    .0565003    .0423978      1.33    0.183     -.0265978     .1395985
         bf4 |   -.5202783    .2238014     -2.32    0.020     -.9589209    -.0816356
         bf2 |    .0000421    .0001478      0.28    0.776     -.0002477     .0003318
        bf4m |    .2426577    .1977977      1.23    0.220     -.1450185      .630334
        bf5m |   -.0017451    .0026768     -0.65    0.514     -.0069915     .0035013
        bf7m |    .0007865    .0007919      0.99    0.321     -.0007656     .0023387
         bf8 |    .0000207    .0000544      0.38    0.704      -.000086     .0001273
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0669294    .0330398     -2.03    0.043     -.1316862    -.0021726
        bf22 |   -.0000944    .0001823     -0.52    0.605     -.0004517     .0002629
        bf29 |   -.0000309     .000047     -0.66    0.511     -.0001229     .0000611
        bf30 |    .0003246    .0004246      0.76    0.445     -.0005076     .0011567
        bf40 |    .0606979    .1844629      0.33    0.742     -.3008427     .4222385
       deaw3 |    .1696097    .2295421      0.74    0.460     -.2802844     .6195039
      dvcew3 |    .3810548    1.285314      0.30    0.767     -2.138115     2.900224
      sepaw3 |   -2.876602    1.529689     -1.88    0.060     -5.874737     .1215322
      accdw3 |    .1226563     .714668      0.17    0.864     -1.278067      1.52338
      movew3 |    1.918652    1.360681      1.41    0.159     -.7482334     4.585538
       illw3 |    .2671943    .2045213      1.31    0.191     -.1336601     .6680487
     shfamw3 |   -.0003116    .0095404     -0.03    0.974     -.0190104     .0183873
      shhlw3 |   -.0026048    .0074647     -0.35    0.727     -.0172353     .0120256
     shjobw3 |     .006075    .0086284      0.70    0.481     -.0108364     .0229864
    shrelaw3 |   -.0267274     .010033     -2.66    0.008     -.0463918     -.007063
     suprtw3 |   -.0065983    .0100162     -0.66    0.510     -.0262297     .0130331
     suchrw3 |    .0015649    .0064519      0.24    0.808     -.0110806     .0142105
    havmilsq |   -3.19e-06    .0000124     -0.26    0.797     -.0000275     .0000211
       _cons |    6.986764    1231.505      0.01    0.995     -2406.718     2420.692
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        54            13  |         67
     -     |        20           246  |        266
-----------+--------------------------+-----------
   Total   |        74           259  |        333

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   72.97%
Specificity                     Pr( -|~D)   94.98%
Positive predictive value       Pr( D| +)   80.60%
Negative predictive value       Pr(~D| -)   92.48%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.02%
False - rate for true D         Pr( -| D)   27.03%
False + rate for classified +   Pr(~D| +)   19.40%
False - rate for classified -   Pr( D| -)    7.52%
--------------------------------------------------
Correctly classified                        90.09%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       333
 number of covariate patterns =       333
            Pearson chi2(284) =       335.12
                  Prob > chi2 =         0.0199

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -176.392     Log-Lik Full Model:          -85.065
D(277):                      170.131     LR(48):                      182.653
                                         Prob > LR:                     0.000
McFadden's R2:                 0.518     McFadden's Adj R2:             0.200
Maximum Likelihood R2:         0.422     Cragg & Uhler's R2:            0.646
McKelvey and Zavoina's R2:     0.810     Efron's R2:                    0.561
Variance of y*:               17.273     Variance of error:             3.290
Count R2:                      0.901     Adj Count R2:                  0.554
AIC:                           0.847     AIC*n:                       282.131
BIC:                       -1438.724     BIC':                         96.138

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

. * male models
.         forvalues j=3/3 {
  2. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. title3 "trimmed HP2probsoc main effects models wave 3 for H1 part 2 with dose ns"
  4. title "Wave 3 dose HP2probsoc relationship but avgcumdosew`j': Dose not signif"
  5. xi:logit HP2probsoc age i.educ radhlw3 accdw`j' bf8  shjobw`j' suchrw3 havmilsq ///
>     avgcumdosew`j' if gender==1
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }
-------------
title3 : trimmed HP2probsoc main effects models wave 3 for H1 part 2 with dose ns
16 Jun 2012
20:44:53
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide13june2012.dta  currrently has  2374  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Wave 3 dose HP2probsoc relationship but avgcumdosew3: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:53  *****
*******************************************************************************
*******************************************************************************


i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)

note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 14 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: _Ieduc_6 omitted because of collinearity
Iteration 0:   log likelihood = -122.49818
Iteration 1:   log likelihood = -94.094194
Iteration 2:   log likelihood = -86.783267
Iteration 3:   log likelihood = -86.595645
Iteration 4:   log likelihood = -86.595407
Iteration 5:   log likelihood = -86.595407

Logistic regression                               Number of obs   =        320
                                                  LR chi2(11)     =      71.81
                                                  Prob > chi2     =     0.0000
Log likelihood = -86.595407                       Pseudo R2       =     0.2931

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0535719    .0238163      2.25    0.024      .0068928      .100251
    _Ieduc_2 |    .3605111    .9297636      0.39    0.698     -1.461792     2.182814
    _Ieduc_3 |   -.6699915    .4771602     -1.40    0.160     -1.605208     .2652253
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.5495985    .5675642     -0.97    0.333     -1.662004     .5628069
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
     radhlw3 |    .0305161    .0070656      4.32    0.000      .0166678     .0443643
      accdw3 |   -1.646048    .8717553     -1.89    0.059     -3.354657     .0625614
         bf8 |   -.0000366    .0000261     -1.40    0.161     -.0000877     .0000146
     shjobw3 |    .0159184    .0057194      2.78    0.005      .0047085     .0271283
     suchrw3 |    .0135001    .0055103      2.45    0.014      .0027001     .0243001
    havmilsq |   -1.21e-06    4.50e-06     -0.27    0.788       -.00001     7.61e-06
avgcumdosew3 |    .0300057    .0490462      0.61    0.541     -.0661232     .1261345
       _cons |   -7.526129    1.376102     -5.47    0.000     -10.22324    -4.829018
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        13             6  |         19
     -     |        28           273  |        301
-----------+--------------------------+-----------
   Total   |        41           279  |        320

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   31.71%
Specificity                     Pr( -|~D)   97.85%
Positive predictive value       Pr( D| +)   68.42%
Negative predictive value       Pr(~D| -)   90.70%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.15%
False - rate for true D         Pr( -| D)   68.29%
False + rate for classified +   Pr(~D| +)   31.58%
False - rate for classified -   Pr( D| -)    9.30%
--------------------------------------------------
Correctly classified                        89.38%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       320
 number of covariate patterns =       319
            Pearson chi2(307) =       262.97
                  Prob > chi2 =         0.9673

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -122.498     Log-Lik Full Model:          -86.595
D(304):                      173.191     LR(11):                       71.806
                                         Prob > LR:                     0.000
McFadden's R2:                 0.293     McFadden's Adj R2:             0.162
Maximum Likelihood R2:         0.201     Cragg & Uhler's R2:            0.376
McKelvey and Zavoina's R2:     0.500     Efron's R2:                    0.271
Variance of y*:                6.583     Variance of error:             3.290
Count R2:                      0.894     Adj Count R2:                  0.171
AIC:                           0.641     AIC*n:                       205.191
BIC:                       -1580.379     BIC':                         -8.354

.
.
. forvalues j=3/3 {
  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 3             *****
*****                     for H1 part 2 with dose ns                      *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:54  *****
*******************************************************************************
*******************************************************************************


-------------
title2: Wave `j dose HP2work relationship but avgcumdosew3: Dose not signif
                                       Date and time:  16 Jun 2012    20:44:54
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
                                       Stata data file:  chwide13june2012.dta  has  2374  variables and  703  observations

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

.
. foreach var in suchrw3 radhlw3 shjobw3 {
  2.  cap gen `var'Xd3= `var'*avgcumdosew3
  3.  }

.
. forvalues j=3/3 {
  2.   title "Main effects Dose ProbSoc model for males"
  3.   logit HP2probsoc age avgcumdosew3 radhlw3 shjobw`j' if gender==1
  4.                         estat class
  5.                         estat gof
  6.                         fitstat
  7. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****             Main effects Dose ProbSoc model for males               *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:54  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -102.23967
Iteration 2:   log likelihood = -97.397123
Iteration 3:   log likelihood = -97.305516
Iteration 4:   log likelihood = -97.305496
Iteration 5:   log likelihood = -97.305496

Logistic regression                               Number of obs   =        340
                                                  LR chi2(4)      =      55.69
                                                  Prob > chi2     =     0.0000
Log likelihood = -97.305496                       Pseudo R2       =     0.2225

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0793863    .0196172      4.05    0.000      .0409372     .1178353
avgcumdosew3 |    .0349899    .0473999      0.74    0.460     -.0579122     .1278919
     radhlw3 |    .0232266    .0060628      3.83    0.000      .0113437     .0351094
     shjobw3 |    .0140642    .0050535      2.78    0.005      .0041595     .0239689
       _cons |   -8.338983    1.267447     -6.58    0.000     -10.82313    -5.854832
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         5             3  |          8
     -     |        36           296  |        332
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   12.20%
Specificity                     Pr( -|~D)   99.00%
Positive predictive value       Pr( D| +)   62.50%
Negative predictive value       Pr(~D| -)   89.16%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.00%
False - rate for true D         Pr( -| D)   87.80%
False + rate for classified +   Pr(~D| +)   37.50%
False - rate for classified -   Pr( D| -)   10.84%
--------------------------------------------------
Correctly classified                        88.53%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       328
            Pearson chi2(323) =       293.19
                  Prob > chi2 =         0.8819

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -97.305
D(335):                      194.611     LR(4):                        55.694
                                         Prob > LR:                     0.000
McFadden's R2:                 0.223     McFadden's Adj R2:             0.183
Maximum Likelihood R2:         0.151     Cragg & Uhler's R2:            0.290
McKelvey and Zavoina's R2:     0.409     Efron's R2:                    0.189
Variance of y*:                5.568     Variance of error:             3.290
Count R2:                      0.885     Adj Count R2:                  0.049
AIC:                           0.602     AIC*n:                       204.611
BIC:                       -1758.086     BIC':                        -32.378

.
. scalar MainEffPrbsocMw3 = "age radhlw3 shjobw3"

.
.
. forvalues j=3/3 {
  2.   logit HP2probsoc age  radhlw3 shjobw`j'  ///
>       avgcumdosew`j' ///
>        shjobw3Xd3 if gender==1
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -99.524419
Iteration 2:   log likelihood = -94.068605
Iteration 3:   log likelihood = -93.949644
Iteration 4:   log likelihood = -93.948748
Iteration 5:   log likelihood = -93.948746

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      62.41
                                                  Prob > chi2     =     0.0000
Log likelihood = -93.948746                       Pseudo R2       =     0.2493

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0751262    .0195236      3.85    0.000      .0368608     .1133917
     radhlw3 |    .0251104    .0062707      4.00    0.000      .0128201     .0374008
     shjobw3 |   -.0001631    .0088177     -0.02    0.985     -.0174456     .0171193
avgcumdosew3 |   -.2525242    .2724481     -0.93    0.354     -.7865126     .2814642
  shjobw3Xd3 |    .0124767    .0071063      1.76    0.079     -.0014514     .0264049
       _cons |   -7.860581    1.288837     -6.10    0.000     -10.38665    -5.334508
-------------+----------------------------------------------------------------


Note: 0 failures and 1 success completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         6             3  |          9
     -     |        35           296  |        331
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   14.63%
Specificity                     Pr( -|~D)   99.00%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   89.43%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.00%
False - rate for true D         Pr( -| D)   85.37%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)   10.57%
--------------------------------------------------
Correctly classified                        88.82%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       328
            Pearson chi2(322) =       318.24
                  Prob > chi2 =         0.5488

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -93.949
D(334):                      187.897     LR(5):                        62.407
                                         Prob > LR:                     0.000
McFadden's R2:                 0.249     McFadden's Adj R2:             0.201
Maximum Likelihood R2:         0.168     Cragg & Uhler's R2:            0.322
McKelvey and Zavoina's R2:     0.615     Efron's R2:                    0.228
Variance of y*:                8.541     Variance of error:             3.290
Count R2:                      0.888     Adj Count R2:                  0.073
AIC:                           0.588     AIC*n:                       199.897
BIC:                       -1758.970     BIC':                        -33.263

. scalar SigDoseProbsocMw3 = "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
. scalar ProbSocModMw3 = "none"

. * female models
.
. forvalues j=3/3 {
  2. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. title3 "trimmed HP2probsoc main effects models wave 3 for H1 part 2 with dose ns"
  4. title "Wave 3 dose HP2probsoc relationship but avgcumdosew`j': Dose not signif"
  5.  logit HP2probsoc age radhlw3 accdw`j' sepaw`j' illw`j' shjobw`j' ////
>   shrelaw`j' suchrw3 havmilsq avgcumdosew`j' if gender==2
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }
-------------
title3 : trimmed HP2probsoc main effects models wave 3 for H1 part 2 with dose ns
16 Jun 2012
20:44:57
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide13june2012.dta  currrently has  2374  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Wave 3 dose HP2probsoc relationship but avgcumdosew3: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:57  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -183.34177
Iteration 1:   log likelihood = -123.45484
Iteration 2:   log likelihood = -113.79263
Iteration 3:   log likelihood =    -112.73
Iteration 4:   log likelihood = -112.14405
Iteration 5:   log likelihood =  -112.0764
Iteration 6:   log likelihood = -112.07463
Iteration 7:   log likelihood = -112.07462

Logistic regression                               Number of obs   =        362
                                                  LR chi2(10)     =     142.53
                                                  Prob > chi2     =     0.0000
Log likelihood = -112.07462                       Pseudo R2       =     0.3887

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1199451     .020794      5.77    0.000      .0791897     .1607005
     radhlw3 |    .0211303    .0055776      3.79    0.000      .0101983     .0320622
      accdw3 |   -.0504717    .5021919     -0.10    0.920      -1.03475     .9338064
      sepaw3 |   -1.843435    1.040782     -1.77    0.077     -3.883329     .1964598
       illw3 |    .3907454    .1531736      2.55    0.011      .0905306     .6909602
     shjobw3 |   -.0025249     .005367     -0.47    0.638     -.0130441     .0079943
    shrelaw3 |   -.0165931    .0059102     -2.81    0.005      -.028177    -.0050093
     suchrw3 |    .0025861    .0039833      0.65    0.516     -.0052211     .0103933
    havmilsq |   -7.39e-06    6.74e-06     -1.10    0.273     -.0000206     5.82e-06
avgcumdosew3 |     .360538     .119122      3.03    0.002      .1270632     .5940128
       _cons |   -9.607496    1.314552     -7.31    0.000     -12.18397    -7.031022
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        39            12  |         51
     -     |        35           276  |        311
-----------+--------------------------+-----------
   Total   |        74           288  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   52.70%
Specificity                     Pr( -|~D)   95.83%
Positive predictive value       Pr( D| +)   76.47%
Negative predictive value       Pr(~D| -)   88.75%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.17%
False - rate for true D         Pr( -| D)   47.30%
False + rate for classified +   Pr(~D| +)   23.53%
False - rate for classified -   Pr( D| -)   11.25%
--------------------------------------------------
Correctly classified                        87.02%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       362
            Pearson chi2(351) =       411.55
                  Prob > chi2 =         0.0142

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -183.342     Log-Lik Full Model:         -112.075
D(351):                      224.149     LR(10):                      142.534
                                         Prob > LR:                     0.000
McFadden's R2:                 0.389     McFadden's Adj R2:             0.329
Maximum Likelihood R2:         0.325     Cragg & Uhler's R2:            0.511
McKelvey and Zavoina's R2:     0.867     Efron's R2:                    0.431
Variance of y*:               24.799     Variance of error:             3.290
Count R2:                      0.870     Adj Count R2:                  0.365
AIC:                           0.680     AIC*n:                       246.149
BIC:                       -1843.818     BIC':                        -83.618

.
. scalar SigDoseProbsocFw3 = "yes"

. scalar MainEffProbSocFw3 = "age radhlw3 illw3 Shrelaw3 avgcumodsew3"

.
. * trimmed female model with basis functions
. forvalues j=3/3 {
  2. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. title "trimmed HP2probsoc main effects models wave 3 for H1 part 2 " "Dose is signif Females"
  4. title "Wave 3 dose HP2probsoc relationship but avgcumdosew`j': Dose signif"
  5. sw, pr(.1): logit HP2probsoc age radhlw3  illw`j' `w3bf' ////
>   shrelaw`j' avgcumdosew`j' if gender==2
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****    trimmed HP2probsoc main effects models wave 3 for H1 part 2      *****
*****                       Dose is signif Females                        *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:58  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
***** Wave 3 dose HP2probsoc relationship but avgcumdosew3: Dose signif   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:44:58  *****
*******************************************************************************
*******************************************************************************


note: bf15m dropped because of estimability
note: bf17 dropped because of estimability
note: o.bf15m dropped because of estimability
note: o.bf17 dropped because of estimability
note: 12 obs. dropped because of estimability


  begin with full model


p = 0.9965 >= 0.1000  removing bf2


p = 0.9362 >= 0.1000  removing bf29


p = 0.8909 >= 0.1000  removing bf40


p = 0.6158 >= 0.1000  removing bf30


p = 0.5388 >= 0.1000  removing bf7m


p = 0.7067 >= 0.1000  removing bf22


p = 0.4198 >= 0.1000  removing bf4m


p = 0.3240 >= 0.1000  removing bf1


p = 0.2022 >= 0.1000  removing illw3


p = 0.2339 >= 0.1000  removing bf8


p = 0.3431 >= 0.1000  removing bf5m


p = 0.2292 >= 0.1000  removing bf20


Logistic regression                               Number of obs   =        351
                                                  LR chi2(5)      =     152.76
                                                  Prob > chi2     =     0.0000
Log likelihood = -104.40283                       Pseudo R2       =     0.4225

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1049971    .0195589      5.37    0.000      .0666624     .1433318
     radhlw3 |    .0169212    .0059561      2.84    0.004      .0052476     .0285949
    shrelaw3 |   -.0215537    .0062267     -3.46    0.001     -.0337578    -.0093495
avgcumdosew3 |    .3458411    .1196665      2.89    0.004      .1112991     .5803832
         bf4 |   -.1874577    .0392116     -4.78    0.000     -.2643111    -.1106044
       _cons |   -6.545955    1.305602     -5.01    0.000     -9.104888    -3.987021
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        47             9  |         56
     -     |        27           268  |        295
-----------+--------------------------+-----------
   Total   |        74           277  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   63.51%
Specificity                     Pr( -|~D)   96.75%
Positive predictive value       Pr( D| +)   83.93%
Negative predictive value       Pr(~D| -)   90.85%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.25%
False - rate for true D         Pr( -| D)   36.49%
False + rate for classified +   Pr(~D| +)   16.07%
False - rate for classified -   Pr( D| -)    9.15%
--------------------------------------------------
Correctly classified                        89.74%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       349
            Pearson chi2(343) =       425.90
                  Prob > chi2 =         0.0015

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -180.782     Log-Lik Full Model:         -104.403
D(345):                      208.806     LR(5):                       152.759
                                         Prob > LR:                     0.000
McFadden's R2:                 0.422     McFadden's Adj R2:             0.389
Maximum Likelihood R2:         0.353     Cragg & Uhler's R2:            0.549
McKelvey and Zavoina's R2:     0.628     Efron's R2:                    0.472
Variance of y*:                8.833     Variance of error:             3.290
Count R2:                      0.897     Adj Count R2:                  0.514
AIC:                           0.629     AIC*n:                       220.806
BIC:                       -1813.166     BIC':                       -123.455

.
. foreach var in b4 shrelaw3  {
  2.  cap   gen `var'Xd3 = age*avgcumdosew3
  3. }

.
. * testing the female moderator model with basis functions
. forvalues j=3/3 {
  2. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. title "trimmed HP2socprob main effects  wv 3 for Hyp1 pt 2" "dose is signif for females"
  4. title "Wave 3 dose HP2socprob relationship but avgcumdosew`j'" " Dose is signif for females"
  5. sw, pr(.1): logit HP2probsoc age radhlw3  illw`j' `w3bf' ////
>   shrelaw`j' avgcumdosew`j' b4Xd3 ///
>     if gender==2
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        trimmed HP2socprob main effects  wv 3 for Hyp1 pt 2          *****
*****                     dose is signif for females                      *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:45:17  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        Wave 3 dose HP2socprob relationship but avgcumdosew3         *****
*****                     Dose is signif for females                      *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:45:17  *****
*******************************************************************************
*******************************************************************************


note: bf15m dropped because of estimability
note: bf17 dropped because of estimability
note: o.bf15m dropped because of estimability
note: o.bf17 dropped because of estimability
note: 12 obs. dropped because of estimability


  begin with full model


p = 0.9373 >= 0.1000  removing bf29


p = 0.8389 >= 0.1000  removing bf40


p = 0.8352 >= 0.1000  removing bf2


p = 0.7906 >= 0.1000  removing bf30


p = 0.5739 >= 0.1000  removing bf7m


p = 0.6758 >= 0.1000  removing bf22


p = 0.4655 >= 0.1000  removing bf4m


p = 0.3346 >= 0.1000  removing bf1


p = 0.1945 >= 0.1000  removing illw3


p = 0.2251 >= 0.1000  removing bf8


p = 0.3001 >= 0.1000  removing bf5m


p = 0.1871 >= 0.1000  removing bf20


p = 0.1243 >= 0.1000  removing b4Xd3


Logistic regression                               Number of obs   =        351
                                                  LR chi2(5)      =     152.76
                                                  Prob > chi2     =     0.0000
Log likelihood = -104.40283                       Pseudo R2       =     0.4225

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1049971    .0195589      5.37    0.000      .0666624     .1433318
     radhlw3 |    .0169212    .0059561      2.84    0.004      .0052476     .0285949
avgcumdosew3 |    .3458411    .1196665      2.89    0.004      .1112991     .5803832
    shrelaw3 |   -.0215537    .0062267     -3.46    0.001     -.0337578    -.0093495
         bf4 |   -.1874577    .0392116     -4.78    0.000     -.2643111    -.1106044
       _cons |   -6.545955    1.305602     -5.01    0.000     -9.104888    -3.987021
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        47             9  |         56
     -     |        27           268  |        295
-----------+--------------------------+-----------
   Total   |        74           277  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   63.51%
Specificity                     Pr( -|~D)   96.75%
Positive predictive value       Pr( D| +)   83.93%
Negative predictive value       Pr(~D| -)   90.85%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.25%
False - rate for true D         Pr( -| D)   36.49%
False + rate for classified +   Pr(~D| +)   16.07%
False - rate for classified -   Pr( D| -)    9.15%
--------------------------------------------------
Correctly classified                        89.74%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       349
            Pearson chi2(343) =       425.90
                  Prob > chi2 =         0.0015

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -180.782     Log-Lik Full Model:         -104.403
D(345):                      208.806     LR(5):                       152.759
                                         Prob > LR:                     0.000
McFadden's R2:                 0.422     McFadden's Adj R2:             0.389
Maximum Likelihood R2:         0.353     Cragg & Uhler's R2:            0.549
McKelvey and Zavoina's R2:     0.628     Efron's R2:                    0.472
Variance of y*:                8.833     Variance of error:             3.290
Count R2:                      0.897     Adj Count R2:                  0.514
AIC:                           0.629     AIC*n:                       220.806
BIC:                       -1813.166     BIC':                       -123.455

.
. scalar ProbsocModFw3 = "none"

.
. title4 " testing for male and female dose probsoc mediators"
-------------
 testing for male and female dose probsoc mediators
-------------

. * Male mediator dose social problem response models
.
.
.
. // age is a male mediator
. glm age avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6336

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

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

                                                   AIC             =  7.839021
Log likelihood   = -1330.633586                    BIC             =   47957.2

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .5433648    .2472657      2.20    0.028       .058733     1.027997
       _cons |    48.52021    .7247376     66.95    0.000      47.09975     49.94067
-------------+----------------------------------------------------------------

. 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 radhlw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1695.1855

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

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

                                                   AIC             =  9.983444
Log likelihood   = -1695.185473                    BIC             =  424265.5

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .9606492    .7224692      1.33    0.184     -.4553645     2.376663
       _cons |    46.19995    2.117563     21.82    0.000       42.0496      50.3503
-------------+----------------------------------------------------------------

. glm HP2probsoc radhlw3 if gender==1,fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  224.6665
Iteration 2:   deviance =  216.1679
Iteration 3:   deviance =  215.5978
Iteration 4:   deviance =  215.5929
Iteration 5:   deviance =  215.5929

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  215.5929138                    (1/df) Deviance =  .6378489
Pearson          =  333.7963451                    (1/df) Pearson  =  .9875632

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

                                                   BIC             = -1754.591

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0156818    .0022898      6.85    0.000      .0111939     .0201697
       _cons |   -2.095692    .1691863    -12.39    0.000     -2.427291    -1.764093
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm shjobw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1720.6013

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

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

                                                   AIC             =  10.13295
Log likelihood   = -1720.601326                    BIC             =    493000

-------------+----------------------------------------------------------------
             |                 OIM
      shjobw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.2000973    .7785454     -0.26    0.797     -1.726018     1.325824
       _cons |    41.22913    2.281923     18.07    0.000      36.75664     45.70162
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw3 if gender==1,fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  249.6649
Iteration 2:   deviance =  248.8792
Iteration 3:   deviance =  248.8773
Iteration 4:   deviance =  248.8773

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  248.8773343                    (1/df) Deviance =  .7363235
Pearson          =  340.8400768                    (1/df) Pearson  =  1.008403

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

                                                   BIC             = -1721.306

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw3 |    .0026922    .0019572      1.38    0.169     -.0011439     .0065284
       _cons |   -1.288564    .1154816    -11.16    0.000     -1.514904    -1.062225
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. // shjobw3Xd3 is almost significant but not quite
. glm radhlw3 shjobw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1694.063

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

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

                                                   AIC             =  9.982724
Log likelihood   = -1694.063021                    BIC             =  421466.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw3 |    .0752798    .0503833      1.49    0.135     -.0234697     .1740293
avgcumdosew3 |    .9757125    .7212261      1.35    0.176     -.4378647      2.38929
       _cons |    43.09623    2.963577     14.54    0.000      37.28772     48.90473
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw3 avgcumdosew3 shjobw3Xd3  if gender==1,fam(bin) ///
>   irls scale(dev) link(probit)

Iteration 1:   deviance =  244.6055
Iteration 2:   deviance =  243.0617
Iteration 3:   deviance =  241.3069
Iteration 4:   deviance =   240.868
Iteration 5:   deviance =  240.8657
Iteration 6:   deviance =  240.8656
Iteration 7:   deviance =  240.8656
Iteration 8:   deviance =  240.8656

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  240.8656032                    (1/df) Deviance =  .7168619
Pearson          =  340.9255101                    (1/df) Pearson  =  1.014659

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

                                                   BIC             =  -1717.66

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw3 |   -.0045194    .0035953     -1.26    0.209     -.0115661     .0025273
avgcumdosew3 |   -.0918458    .0746098     -1.23    0.218     -.2380783     .0543867
  shjobw3Xd3 |    .0066355     .002922      2.27    0.023      .0009086     .0123624
       _cons |   -1.180909    .1352851     -8.73    0.000     -1.446063    -.9157549
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar ProbsocMedMw3 = "age"

.
. * female mediator tests
.
. // age is a female mediator
. glm age avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1408.064

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

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

                                                   AIC             =  7.768948
Log likelihood   =  -1408.06405                    BIC             =  47606.63

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.058366    .3512614      3.01    0.003      .3699069     1.746826
       _cons |    48.94293    .7468173     65.54    0.000      47.47919     50.40666
-------------+----------------------------------------------------------------

. 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.)

.
. // radhlw3 is a female mediator
. glm radhlw3 avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1798.7074

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

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

                                                   AIC             =  9.921253
Log likelihood   = -1798.707367                    BIC             =  425821.1

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    2.751602     1.03038      2.67    0.008      .7320943      4.77111
       _cons |    57.70689    2.190692     26.34    0.000      53.41321     62.00057
-------------+----------------------------------------------------------------

. glm HP2probsoc radhlw3 if gender==2,fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  332.0999
Iteration 2:   deviance =   329.376
Iteration 3:   deviance =  329.3467
Iteration 4:   deviance =  329.3467
Iteration 5:   deviance =  329.3467

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  329.3467003                    (1/df) Deviance =  .9123177
Pearson          =   374.561784                    (1/df) Pearson  =  1.037567

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

                                                   BIC             = -1798.533

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0145154    .0024198      6.00    0.000      .0097727     .0192582
       _cons |   -1.818717    .1912579     -9.51    0.000     -2.193576    -1.443859
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm bf4 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1072

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

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

                                                   AIC             =  6.053572
Log likelihood   = -1027.107224                    BIC             =  6403.723

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.0357675    .1012648     -0.35    0.724     -.2342429     .1627078
       _cons |    12.54064    .2968079     42.25    0.000      11.95891     13.12238
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  194.8196
Iteration 2:   deviance =   182.741
Iteration 3:   deviance =  181.7875
Iteration 4:   deviance =  181.7753
Iteration 5:   deviance =  181.7753
Iteration 6:   deviance =  181.7753

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  181.7752898                    (1/df) Deviance =  .5377967
Pearson          =  293.1088357                    (1/df) Pearson  =  .8671859

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

                                                   BIC             = -1788.408

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.1440261    .0137935    -10.44    0.000     -.1710608    -.1169913
       _cons |    .3344471    .1497689      2.23    0.026      .0409054     .6279887
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. // shjobw3Xd3 is almost significant but not quite
. glm radhlw3 shjobw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1694.063

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

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

                                                   AIC             =  9.982724
Log likelihood   = -1694.063021                    BIC             =  421466.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw3 |    .0752798    .0503833      1.49    0.135     -.0234697     .1740293
avgcumdosew3 |    .9757125    .7212261      1.35    0.176     -.4378647      2.38929
       _cons |    43.09623    2.963577     14.54    0.000      37.28772     48.90473
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw3 avgcumdosew3 shjobw3Xd3  if gender==1,fam(bin) ///
>    irls scale(dev) link(probit)

Iteration 1:   deviance =  244.6055
Iteration 2:   deviance =  243.0617
Iteration 3:   deviance =  241.3069
Iteration 4:   deviance =   240.868
Iteration 5:   deviance =  240.8657
Iteration 6:   deviance =  240.8656
Iteration 7:   deviance =  240.8656
Iteration 8:   deviance =  240.8656

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  240.8656032                    (1/df) Deviance =  .7168619
Pearson          =  340.9255101                    (1/df) Pearson  =  1.014659

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

                                                   BIC             =  -1717.66

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw3 |   -.0045194    .0035953     -1.26    0.209     -.0115661     .0025273
avgcumdosew3 |   -.0918458    .0746098     -1.23    0.218     -.2380783     .0543867
  shjobw3Xd3 |    .0066355     .002922      2.27    0.023      .0009086     .0123624
       _cons |   -1.180909    .1352851     -8.73    0.000     -1.446063    -.9157549
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar ProbsocMedFw3 = "age radhlw3"

.
. title4  "summary matrix for dose Hp2probsoc impact in wave 3"
-------------
summary matrix for dose Hp2probsoc impact in wave 3
-------------

. * male hp2spM w3  mediators: age
. * dose is not significant main effect for males
. * female hp2spF w3 mediators: age radhlw3
. * dose is not sig main effect for males
.
. scalar SigDoseProbsocMw3 = "no"

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

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

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

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

.     matrix define HP2spFw3= (1, 2, 3, 2, 1, 5, 5, 2 )

.         matrix define HP2spMw3= (1, 2, 3, 1, 0, 2, 0, 1 )

.         matrix rowname HP2spMw3 = HP2spMw3

.         matrix rowname HP2spFw3 = HP2spFw3

.         matlist HP2spMw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2spMw3   |         1            2            3            1            0            2            0            1

.         matlist HP2spFw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2spFw3   |         1            2            3            2            1            5            5            2

.         matrix define H1pt2w3 = ( HP2wkMw3 \ HP2wkFw3 \ HP2hmcrMw3 \ HP2hmcrFw3 \ HP2spMw3 \ HP2spFw3 )

.
.         matlist H1pt2w3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0            4
r1   |         1            2            3            2            0            1            0            6
r1   |         1            2            3            1            0            4            0            2
r1   |         1            2            3            2            0            2            0            2
HP2spMw3   |         1            2            3            1            0            2            0            1
HP2spFw3   |         1            2            3            2            1            5            5            2

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

.     matrix rownames H1pt2w3 =   HP2wkMw3 HP2wkFw3 HP2hmcrMw3 HP2hmcrFw3 HP2socprbMw3 HP2socprbFw3

.     matlist H1pt2w3

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
HP2wkMw3   |         1            2            3            1            0            4            0            4
HP2wkFw3   |         1            2            3            2            0            1            0            6
HP2hmcrMw3   |         1            2            3            1            0            4            0            2
HP2hmcrFw3   |         1            2            3            2            0            2            0            2
HP2socprbMw3   |         1            2            3            1            0            2            0            1
HP2socprbFw3   |         1            2            3            2            1            5            5            2

.
.
. *xx  significant dose effect for females
. scalar ProbsocModFw3 = "none"

. *xx  no female moderators for Dose Social problem impact relationship
. scalar list
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
  wkMedFw3 = radhlw3 age bf40 bf4m bf1
  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.  Wave 3 part2 hypothesis 1 Pt2 Probs with Fam at home"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****      4.  Wave 3 part2 hypothesis 1 Pt2 Probs with Fam at home       *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:45:58  *****
*******************************************************************************
*******************************************************************************


. forvalues j=3/3 {
  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 w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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. title "Full Nottingham Part 2 subscale models for male and then females"
 12.
.       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)
 13.                         estat class
 14.                         estat gof
 15.                         fitstat
 16. }
 17. }
 18. }

              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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3

chunk 5 H1 test:Gender= 1  model Wave =  3 for HP2probsoc


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:45:58  *****
*******************************************************************************
*******************************************************************************


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 14 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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 13 obs not used

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 6 obs not used

note: movew3 != 0 predicts failure perfectly
      movew3 dropped and 22 obs not used

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        248
                                                  LR chi2(42)     =      61.10
                                                  Prob > chi2     =     0.0286
Log likelihood = -43.736999                       Pseudo R2       =     0.4112

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0762859    .0508028      1.50    0.133     -.0232857     .1758575
    _Ieduc_2 |           0   (omitted)
    _Ieduc_3 |   -.1477637    .8109786     -0.18    0.855     -1.737253     1.441725
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.7596947    1.090598     -0.70    0.486     -2.897227     1.377837
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -10.90364    2018.344     -0.01    0.996     -3966.785     3944.977
      occ2w3 |   -10.89538    2018.344     -0.01    0.996     -3966.777     3944.986
      occ3w3 |   -9.963313    2018.344     -0.00    0.996     -3965.846     3945.919
      occ4w3 |    -10.3499    2018.344     -0.01    0.996     -3966.232     3945.532
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -10.56369    2018.344     -0.01    0.996     -3966.445     3945.318
      occ8w3 |           0   (omitted)
     marrw31 |    1.938945    1.834088      1.06    0.290     -1.655802     5.533692
     marrw32 |    2.869349     2.03424      1.41    0.158     -1.117687     6.856385
     marrw33 |   -2.070881    2.007923     -1.03    0.302     -6.006338     1.864576
     marrw35 |    3.548252    2.186549      1.62    0.105     -.7373048     7.833809
     marrw36 |           0   (omitted)
      inc1w3 |    12.37597    2018.344      0.01    0.995     -3943.505     3968.257
      inc2w3 |    12.75723    2018.343      0.01    0.995     -3943.123     3968.637
      inc3w3 |    11.01982    2018.344      0.01    0.996     -3944.861       3966.9
      inc4w3 |      11.952    2018.345      0.01    0.995     -3943.931     3967.835
     radhlw3 |     .032589    .0182947      1.78    0.075     -.0032679     .0684459
      havmil |    .0129536     .013774      0.94    0.347     -.0140429     .0399501
avgcumdosew3 |   -.3791136    .3273992     -1.16    0.247     -1.020804     .2625771
         bf1 |   -.1029605    .0825755     -1.25    0.212     -.2648056     .0588846
         bf4 |   -.1906164    .3464978     -0.55    0.582     -.8697396     .4885069
         bf2 |    .0004772    .0003548      1.35    0.179     -.0002181     .0011725
        bf4m |    .0772469    .2972932      0.26    0.795      -.505437     .6599308
        bf5m |   -.0019382    .0047879     -0.40    0.686     -.0113224      .007446
        bf7m |    .0012129     .001013      1.20    0.231     -.0007725     .0031983
         bf8 |   -3.27e-06    .0000957     -0.03    0.973     -.0001909     .0001843
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0430617    .0653802      0.66    0.510     -.0850811     .1712045
        bf22 |   -4.46e-06    .0002995     -0.01    0.988     -.0005915     .0005826
        bf29 |           0   (omitted)
        bf30 |     .000126    .0007197      0.18    0.861     -.0012845     .0015365
        bf40 |     .071783    .4795976      0.15    0.881     -.8682111     1.011777
       deaw3 |    .3272315    .4280065      0.76    0.445     -.5116458     1.166109
      dvcew3 |    1.631036    1.568401      1.04    0.298     -1.442973     4.705045
      sepaw3 |    .2595898    1.605075      0.16    0.872     -2.886299     3.405479
      accdw3 |   -.9114258    2.076173     -0.44    0.661     -4.980649     3.157798
      movew3 |           0   (omitted)
       illw3 |   -.5480408    .5150453     -1.06    0.287     -1.557511     .4614294
     shfamw3 |    .0143257    .0164517      0.87    0.384      -.017919     .0465703
      shhlw3 |   -.0109085    .0129224     -0.84    0.399     -.0362359      .014419
     shjobw3 |   -.0129256    .0143995     -0.90    0.369     -.0411481     .0152969
    shrelaw3 |   -.0047884     .012683     -0.38    0.706     -.0296466     .0200697
     suprtw3 |     .025454    .0177967      1.43    0.153     -.0094269     .0603349
     suchrw3 |    .0037567    .0120299      0.31    0.755     -.0198214     .0273349
    havmilsq |   -.0000259    .0000249     -1.04    0.299     -.0000746     .0000229
       _cons |   -12.84498    6.147159     -2.09    0.037     -24.89319      -.79677
-------------+----------------------------------------------------------------


Note: 5 failures and 0 successes completely determined.


Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         9             4  |         13
     -     |        13           222  |        235
-----------+--------------------------+-----------
   Total   |        22           226  |        248

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   40.91%
Specificity                     Pr( -|~D)   98.23%
Positive predictive value       Pr( D| +)   69.23%
Negative predictive value       Pr(~D| -)   94.47%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.77%
False - rate for true D         Pr( -| D)   59.09%
False + rate for classified +   Pr(~D| +)   30.77%
False - rate for classified -   Pr( D| -)    5.53%
--------------------------------------------------
Correctly classified                        93.15%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       248
 number of covariate patterns =       248
            Pearson chi2(205) =       151.48
                  Prob > chi2 =         0.9980

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:      -74.286     Log-Lik Full Model:          -43.737
D(192):                       87.474     LR(42):                       61.099
                                         Prob > LR:                     0.029
McFadden's R2:                 0.411     McFadden's Adj R2:            -0.343
Maximum Likelihood R2:         0.218     Cragg & Uhler's R2:            0.485
McKelvey and Zavoina's R2:     0.816     Efron's R2:                    0.329
Variance of y*:               17.878     Variance of error:             3.290
Count R2:                      0.931     Adj Count R2:                  0.227
AIC:                           0.804     AIC*n:                       199.474
BIC:                        -971.104     BIC':                        170.465
Full main model for HP2pbfhm for wave= 3

chunk 5 H1 test:Gender= 2  model Wave =  3 for HP2pbfhm


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:46:00  *****
*******************************************************************************
*******************************************************************************


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

note: occ4w3 != 0 predicts failure perfectly
      occ4w3 dropped and 8 obs not used

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

note: marrw32 != 0 predicts failure perfectly
      marrw32 dropped and 7 obs not used

note: inc4w3 != 0 predicts failure perfectly
      inc4w3 dropped and 8 obs not used

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

note: movew3 != 0 predicts failure perfectly
      movew3 dropped and 9 obs not used

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        277
                                                  LR chi2(45)     =      88.17
                                                  Prob > chi2     =     0.0001
Log likelihood =  -80.45257                       Pseudo R2       =     0.3540

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0605232    .0301499      2.01    0.045      .0014305     .1196159
    _Ieduc_2 |    14.33097     3050.48      0.00    0.996       -5964.5     5993.162
    _Ieduc_3 |    14.57814     3050.48      0.00    0.996     -5964.253     5993.409
    _Ieduc_4 |    14.71229     3050.48      0.00    0.996     -5964.119     5993.543
    _Ieduc_5 |    14.46503     3050.48      0.00    0.996     -5964.366     5993.296
    _Ieduc_6 |    14.13284     3050.48      0.00    0.996     -5964.698     5992.964
    _Ieduc_7 |    16.45371    3050.482      0.01    0.996     -5962.382     5995.289
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -.9142061    3.466224     -0.26    0.792      -7.70788     5.879468
      occ2w3 |           0   (omitted)
      occ3w3 |   -.2867411    3.495557     -0.08    0.935     -7.137908     6.564426
      occ4w3 |           0   (omitted)
      occ5w3 |    2.578209     4.53518      0.57    0.570     -6.310581       11.467
      occ6w3 |           0   (omitted)
      occ7w3 |   -.5244179     3.46458     -0.15    0.880      -7.31487     6.266034
      occ8w3 |           0   (omitted)
     marrw31 |    13.57521    900.6841      0.02    0.988     -1751.733     1778.884
     marrw32 |           0   (omitted)
     marrw33 |     15.5368    900.6835      0.02    0.986      -1749.77     1780.844
     marrw35 |    15.43053    900.6834      0.02    0.986     -1749.877     1780.738
     marrw36 |    15.00571    900.6833      0.02    0.987     -1750.301     1780.313
      inc1w3 |    2.006505    3.516446      0.57    0.568     -4.885601     8.898612
      inc2w3 |    2.111761    3.483985      0.61    0.544     -4.716724     8.940246
      inc3w3 |    1.911831    3.463507      0.55    0.581     -4.876519      8.70018
      inc4w3 |           0   (omitted)
     radhlw3 |    .0113673    .0123354      0.92    0.357     -.0128096     .0355442
      havmil |   -.0010166    .0142076     -0.07    0.943     -.0288629     .0268297
avgcumdosew3 |   -.0338506    .1440343     -0.24    0.814     -.3161526     .2484513
         bf1 |   -.0040962    .0453653     -0.09    0.928     -.0930105     .0848181
         bf4 |   -.3790747    .2483688     -1.53    0.127     -.8658686     .1077192
         bf2 |    .0000525    .0001469      0.36    0.721     -.0002354     .0003404
        bf4m |    .1263528    .2275811      0.56    0.579     -.3196979     .5724036
        bf5m |   -.0049342    .0041169     -1.20    0.231     -.0130031     .0031348
        bf7m |   -.0004133    .0008454     -0.49    0.625     -.0020703     .0012437
         bf8 |    .0001156    .0000755      1.53    0.125     -.0000323     .0002635
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0078983    .0366468     -0.22    0.829     -.0797248     .0639282
        bf22 |     .000158    .0001863      0.85    0.396     -.0002071     .0005231
        bf29 |    9.34e-06    .0000425      0.22    0.826      -.000074     .0000927
        bf30 |   -.0000869    .0004483     -0.19    0.846     -.0009655     .0007917
        bf40 |   -.2779981    .1983152     -1.40    0.161     -.6666887     .1106924
       deaw3 |   -.0223131    .2253092     -0.10    0.921     -.4639109     .4192848
      dvcew3 |    1.571998    1.037736      1.51    0.130     -.4619271     3.605923
      sepaw3 |   -1.894764    1.527486     -1.24    0.215     -4.888582     1.099055
      accdw3 |   -.2729555    .6926052     -0.39    0.694     -1.630437     1.084526
      movew3 |           0   (omitted)
       illw3 |   -.1949663    .2468671     -0.79    0.430     -.6788169     .2888842
     shfamw3 |   -.0082258    .0094908     -0.87    0.386     -.0268274     .0103758
      shhlw3 |    .0062899    .0080613      0.78    0.435       -.00951     .0220898
     shjobw3 |   -.0009012    .0093159     -0.10    0.923     -.0191601     .0173576
    shrelaw3 |   -.0126452    .0092607     -1.37    0.172     -.0307958     .0055054
     suprtw3 |    -.004099    .0105306     -0.39    0.697     -.0247385     .0165405
     suchrw3 |   -.0078922    .0065901     -1.20    0.231     -.0208085     .0050241
    havmilsq |   -4.43e-06     .000039     -0.11    0.909     -.0000808      .000072
       _cons |   -32.88256    3180.672     -0.01    0.992     -6266.884     6201.119
-------------+----------------------------------------------------------------


Note: 5 failures and 0 successes completely determined.


Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        22             9  |         31
     -     |        24           222  |        246
-----------+--------------------------+-----------
   Total   |        46           231  |        277

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   47.83%
Specificity                     Pr( -|~D)   96.10%
Positive predictive value       Pr( D| +)   70.97%
Negative predictive value       Pr(~D| -)   90.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.90%
False - rate for true D         Pr( -| D)   52.17%
False + rate for classified +   Pr(~D| +)   29.03%
False - rate for classified -   Pr( D| -)    9.76%
--------------------------------------------------
Correctly classified                        88.09%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       277
 number of covariate patterns =       277
            Pearson chi2(231) =       439.38
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:     -124.537     Log-Lik Full Model:          -80.453
D(221):                      160.905     LR(45):                       88.169
                                         Prob > LR:                     0.000
McFadden's R2:                 0.354     McFadden's Adj R2:            -0.096
Maximum Likelihood R2:         0.273     Cragg & Uhler's R2:            0.460
McKelvey and Zavoina's R2:     0.796     Efron's R2:                    0.384
Variance of y*:               16.128     Variance of error:             3.290
Count R2:                      0.881     Adj Count R2:                  0.283
AIC:                           0.985     AIC*n:                       272.905
BIC:                       -1082.003     BIC':                        164.912

.
.
. title "Partly Trimmed male wave 3  Dose => Problems with Family at home models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Partly Trimmed male wave 3  Dose => Problems with Family at home models*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:46:01  *****
*******************************************************************************
*******************************************************************************


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

. logit HP2pbfhm age sepaw3 dvcew3 radhlw3 avgcumdosew3 suprtw3 ///
>    havmilsq illw3 `w3bf' if gender==1, iterate(50)

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 8 obs not used

note: bf17 omitted because of collinearity
Iteration 0:   log likelihood = -79.475349
Iteration 1:   log likelihood =  -67.02422
Iteration 2:   log likelihood = -60.135828
Iteration 3:   log likelihood = -59.852788
Iteration 4:   log likelihood = -59.850816
Iteration 5:   log likelihood = -59.850815

Logistic regression                               Number of obs   =        311
                                                  LR chi2(19)     =      39.25
                                                  Prob > chi2     =     0.0041
Log likelihood = -59.850815                       Pseudo R2       =     0.2469

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .043687    .0250852      1.74    0.082     -.0054791      .092853
      sepaw3 |    1.382077    1.196445      1.16    0.248     -.9629124     3.727067
      dvcew3 |    1.720325    1.049833      1.64    0.101     -.3373098      3.77796
     radhlw3 |    .0111639    .0118036      0.95    0.344     -.0119707     .0342986
avgcumdosew3 |   -.0948486    .2407308     -0.39    0.694     -.5666722      .376975
     suprtw3 |   -.0049975    .0064124     -0.78    0.436     -.0175656     .0075705
    havmilsq |   -1.41e-06    6.40e-06     -0.22    0.826      -.000014     .0000111
       illw3 |    -.190415    .3387342     -0.56    0.574     -.8543217     .4734918
         bf1 |   -.0587243    .0691016     -0.85    0.395      -.194161     .0767123
         bf4 |   -.2551053    .2251582     -1.13    0.257     -.6964073     .1861967
         bf2 |    .0004205    .0002504      1.68    0.093     -.0000704     .0009113
        bf4m |    .0336013    .2032952      0.17    0.869     -.3648499     .4320525
        bf5m |    .0012898    .0029269      0.44    0.659     -.0044468     .0070264
        bf7m |    .0016168    .0007794      2.07    0.038      .0000891     .0031445
         bf8 |   -.0000436    .0000621     -0.70    0.483     -.0001653     .0000781
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0203096    .0573578      0.35    0.723     -.0921097     .1327289
        bf22 |   -.0000858    .0002375     -0.36    0.718     -.0005514     .0003797
        bf29 |           0   (omitted)
        bf30 |    -.000487    .0004957     -0.98    0.326     -.0014586     .0004845
        bf40 |   -.0932224    .3574103     -0.26    0.794     -.7937336     .6072889
       _cons |   -4.855589    3.519856     -1.38    0.168     -11.75438     2.043202
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         1             3  |          4
     -     |        21           286  |        307
-----------+--------------------------+-----------
   Total   |        22           289  |        311

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    4.55%
Specificity                     Pr( -|~D)   98.96%
Positive predictive value       Pr( D| +)   25.00%
Negative predictive value       Pr(~D| -)   93.16%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.04%
False - rate for true D         Pr( -| D)   95.45%
False + rate for classified +   Pr(~D| +)   75.00%
False - rate for classified -   Pr( D| -)    6.84%
--------------------------------------------------
Correctly classified                        92.28%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       311
 number of covariate patterns =       310
            Pearson chi2(290) =       253.04
                  Prob > chi2 =         0.9426

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -79.475     Log-Lik Full Model:          -59.851
D(288):                      119.702     LR(19):                       39.249
                                         Prob > LR:                     0.004
McFadden's R2:                 0.247     McFadden's Adj R2:            -0.042
Maximum Likelihood R2:         0.119     Cragg & Uhler's R2:            0.296
McKelvey and Zavoina's R2:     0.486     Efron's R2:                    0.165
Variance of y*:                6.405     Variance of error:             3.290
Count R2:                      0.923     Adj Count R2:                 -0.091
AIC:                           0.533     AIC*n:                       165.702
BIC:                       -1533.359     BIC':                         69.807

.
. title "fully Trimmed male main effects wv 3" " Dose => Problems with Family at home models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                fully Trimmed male main effects wv 3                 *****
*****             Dose => Problems with Family at home models             *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:46:03  *****
*******************************************************************************
*******************************************************************************


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

. sw, pr(.1):logit HP2pbfhm age sepaw3 dvcew3 radhlw3 avgcumdosew3 suprtw3 ///
>    havmilsq illw3 `w3bf' if gender==1, iterate(50)
note: bf15m dropped because of estimability
note: bf17 dropped because of estimability
note: bf29 dropped because of estimability
note: o.bf15m dropped because of estimability
note: o.bf17 dropped because of estimability
note: o.bf29 dropped because of estimability
note: 29 obs. dropped because of estimability


  begin with full model


p = 0.8687 >= 0.1000  removing bf4m


p = 0.8320 >= 0.1000  removing havmilsq


p = 0.7873 >= 0.1000  removing bf40


p = 0.7202 >= 0.1000  removing bf20


p = 0.6874 >= 0.1000  removing avgcumdosew3


p = 0.6350 >= 0.1000  removing bf5m


p = 0.5258 >= 0.1000  removing bf8


p = 0.4782 >= 0.1000  removing illw3


p = 0.4550 >= 0.1000  removing radhlw3


p = 0.4439 >= 0.1000  removing bf30


p = 0.3545 >= 0.1000  removing suprtw3


p = 0.2500 >= 0.1000  removing bf22


p = 0.3169 >= 0.1000  removing sepaw3


p = 0.1709 >= 0.1000  removing age


Logistic regression                               Number of obs   =        311
                                                  LR chi2(5)      =      31.19
                                                  Prob > chi2     =     0.0000
Log likelihood = -63.878677                       Pseudo R2       =     0.1962

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf1 |   -.0373492    .0219622     -1.70    0.089     -.0803943     .0056959
         bf4 |   -.2457605    .0676591     -3.63    0.000       -.37837    -.1131511
      dvcew3 |    2.001697      .80438      2.49    0.013      .4251407     3.578253
         bf2 |    .0003872     .000212      1.83    0.068     -.0000283     .0008027
        bf7m |    .0014478    .0004687      3.09    0.002      .0005292     .0023664
       _cons |   -1.533868    .7653632     -2.00    0.045     -3.033953    -.0337839
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             0  |          0
     -     |        22           289  |        311
-----------+--------------------------+-----------
   Total   |        22           289  |        311

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| -)   92.93%
--------------------------------------------------
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| -)    7.07%
--------------------------------------------------
Correctly classified                        92.93%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       311
 number of covariate patterns =       263
            Pearson chi2(257) =       376.88
                  Prob > chi2 =         0.0000

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -79.475     Log-Lik Full Model:          -63.879
D(305):                      127.757     LR(5):                        31.193
                                         Prob > LR:                     0.000
McFadden's R2:                 0.196     McFadden's Adj R2:             0.121
Maximum Likelihood R2:         0.095     Cragg & Uhler's R2:            0.238
McKelvey and Zavoina's R2:     0.411     Efron's R2:                    0.128
Variance of y*:                5.587     Variance of error:             3.290
Count R2:                      0.929     Adj Count R2:                  0.000
AIC:                           0.449     AIC*n:                       139.757
BIC:                       -1622.879     BIC':                         -2.494

.
. scalar MainEffPrbfhmMw3 = "bf1 bf4 dvcew3 bf7m"

. scalar SigDosePrbfhmMw3 = "no"

. // construction of moderators for male model
.
. foreach var in bf1 bf4 dvcew3 bf2 bf7m {
  2.  cap gen `var'Xd3 = `var'*avgcumdosew3
  3.   }

.
.
.
.
. ******************************************************************************
. *-------chunk 6  continued -testing moderators and none found for males
. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40

.
.
. title "fully Trimmed male main effects wv 3" ///
>   "Dose => Problems with Family at home models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                fully Trimmed male main effects wv 3                 *****
*****            Dose => Problems with Family at home models              *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:46:25  *****
*******************************************************************************
*******************************************************************************


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

. sw, pr(.1):logit HP2pbfhm age sepaw3 dvcew3 radhlw3 avgcumdosew3 suprtw3 ///
>    havmilsq illw3 `w3bf' bf1Xd3 bf4Xd3  bf2Xd3 bf7mXd3 dvcew3Xd3 if ///
>     gender==1, iterate(50)
note: bf15m dropped because of estimability
note: bf17 dropped because of estimability
note: bf29 dropped because of estimability
note: o.bf15m dropped because of estimability
note: o.bf17 dropped because of estimability
note: o.bf29 dropped because of estimability
note: 29 obs. dropped because of estimability


  begin with full model


p = 0.9832 >= 0.1000  removing bf2Xd3


p = 0.8995 >= 0.1000  removing bf4m


p = 0.8784 >= 0.1000  removing havmilsq


p = 0.8427 >= 0.1000  removing bf7mXd3


p = 0.8108 >= 0.1000  removing bf1Xd3


p = 0.7829 >= 0.1000  removing dvcew3Xd3


p = 0.7779 >= 0.1000  removing bf40


p = 0.6983 >= 0.1000  removing bf20


p = 0.6391 >= 0.1000  removing bf4Xd3


p = 0.6874 >= 0.1000  removing avgcumdosew3


p = 0.6350 >= 0.1000  removing bf5m


p = 0.5258 >= 0.1000  removing bf8


p = 0.4782 >= 0.1000  removing illw3


p = 0.4550 >= 0.1000  removing radhlw3


p = 0.4439 >= 0.1000  removing bf30


p = 0.3545 >= 0.1000  removing suprtw3


p = 0.2500 >= 0.1000  removing bf22


p = 0.3169 >= 0.1000  removing sepaw3


p = 0.1709 >= 0.1000  removing age


Logistic regression                               Number of obs   =        311
                                                  LR chi2(5)      =      31.19
                                                  Prob > chi2     =     0.0000
Log likelihood = -63.878677                       Pseudo R2       =     0.1962

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf1 |   -.0373492    .0219622     -1.70    0.089     -.0803943     .0056959
         bf4 |   -.2457605    .0676591     -3.63    0.000       -.37837    -.1131511
      dvcew3 |    2.001697      .80438      2.49    0.013      .4251407     3.578253
         bf2 |    .0003872     .000212      1.83    0.068     -.0000283     .0008027
        bf7m |    .0014478    .0004687      3.09    0.002      .0005292     .0023664
       _cons |   -1.533868    .7653632     -2.00    0.045     -3.033953    -.0337839
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             0  |          0
     -     |        22           289  |        311
-----------+--------------------------+-----------
   Total   |        22           289  |        311

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| -)   92.93%
--------------------------------------------------
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| -)    7.07%
--------------------------------------------------
Correctly classified                        92.93%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       311
 number of covariate patterns =       263
            Pearson chi2(257) =       376.88
                  Prob > chi2 =         0.0000

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -79.475     Log-Lik Full Model:          -63.879
D(305):                      127.757     LR(5):                        31.193
                                         Prob > LR:                     0.000
McFadden's R2:                 0.196     McFadden's Adj R2:             0.121
Maximum Likelihood R2:         0.095     Cragg & Uhler's R2:            0.238
McKelvey and Zavoina's R2:     0.411     Efron's R2:                    0.128
Variance of y*:                5.587     Variance of error:             3.290
Count R2:                      0.929     Adj Count R2:                  0.000
AIC:                           0.449     AIC*n:                       139.757
BIC:                       -1622.879     BIC':                         -2.494

.
. scalar SigDosePrbfmhmMw3 = "no"

. scalar PrbfmhmModw3 = "none"

.
. * 3 main effects signif   no main effect for dose  for males
.
.
. ********************************************************************************
. title4 "Chunk 6  continued -testing meditors for females"
-------------
Chunk 6  continued -testing meditors for females
-------------

. title4 "Partly Trimmed female wave 3"  "Dose => Problems with Family at home models"
-------------
Partly Trimmed female wave 3
-------------

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

. logit HP2pbfhm age sepaw3 dvcew3 radhlw3 avgcumdosew3 bf4 bf8 bf40 ///
>    shrelaw3 suchrw3 suprtw3 ///
>    havmilsq illw3 `w3bf' if gender==2, iterate(50)

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

note: bf4 omitted because of collinearity
note: bf8 omitted because of collinearity
note: bf17 omitted because of collinearity
note: bf40 omitted because of collinearity
Iteration 0:   log likelihood = -138.20261
Iteration 1:   log likelihood =  -107.1176
Iteration 2:   log likelihood = -98.285924
Iteration 3:   log likelihood = -97.613948
Iteration 4:   log likelihood = -97.215263
Iteration 5:   log likelihood = -97.016716
Iteration 6:   log likelihood =  -97.01602
Iteration 7:   log likelihood =  -97.01602

Logistic regression                               Number of obs   =        351
                                                  LR chi2(22)     =      82.37
                                                  Prob > chi2     =     0.0000
Log likelihood =  -97.01602                       Pseudo R2       =     0.2980

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0659962    .0225025      2.93    0.003      .0218921     .1101004
      sepaw3 |   -1.683228    1.178604     -1.43    0.153     -3.993249     .6267931
      dvcew3 |    1.485172    .8647935      1.72    0.086     -.2097919     3.180137
     radhlw3 |    .0035908    .0097724      0.37    0.713     -.0155627     .0227442
avgcumdosew3 |   -.0050134    .0955728     -0.05    0.958     -.1923327     .1823058
         bf4 |   -.4468347     .206001     -2.17    0.030     -.8505891    -.0430802
         bf8 |     .000077    .0000606      1.27    0.204     -.0000419     .0001958
        bf40 |   -.2077098    .1799462     -1.15    0.248     -.5603979     .1449783
    shrelaw3 |   -.0100915    .0066972     -1.51    0.132     -.0232177     .0030347
     suchrw3 |   -.0018473    .0050562     -0.37    0.715     -.0117573     .0080627
     suprtw3 |   -.0007509    .0053268     -0.14    0.888     -.0111912     .0096894
    havmilsq |   -.0000106    .0000104     -1.02    0.307     -.0000309     9.72e-06
       illw3 |   -.1916894    .1864573     -1.03    0.304     -.5571391     .1737603
         bf1 |    .0061679    .0351165      0.18    0.861     -.0626591     .0749949
         bf4 |           0   (omitted)
         bf2 |   -4.09e-06    .0001228     -0.03    0.973     -.0002448     .0002366
        bf4m |    .1737474    .1875029      0.93    0.354     -.1937516     .5412463
        bf5m |   -.0028976    .0032338     -0.90    0.370     -.0092358     .0034407
        bf7m |   -.0001567    .0006973     -0.22    0.822     -.0015235       .00121
         bf8 |           0   (omitted)
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0123888    .0275582     -0.45    0.653     -.0664018     .0416242
        bf22 |    .0001102    .0001679      0.66    0.512     -.0002188     .0004393
        bf29 |    .0000104    .0000368      0.28    0.777     -.0000617     .0000826
        bf30 |   -.0002433    .0003662     -0.66    0.506      -.000961     .0004744
        bf40 |           0   (omitted)
       _cons |   -3.022865    2.303878     -1.31    0.189     -7.538383     1.492654
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        14             6  |         20
     -     |        33           298  |        331
-----------+--------------------------+-----------
   Total   |        47           304  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   29.79%
Specificity                     Pr( -|~D)   98.03%
Positive predictive value       Pr( D| +)   70.00%
Negative predictive value       Pr(~D| -)   90.03%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.97%
False - rate for true D         Pr( -| D)   70.21%
False + rate for classified +   Pr(~D| +)   30.00%
False - rate for classified -   Pr( D| -)    9.97%
--------------------------------------------------
Correctly classified                        88.89%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       351
            Pearson chi2(328) =       377.98
                  Prob > chi2 =         0.0296

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:     -138.203     Log-Lik Full Model:          -97.016
D(323):                      194.032     LR(22):                       82.373
                                         Prob > LR:                     0.000
McFadden's R2:                 0.298     McFadden's Adj R2:             0.095
Maximum Likelihood R2:         0.209     Cragg & Uhler's R2:            0.384
McKelvey and Zavoina's R2:     0.924     Efron's R2:                    0.280
Variance of y*:               43.415     Variance of error:             3.290
Count R2:                      0.889     Adj Count R2:                  0.170
AIC:                           0.712     AIC*n:                       250.032
BIC:                       -1699.002     BIC':                         46.564

.
. *-------Chunk 6  continued -testing meditors for females
. title "More partly female Trimmed wave 3"  "Dose => Problems with Family at home models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                 More partly female Trimmed wave 3                   *****
*****            Dose => Problems with Family at home models              *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:46:54  *****
*******************************************************************************
*******************************************************************************


. local w3bf bf1 bf4 bf2 bf8 bf15m bf17 bf20 bf22 bf29 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 SigDosePrbfmhmFw3 = "no"

. scalar MainEffPrbfmhmFw3 = "age bf4 bf40"

. * 3 significant main effects for females
. * no significant main effect for dose
.
. * constructing moderators
.
. foreach var in bf4 bf40 {
  2. cap  gen `var'Xd3 = `var'*avgcumdosew3
  3.  }

.
.
. *- testing female moderator effects:  no moderator effects for females
.
. sw, pr(.1): logit HP2pbfhm age bf4 bf40 ageXd3 bf4Xd3 bf40Xd3 if gender==2, iterate(50)


  begin with full model


p = 0.7256 >= 0.1000  removing bf4Xd3


p = 0.5514 >= 0.1000  removing bf40


Logistic regression                               Number of obs   =        363
                                                  LR chi2(4)      =      69.05
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.37103                       Pseudo R2       =     0.2468

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0553962    .0175151      3.16    0.002      .0210671     .0897253
         bf4 |   -.1901097    .0380586     -5.00    0.000     -.2647032    -.1155163
     bf40Xd3 |   -.1318421    .0668537     -1.97    0.049      -.262873    -.0008113
      ageXd3 |    .0078148    .0040047      1.95    0.051     -.0000342     .0156639
       _cons |   -3.363212    1.084085     -3.10    0.002     -5.487979    -1.238446
-------------+----------------------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       359
            Pearson chi2(354) =       358.75
                  Prob > chi2 =         0.4197

. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        12             4  |         16
     -     |        35           312  |        347
-----------+--------------------------+-----------
   Total   |        47           316  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   25.53%
Specificity                     Pr( -|~D)   98.73%
Positive predictive value       Pr( D| +)   75.00%
Negative predictive value       Pr(~D| -)   89.91%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.27%
False - rate for true D         Pr( -| D)   74.47%
False + rate for classified +   Pr(~D| +)   25.00%
False - rate for classified -   Pr( D| -)   10.09%
--------------------------------------------------
Correctly classified                        89.26%
--------------------------------------------------

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:     -139.897     Log-Lik Full Model:         -105.371
D(358):                      210.742     LR(4):                        69.051
                                         Prob > LR:                     0.000
McFadden's R2:                 0.247     McFadden's Adj R2:             0.211
Maximum Likelihood R2:         0.173     Cragg & Uhler's R2:            0.322
McKelvey and Zavoina's R2:     0.417     Efron's R2:                    0.228
Variance of y*:                5.645     Variance of error:             3.290
Count R2:                      0.893     Adj Count R2:                  0.170
AIC:                           0.608     AIC*n:                       220.742
BIC:                       -1899.454     BIC':                        -45.474

.
. scalar PrbfmhmModFw3="none"

.
. ********************************************************************************
. *---------Chunk 6 continued testing mediating effects for Problems with family
.  *  at home
.
. * age is a mediating effect for males for Dose=> 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 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6336

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

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

                                                   AIC             =  7.839021
Log likelihood   = -1330.633586                    BIC             =   47957.2

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .5433648    .2472657      2.20    0.028       .058733     1.027997
       _cons |    48.52021    .7247376     66.95    0.000      47.09975     49.94067
-------------+----------------------------------------------------------------

. 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  avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1072

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

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

                                                   AIC             =  6.053572
Log likelihood   = -1027.107224                    BIC             =  6403.723

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.0357675    .1012648     -0.35    0.724     -.2342429     .1627078
       _cons |    12.54064    .2968079     42.25    0.000      11.95891     13.12238
-------------+----------------------------------------------------------------

. 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 avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1408.064

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

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

                                                   AIC             =  7.768948
Log likelihood   =  -1408.06405                    BIC             =  47606.63

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.058366    .3512614      3.01    0.003      .3699069     1.746826
       _cons |    48.94293    .7468173     65.54    0.000      47.47919     50.40666
-------------+----------------------------------------------------------------

. 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  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.6569

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

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

                                                   AIC             =  6.124831
Log likelihood   = -1109.656873                    BIC             =   7479.99

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.4386292    .1543885     -2.84    0.004     -.7412252    -.1360333
       _cons |    11.01475    .3282456     33.56    0.000       10.3714      11.6581
-------------+----------------------------------------------------------------

. 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 bf40  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -818.14796

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

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

                                                   AIC             =  4.518722
Log likelihood   = -818.1479598                    BIC             = -199.8996

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .152897    .0691596      2.21    0.027      .0173466     .2884474
       _cons |    2.981537    .1470404     20.28    0.000      2.693343     3.269731
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  280.0603
Iteration 2:   deviance =  279.7443
Iteration 3:   deviance =  279.7441
Iteration 4:   deviance =  279.7441

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  279.7440687                    (1/df) Deviance =  .7749143
Pearson          =  362.9453702                    (1/df) Pearson  =  1.005389

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

                                                   BIC             = -1848.135

-------------+----------------------------------------------------------------
             |                 EIM
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .0081494    .0313367      0.26    0.795     -.0532693     .0695682
       _cons |   -1.154869    .1244365     -9.28    0.000     -1.398761    -.9109783
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar PrbfmhmMedMw3 = "age"

. scalar PrbfmhmMedFw3 = "age bf4"

.
. title4 " Summary of dose=problems with family at home  mediating effects "
-------------
 Summary of dose=problems with family at home  mediating effects
-------------

. * males mediators age 1
. * females mediators age and BSIsoma rescaled (bf4) 2
.
.    matrix define HP2prbfamMw3 = J(1,8, 0)

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

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

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

.     matrix define HP2prbfamMw3= (1, 2, 3, 1, 0, 5, 0, 1 )

.         matrix define HP2prbfamFw3= (1, 2, 3, 2, 0, 2, 2, 2)

.         matrix rowname HP2prbfamMw3 = HP2prbfamM

.         matrix rowname HP2prbfamFw3 = HP2prbfamF

.         matlist HP2prbfamMw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2prbfamM   |         1            2            3            1            0            5            0            1

.         matlist HP2prbfamFw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2prbfamF   |         1            2            3            2            0            2            2            2

.         matrix define H1pt2w3 = ( HP2wkMw3 \ HP2wkFw3 \ HP2hmcrMw3 \ HP2hmcrFw3 \HP2spMw3 \HP2spFw3 \ HP2prbfamMw3 \ HP2prbfamFw3 )

.
.         matlist H1pt2w3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0            4
r1   |         1            2            3            2            0            1            0            6
r1   |         1            2            3            1            0            4            0            2
r1   |         1            2            3            2            0            2            0            2
HP2spMw3   |         1            2            3            1            0            2            0            1
HP2spFw3   |         1            2            3            2            1            5            5            2
HP2prbfamM   |         1            2            3            1            0            5            0            1
HP2prbfamF   |         1            2            3            2            0            2            2            2

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

.     matrix rownames H1pt2w3 =   HP2wkMw3 HP2wkFw3 HP2hmcrMw3 HP2hmcrFw3 HP2prbfhmMw3 HP2prbfhmFw3

.     matlist H1pt2w3

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
HP2wkMw3   |         1            2            3            1            0            4            0            4
HP2wkFw3   |         1            2            3            2            0            1            0            6
HP2hmcrMw3   |         1            2            3            1            0            4            0            2
HP2hmcrFw3   |         1            2            3            2            0            2            0            2
HP2prbfhmMw3   |         1            2            3            1            0            2            0            1
HP2prbfhmFw3   |         1            2            3            2            1            5            5            2
HP2prbfhmFw3   |         1            2            3            1            0            5            0            1
HP2prbfhmFw3   |         1            2            3            2            0            2            2            2

.
.
. *-------------------------------------------------------------------------------
. ********************************************************************************
. *-------Chunk 7   Dose==> problems with sex life impact
. * Chunk 7  General model for all part 2 of Nottingham Health Profile
.
. title "5.  Wave 3 part2 H1: Test of hypothesis 1 with Male and Female Respondents" ///
>      " Wave 3 Main effects Dose=> sexlife impact identification"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****5.  Wave 3 part2 H1: Test of hypothesis 1 with Male and Female Respondents*****
*****      Wave 3 Main effects Dose=> sexlife impact identification       *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:15  *****
*******************************************************************************
*******************************************************************************


. forvalues j=3/3 {
  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 w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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 radhlw3 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3               *****
*****      chunk 7 H1 test:Gender= 1  model Wave =  3 for HP2pbfhm        *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:15  *****
*******************************************************************************
*******************************************************************************


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

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 8 obs not used

note: _Ieduc_8 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw3 omitted because of collinearity

Logistic regression                               Number of obs   =        304
                                                  LR chi2(47)     =     153.48
                                                  Prob > chi2     =     0.0000
Log likelihood = -86.082561                       Pseudo R2       =     0.4713

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1069256    .0319906      3.34    0.001      .0442252      .169626
    _Ieduc_2 |   -.7455102    2.711615     -0.27    0.783     -6.060177     4.569157
    _Ieduc_3 |   -1.187035     2.60622     -0.46    0.649     -6.295133     3.921063
    _Ieduc_4 |   -2.546669    2.819292     -0.90    0.366     -8.072379     2.979041
    _Ieduc_5 |   -.9083698    2.596245     -0.35    0.726     -5.996916     4.180177
    _Ieduc_6 |    -.821989     2.54798     -0.32    0.747     -5.815938      4.17196
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -13.83588    1847.337     -0.01    0.994     -3634.551     3606.879
      occ2w3 |    -14.1177    1847.337     -0.01    0.994     -3634.833     3606.597
      occ3w3 |   -15.12911    1847.338     -0.01    0.993     -3635.845     3605.586
      occ4w3 |   -14.04877    1847.338     -0.01    0.994     -3634.764     3606.666
      occ5w3 |   -13.39243    1847.338     -0.01    0.994     -3634.108     3607.323
      occ6w3 |           0   (omitted)
      occ7w3 |   -14.25779    1847.337     -0.01    0.994     -3634.973     3606.457
      occ8w3 |           0   (omitted)
     marrw31 |    1.917986    1.336919      1.43    0.151     -.7023282     4.538299
     marrw32 |   -.8798595    1.841469     -0.48    0.633     -4.489073     2.729354
     marrw33 |    .8814069    1.275273      0.69    0.489     -1.618082     3.380896
     marrw35 |    1.398611    1.615954      0.87    0.387     -1.768602     4.565823
     marrw36 |           0   (omitted)
      inc1w3 |    16.59262    1847.337      0.01    0.993     -3604.122     3637.307
      inc2w3 |    16.41393    1847.337      0.01    0.993       -3604.3     3637.128
      inc3w3 |     14.9931    1847.337      0.01    0.994     -3605.721     3635.708
      inc4w3 |    13.76529    1847.339      0.01    0.994     -3606.952     3634.482
     radhlw3 |    .0155883    .0090158      1.73    0.084     -.0020824     .0332591
      havmil |    .0032884    .0119659      0.27    0.783     -.0201643     .0267412
avgcumdosew3 |    .0366781    .0541231      0.68    0.498     -.0694012     .1427574
         bf1 |    .0224773    .0438725      0.51    0.608     -.0635113      .108466
         bf4 |   -.3119601    .2453847     -1.27    0.204     -.7929052      .168985
         bf2 |    .0000786    .0001745      0.45    0.652     -.0002634     .0004207
        bf4m |    .0103662    .2174828      0.05    0.962     -.4158923     .4366247
        bf5m |    .0028825    .0019867      1.45    0.147     -.0010113     .0067763
        bf7m |    .0013372    .0006507      2.05    0.040      .0000618     .0026126
         bf8 |   -.0000698    .0000479     -1.46    0.145     -.0001638     .0000241
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0288329    .0347084     -0.83    0.406       -.09686     .0391943
        bf22 |   -.0000907    .0001888     -0.48    0.631     -.0004608     .0002793
        bf29 |           0   (omitted)
        bf30 |   -5.44e-06    .0004196     -0.01    0.990     -.0008279     .0008171
        bf40 |    .3549975    .2522025      1.41    0.159     -.1393104     .8493054
       deaw3 |   -.1446966    .2515866     -0.58    0.565     -.6377974     .3484041
      dvcew3 |    .2312151    1.685819      0.14    0.891      -3.07293     3.535361
      sepaw3 |    1.563211    1.973158      0.79    0.428     -2.304108     5.430529
      accdw3 |   -1.029126    .9986452     -1.03    0.303     -2.986435     .9281827
      movew3 |   -.3161441    .7920977     -0.40    0.690     -1.868627     1.236339
       illw3 |    .2509498    .2730406      0.92    0.358     -.2841998     .7860995
     shfamw3 |   -.0049114    .0092237     -0.53    0.594     -.0229895     .0131668
      shhlw3 |   -.0135671    .0078785     -1.72    0.085     -.0290087     .0018746
     shjobw3 |    .0090088    .0079953      1.13    0.260     -.0066617     .0246793
    shrelaw3 |   -.0052844    .0083104     -0.64    0.525     -.0215726     .0110037
     suprtw3 |    .0083949    .0090554      0.93    0.354     -.0093533     .0261431
     suchrw3 |   -.0115343    .0079215     -1.46    0.145     -.0270603     .0039916
    havmilsq |   -.0000122    .0000253     -0.48    0.630     -.0000618     .0000374
     radhlw3 |           0   (omitted)
       _cons |   -6.912277     3.93482     -1.76    0.079     -14.62438     .7998281
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        44            14  |         58
     -     |        25           221  |        246
-----------+--------------------------+-----------
   Total   |        69           235  |        304

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   63.77%
Specificity                     Pr( -|~D)   94.04%
Positive predictive value       Pr( D| +)   75.86%
Negative predictive value       Pr(~D| -)   89.84%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.96%
False - rate for true D         Pr( -| D)   36.23%
False + rate for classified +   Pr(~D| +)   24.14%
False - rate for classified -   Pr( D| -)   10.16%
--------------------------------------------------
Correctly classified                        87.17%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       304
 number of covariate patterns =       304
            Pearson chi2(256) =       202.32
                  Prob > chi2 =         0.9943

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -162.820     Log-Lik Full Model:          -86.083
D(247):                      172.165     LR(47):                      153.476
                                         Prob > LR:                     0.000
McFadden's R2:                 0.471     McFadden's Adj R2:             0.121
Maximum Likelihood R2:         0.396     Cragg & Uhler's R2:            0.603
McKelvey and Zavoina's R2:     0.800     Efron's R2:                    0.484
Variance of y*:               16.474     Variance of error:             3.290
Count R2:                      0.872     Adj Count R2:                  0.435
AIC:                           0.941     AIC*n:                       286.165
BIC:                       -1239.941     BIC':                        115.224


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****     Full Nottingham Part 2 subscale models for male & females       *****
*****             Full main model for HP2sxlife for wave= 3               *****
*****     chunk 7 H1 test:Gender= 2  model Wave =  3 for HP2sxlife        *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:16  *****
*******************************************************************************
*******************************************************************************


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

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

note: bf29 != 0 predicts success perfectly
      bf29 dropped and 4 obs not used

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw3 omitted because of collinearity

Logistic regression                               Number of obs   =        345
                                                  LR chi2(50)     =     168.03
                                                  Prob > chi2     =     0.0000
Log likelihood = -114.00457                       Pseudo R2       =     0.4243

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0813848    .0244496      3.33    0.001      .0334644     .1293053
    _Ieduc_2 |   -12.79022    653.1326     -0.02    0.984     -1292.907     1267.326
    _Ieduc_3 |   -11.94607    653.1326     -0.02    0.985     -1292.062      1268.17
    _Ieduc_4 |   -11.36768    653.1328     -0.02    0.986     -1291.484     1268.749
    _Ieduc_5 |   -12.54328    653.1327     -0.02    0.985      -1292.66     1267.573
    _Ieduc_6 |   -11.93918    653.1326     -0.02    0.985     -1292.055     1268.177
    _Ieduc_7 |   -12.87216    653.1524     -0.02    0.984     -1293.027     1267.283
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -2.703036     2.21975     -1.22    0.223     -7.053665     1.647593
      occ2w3 |   -2.165029    2.323461     -0.93    0.351     -6.718929     2.388871
      occ3w3 |   -2.030908    2.234964     -0.91    0.364     -6.411358     2.349542
      occ4w3 |   -1.625969    2.528132     -0.64    0.520     -6.581016     3.329078
      occ5w3 |    .7269315    2.820396      0.26    0.797     -4.800943     6.254806
      occ6w3 |   -.7633882    2.518786     -0.30    0.762     -5.700118     4.173342
      occ7w3 |   -1.433838    2.203631     -0.65    0.515     -5.752876       2.8852
      occ8w3 |           0   (omitted)
     marrw31 |    .3247443    1.774101      0.18    0.855     -3.152431     3.801919
     marrw32 |    .8501767    2.207491      0.39    0.700     -3.476427      5.17678
     marrw33 |    1.557872    1.575773      0.99    0.323     -1.530585     4.646329
     marrw35 |   -.4253418    1.619183     -0.26    0.793     -3.598882     2.748198
     marrw36 |    1.703593    1.601915      1.06    0.288     -1.436102     4.843288
      inc1w3 |    1.766812    2.253827      0.78    0.433     -2.650608     6.184231
      inc2w3 |    2.269344    2.224897      1.02    0.308     -2.091374     6.630061
      inc3w3 |    .9292343    2.201873      0.42    0.673     -3.386357     5.244826
      inc4w3 |    1.449624    2.775037      0.52    0.601     -3.989349     6.888597
     radhlw3 |    .0277216    .0091569      3.03    0.002      .0097745     .0456688
      havmil |    .0021336    .0032179      0.66    0.507     -.0041733     .0084405
avgcumdosew3 |    .1969924    .1165031      1.69    0.091     -.0313496     .4253343
         bf1 |    .0285984    .0382244      0.75    0.454       -.04632     .1035168
         bf4 |   -.4015139    .2038932     -1.97    0.049     -.8011373    -.0018905
         bf2 |   -.0001649    .0001225     -1.35    0.178     -.0004051     .0000753
        bf4m |    .3523301    .1864609      1.89    0.059     -.0131266     .7177867
        bf5m |   -.0026053     .001955     -1.33    0.183      -.006437     .0012264
        bf7m |   -.0000741    .0006237     -0.12    0.905     -.0012966     .0011483
         bf8 |   -5.22e-06    .0000423     -0.12    0.902     -.0000881     .0000777
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0120216     .031995     -0.38    0.707     -.0747307     .0506874
        bf22 |   -.0001004    .0001357     -0.74    0.459     -.0003664     .0001655
        bf29 |           0   (omitted)
        bf30 |   -.0002441    .0003438     -0.71    0.478     -.0009179     .0004298
        bf40 |     .095062    .1371931      0.69    0.488     -.1738314     .3639555
       deaw3 |    .0760781    .1918427      0.40    0.692     -.2999267     .4520829
      dvcew3 |    1.127371     .952705      1.18    0.237     -.7398962     2.994639
      sepaw3 |    .5833047     .936842      0.62    0.534     -1.252872     2.419481
      accdw3 |   -.5118992    .5859911     -0.87    0.382     -1.660421     .6366223
      movew3 |   -.6063637    1.823477     -0.33    0.739     -4.180313     2.967586
       illw3 |    .1168429    .1761008      0.66    0.507     -.2283082     .4619941
     shfamw3 |    .0084815     .007536      1.13    0.260     -.0062888     .0232518
      shhlw3 |    .0066923    .0066985      1.00    0.318     -.0064365     .0198212
     shjobw3 |   -.0046191    .0070704     -0.65    0.514     -.0184767     .0092386
    shrelaw3 |   -.0123617    .0074084     -1.67    0.095     -.0268819     .0021585
     suprtw3 |   -.0091554    .0078461     -1.17    0.243     -.0245335     .0062227
     suchrw3 |   -.0034248    .0055225     -0.62    0.535     -.0142486     .0073991
    havmilsq |   -2.54e-06    2.55e-06     -1.00    0.319     -7.52e-06     2.45e-06
     radhlw3 |           0   (omitted)
       _cons |     1.83356    653.1407      0.00    0.998     -1278.299     1281.966
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        60            12  |         72
     -     |        30           243  |        273
-----------+--------------------------+-----------
   Total   |        90           255  |        345

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   66.67%
Specificity                     Pr( -|~D)   95.29%
Positive predictive value       Pr( D| +)   83.33%
Negative predictive value       Pr(~D| -)   89.01%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.71%
False - rate for true D         Pr( -| D)   33.33%
False + rate for classified +   Pr(~D| +)   16.67%
False - rate for classified -   Pr( D| -)   10.99%
--------------------------------------------------
Correctly classified                        87.83%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       345
 number of covariate patterns =       345
            Pearson chi2(294) =       343.22
                  Prob > chi2 =         0.0254

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -198.018     Log-Lik Full Model:         -114.005
D(288):                      228.009     LR(50):                      168.026
                                         Prob > LR:                     0.000
McFadden's R2:                 0.424     McFadden's Adj R2:             0.136
Maximum Likelihood R2:         0.386     Cragg & Uhler's R2:            0.565
McKelvey and Zavoina's R2:     0.693     Efron's R2:                    0.483
Variance of y*:               10.715     Variance of error:             3.290
Count R2:                      0.878     Adj Count R2:                  0.533
AIC:                           0.991     AIC*n:                       342.009
BIC:                       -1454.932     BIC':                        124.151

. *-----Chunk 7 dose3 moderator => sex life impact----------------------------
. title "Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 3"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 3*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:18  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=3/3 {
  2. di as input  "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  3. di as input  "Wave 3 male dose avgcumdosew`j' main effect not signif"
  4.         logit HP2sxlife age marrw31-marrw36 bf4 bf5m dvcew`j' illw`j' shhlw`j' ///
>           havmilsq shrelaw`j' ///
>           avgcumdosew`j' radhlw`j' if gender==1
  5.                         estat class
  6.                         estat gof
  7.                         fitstat
  8. }
trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
Wave 3 male dose avgcumdosew3 main effect not signif

note: marrw34 omitted because of collinearity
note: marrw36 omitted because of collinearity
Iteration 0:   log likelihood = -171.51396
Iteration 1:   log likelihood = -116.02941
Iteration 2:   log likelihood = -108.27742
Iteration 3:   log likelihood = -107.96025
Iteration 4:   log likelihood = -107.95802
Iteration 5:   log likelihood = -107.95802

Logistic regression                               Number of obs   =        340
                                                  LR chi2(14)     =     127.11
                                                  Prob > chi2     =     0.0000
Log likelihood = -107.95802                       Pseudo R2       =     0.3706

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0742276    .0176614      4.20    0.000      .0396119     .1088433
     marrw31 |    1.295459    1.079283      1.20    0.230     -.8198963     3.410814
     marrw32 |   -.2171872    1.393226     -0.16    0.876      -2.94786     2.513485
     marrw33 |    .8215567    .8316513      0.99    0.323       -.80845     2.451563
     marrw34 |           0   (omitted)
     marrw35 |    .6845196    1.274778      0.54    0.591     -1.813999     3.183038
     marrw36 |           0   (omitted)
         bf4 |   -.1751874    .0433174     -4.04    0.000     -.2600878    -.0902869
        bf5m |   -.0005252     .001056     -0.50    0.619      -.002595     .0015447
      dvcew3 |    .7519715    .9602947      0.78    0.434     -1.130172     2.634115
       illw3 |    .4656174    .1837911      2.53    0.011      .1053935     .8258412
      shhlw3 |   -.0078344    .0055669     -1.41    0.159     -.0187453     .0030765
    havmilsq |   -4.85e-06    5.73e-06     -0.85    0.398     -.0000161     6.39e-06
    shrelaw3 |   -.0015114    .0058428     -0.26    0.796     -.0129631     .0099403
avgcumdosew3 |    .0567392    .0450409      1.26    0.208     -.0315395     .1450178
     radhlw3 |    .0138841    .0063766      2.18    0.029      .0013861     .0263821
       _cons |   -4.875148    1.618703     -3.01    0.003     -8.047748    -1.702548
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        37            17  |         54
     -     |        32           254  |        286
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   53.62%
Specificity                     Pr( -|~D)   93.73%
Positive predictive value       Pr( D| +)   68.52%
Negative predictive value       Pr(~D| -)   88.81%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.27%
False - rate for true D         Pr( -| D)   46.38%
False + rate for classified +   Pr(~D| +)   31.48%
False - rate for classified -   Pr( D| -)   11.19%
--------------------------------------------------
Correctly classified                        85.59%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       338
            Pearson chi2(323) =       289.05
                  Prob > chi2 =         0.9130

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -107.958
D(323):                      215.916     LR(14):                      127.112
                                         Prob > LR:                     0.000
McFadden's R2:                 0.371     McFadden's Adj R2:             0.271
Maximum Likelihood R2:         0.312     Cragg & Uhler's R2:            0.491
McKelvey and Zavoina's R2:     0.534     Efron's R2:                    0.390
Variance of y*:                7.057     Variance of error:             3.290
Count R2:                      0.856     Adj Count R2:                  0.290
AIC:                           0.735     AIC*n:                       249.916
BIC:                       -1666.833     BIC':                        -45.507

. title "Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 3"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 3*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:19  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=3/3 {
  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 3 male dose avgcumdosew`j' main effect not signif"
  5.         logit HP2sxlife age  bf4  illw`j' shhlw`j' ///
>           havmilsq  ///
>           avgcumdosew`j' radhlw`j' 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 3 male dose avgcumdosew3 main effect not signif

Iteration 0:   log likelihood = -171.51396
Iteration 1:   log likelihood = -116.88501
Iteration 2:   log likelihood = -109.88634
Iteration 3:   log likelihood =  -109.5831
Iteration 4:   log likelihood = -109.58073
Iteration 5:   log likelihood = -109.58073

Logistic regression                               Number of obs   =        340
                                                  LR chi2(7)      =     123.87
                                                  Prob > chi2     =     0.0000
Log likelihood = -109.58073                       Pseudo R2       =     0.3611

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0642517    .0157234      4.09    0.000      .0334344      .095069
         bf4 |   -.1765469    .0392111     -4.50    0.000     -.2533993    -.0996945
       illw3 |    .4690318    .1644894      2.85    0.004      .1466384     .7914252
      shhlw3 |   -.0087591    .0051634     -1.70    0.090     -.0188791      .001361
    havmilsq |   -6.11e-06    5.71e-06     -1.07    0.285     -.0000173     5.09e-06
avgcumdosew3 |    .0558129    .0448722      1.24    0.214      -.032135     .1437607
     radhlw3 |    .0122374    .0056656      2.16    0.031       .001133     .0233417
       _cons |   -3.483368    1.099461     -3.17    0.002     -5.638272    -1.328464
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        37            17  |         54
     -     |        32           254  |        286
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   53.62%
Specificity                     Pr( -|~D)   93.73%
Positive predictive value       Pr( D| +)   68.52%
Negative predictive value       Pr(~D| -)   88.81%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.27%
False - rate for true D         Pr( -| D)   46.38%
False + rate for classified +   Pr(~D| +)   31.48%
False - rate for classified -   Pr( D| -)   11.19%
--------------------------------------------------
Correctly classified                        85.59%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       333
            Pearson chi2(325) =       283.30
                  Prob > chi2 =         0.9540

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -109.581
D(332):                      219.161     LR(7):                       123.866
                                         Prob > LR:                     0.000
McFadden's R2:                 0.361     McFadden's Adj R2:             0.314
Maximum Likelihood R2:         0.305     Cragg & Uhler's R2:            0.481
McKelvey and Zavoina's R2:     0.515     Efron's R2:                    0.378
Variance of y*:                6.788     Variance of error:             3.290
Count R2:                      0.856     Adj Count R2:                  0.290
AIC:                           0.692     AIC*n:                       235.161
BIC:                       -1716.048     BIC':                        -83.064

.
. scalar MainEffsxlifeMw3 = "age bf4 illw3 radhlw3"

. scalar SigDosesxlifeMw3 = "no"

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****trimmed HP2sxlife main effects models wave 3 for H1 part 2 with dose ns*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:21  *****
*******************************************************************************
*******************************************************************************


-------------
title2: Wave `j dose HPsxlife relationship but avgcumdosew3: Dose not signif
                                       Date and time:  16 Jun 2012    20:47:21
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
                                       Stata data file:  chwide13june2012.dta  has  2374  variables and  703  observations

Wave `j dose HPsxlife relationship but avgcumdosew3: Dose not signif
-------------

.
.
. cap gen radhlw3Xd3 = radhlw3*avgcumdosew3

.
. 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=3/3 {
  2.                 sw, pr(.1):logistic HP2sxlife age bf4 illw`j' ///
>                 avgcumdosew`j' radhlw`j' ageXd3 radhlw3Xd3 illw3Xd3 if gender==1, coef
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }


  begin with full model


p = 0.9949 >= 0.1000  removing illw3Xd3


p = 0.2976 >= 0.1000  removing radhlw3Xd3


p = 0.1716 >= 0.1000  removing avgcumdosew3


p = 0.1751 >= 0.1000  removing ageXd3


Logistic regression                               Number of obs   =        340
                                                  LR chi2(4)      =     117.89
                                                  Prob > chi2     =     0.0000
Log likelihood = -112.56939                       Pseudo R2       =     0.3437

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0655592    .0156078      4.20    0.000      .0349684       .09615
         bf4 |   -.1526795    .0362827     -4.21    0.000     -.2237922    -.0815668
       illw3 |    .3916574    .1538103      2.55    0.011      .0901948       .69312
     radhlw3 |    .0122253    .0056017      2.18    0.029      .0012461     .0232046
       _cons |   -4.135046    1.063355     -3.89    0.000     -6.219184    -2.050907
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        37            15  |         52
     -     |        32           256  |        288
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   53.62%
Specificity                     Pr( -|~D)   94.46%
Positive predictive value       Pr( D| +)   71.15%
Negative predictive value       Pr(~D| -)   88.89%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.54%
False - rate for true D         Pr( -| D)   46.38%
False + rate for classified +   Pr(~D| +)   28.85%
False - rate for classified -   Pr( D| -)   11.11%
--------------------------------------------------
Correctly classified                        86.18%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       309
            Pearson chi2(304) =       278.23
                  Prob > chi2 =         0.8529

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -112.569
D(335):                      225.139     LR(4):                       117.889
                                         Prob > LR:                     0.000
McFadden's R2:                 0.344     McFadden's Adj R2:             0.315
Maximum Likelihood R2:         0.293     Cragg & Uhler's R2:            0.461
McKelvey and Zavoina's R2:     0.477     Efron's R2:                    0.359
Variance of y*:                6.295     Variance of error:             3.290
Count R2:                      0.862     Adj Count R2:                  0.319
AIC:                           0.692     AIC*n:                       235.139
BIC:                       -1727.558     BIC':                        -94.573

.
. scalar sxlifeModMw3 = "none"

. *xx male moderators: no main significant dose effect
. *xx no male moderators for sexlife impact
.
.
. * female 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 3"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                   Chunk 7 trimmed female model:                     *****
*****             dose and HP2sxlife relationship in wave 3               *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:29  *****
*******************************************************************************
*******************************************************************************


. * female models
.         forvalues j=3/3 {
  2.
. set more off
  3. des bf4 bf4m shfamw3 shrelaw3 avgcumdosew3
  4. title "trimmed HP2sexlife main effects models" "wave 3 for H1 part 2 with dose ns"
  5. title "Wave 3 dose HP2sexlife relationship" "avgcumdosew`j' Dose not signif"
  6.         logit HP2sxlife age marrw31-marrw36  radhlw`j' bf4 bf4m   ///
>            shfamw`j' shrelaw`j' 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)


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


shrelaw3          double   %8.0g                        Percentage of strains and hassles related to relationships NOW


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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****               trimmed HP2sexlife main effects models                *****
*****                 wave 3 for H1 part 2 with dose ns                   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:29  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                Wave 3 dose HP2sexlife relationship                  *****
*****                    avgcumdosew3 Dose not signif                     *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:29  *****
*******************************************************************************
*******************************************************************************


note: marrw36 omitted because of collinearity
Iteration 0:   log likelihood = -207.62116
Iteration 1:   log likelihood = -144.17685
Iteration 2:   log likelihood = -138.48259
Iteration 3:   log likelihood = -138.36775
Iteration 4:   log likelihood = -138.36738
Iteration 5:   log likelihood = -138.36738

Logistic regression                               Number of obs   =        363
                                                  LR chi2(12)     =     138.51
                                                  Prob > chi2     =     0.0000
Log likelihood = -138.36738                       Pseudo R2       =     0.3336

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0754579    .0170423      4.43    0.000      .0420555     .1088603
     marrw31 |   -.9421212    .8010808     -1.18    0.240     -2.512211     .6279684
     marrw32 |    -.440823    1.344699     -0.33    0.743     -3.076384     2.194738
     marrw33 |   -.9501207    .4286832     -2.22    0.027     -1.790324     -.109917
     marrw34 |   -.9642797    1.745537     -0.55    0.581      -4.38547      2.45691
     marrw35 |   -.8586239    .6388872     -1.34    0.179      -2.11082      .393572
     marrw36 |           0   (omitted)
     radhlw3 |    .0100484    .0049263      2.04    0.041       .000393     .0197038
         bf4 |   -.5151847    .1744193     -2.95    0.003     -.8570402    -.1733292
        bf4m |    .3491023    .1586783      2.20    0.028      .0380985     .6601061
     shfamw3 |    .0106246    .0054177      1.96    0.050      6.14e-06     .0212431
    shrelaw3 |   -.0125055      .00593     -2.11    0.035      -.024128    -.0008829
avgcumdosew3 |    .1255823    .0854354      1.47    0.142     -.0418679     .2930326
       _cons |   -6.549884    1.704204     -3.84    0.000     -9.890063    -3.209705
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        57            16  |         73
     -     |        37           253  |        290
-----------+--------------------------+-----------
   Total   |        94           269  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   60.64%
Specificity                     Pr( -|~D)   94.05%
Positive predictive value       Pr( D| +)   78.08%
Negative predictive value       Pr(~D| -)   87.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.95%
False - rate for true D         Pr( -| D)   39.36%
False + rate for classified +   Pr(~D| +)   21.92%
False - rate for classified -   Pr( D| -)   12.76%
--------------------------------------------------
Correctly classified                        85.40%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       362
            Pearson chi2(349) =       482.36
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.621     Log-Lik Full Model:         -138.367
D(349):                      276.735     LR(12):                      138.508
                                         Prob > LR:                     0.000
McFadden's R2:                 0.334     McFadden's Adj R2:             0.266
Maximum Likelihood R2:         0.317     Cragg & Uhler's R2:            0.466
McKelvey and Zavoina's R2:     0.500     Efron's R2:                    0.407
Variance of y*:                6.573     Variance of error:             3.290
Count R2:                      0.854     Adj Count R2:                  0.436
AIC:                           0.839     AIC*n:                       304.735
BIC:                       -1780.412     BIC':                        -67.775

. scalar SigDoseSxlifeFw3 = "no"

. scalar MainEffsxlifeFw3 = "age marrw33 radhlw3 bf4 bf4m shrelaw3"

. *-----  constructing possible moderators
.
.       foreach var in marrw31 marrw32 marrw33 marrw34 marrw35 marrw36 ///
>           bf4 bf4m shfamw3 shrelaw3 radhlw3 {
  2.        cap gen `var'Xd3 = `var'*avgcumdosew3
  3.          }

.
. title "Chunk 7 trimmed female model:" "dose and HP2sxlife relationship in wave 3"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                   Chunk 7 trimmed female model:                     *****
*****             dose and HP2sxlife relationship in wave 3               *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:30  *****
*******************************************************************************
*******************************************************************************


. * female models
.         forvalues j=3/3 {
  2.
. set more off
  3. des bf4 bf4m shfamw3 shrelaw3 avgcumdosew3
  4. title "trimmed HP2sexlife main effects models" "wave 3 for H1 part 2 with dose ns"
  5. title "Wave 3 dose HP2sexlife relationship" "avgcumdosew`j' Dose not signif"
  6.         logit HP2sxlife age marrw31-marrw36  radhlw`j' bf4 bf4m   ///
>            shfamw`j' shrelaw`j' avgcumdosew`j'  ageXd3 marrw31Xd3 marrw32Xd3 ///
>            marrw33Xd3 marrw34Xd3 marrw35Xd3 bf4Xd3 bf4mXd3 shrelaw3Xd3 ///
>              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)


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


shrelaw3          double   %8.0g                        Percentage of strains and hassles related to relationships NOW


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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****               trimmed HP2sexlife main effects models                *****
*****                 wave 3 for H1 part 2 with dose ns                   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:30  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                Wave 3 dose HP2sexlife relationship                  *****
*****                    avgcumdosew3 Dose not signif                     *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:30  *****
*******************************************************************************
*******************************************************************************


note: marrw36 omitted because of collinearity
Iteration 0:   log likelihood = -207.62116
Iteration 1:   log likelihood =  -141.7263
Iteration 2:   log likelihood =  -135.5357
Iteration 3:   log likelihood = -135.21704
Iteration 4:   log likelihood = -135.16073
Iteration 5:   log likelihood = -135.14259
Iteration 6:   log likelihood =   -135.139
Iteration 7:   log likelihood = -135.13799
Iteration 8:   log likelihood = -135.13774
Iteration 9:   log likelihood = -135.13769
Iteration 10:  log likelihood = -135.13768

Logistic regression                               Number of obs   =        363
                                                  LR chi2(21)     =     144.97
                                                  Prob > chi2     =     0.0000
Log likelihood = -135.13768                       Pseudo R2       =     0.3491

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .092952    .0233865      3.97    0.000      .0471154     .1387886
     marrw31 |   -1.341334    1.898438     -0.71    0.480     -5.062204     2.379537
     marrw32 |    2.268161    4.581638      0.50    0.621     -6.711685     11.24801
     marrw33 |   -.8067892    .6165677     -1.31    0.191      -2.01524     .4016614
     marrw34 |   -32.82787    1800.902     -0.02    0.985      -3562.53     3496.875
     marrw35 |    -.858144    1.080921     -0.79    0.427     -2.976711     1.260423
     marrw36 |           0   (omitted)
     radhlw3 |    .0109474    .0050586      2.16    0.030      .0010328     .0208621
         bf4 |   -.3690314    .3776717     -0.98    0.329     -1.109254     .3711915
        bf4m |     .245895    .3444988      0.71    0.475     -.4293101     .9211002
     shfamw3 |    .0116586     .005533      2.11    0.035      .0008141     .0225031
    shrelaw3 |   -.0021905    .0093988     -0.23    0.816     -.0206118     .0162308
avgcumdosew3 |    1.180905     2.36415      0.50    0.617     -3.452744     5.814553
      ageXd3 |   -.0203615    .0150978     -1.35    0.177     -.0499527     .0092297
  marrw31Xd3 |     .399261    1.599068      0.25    0.803     -2.734855     3.533377
  marrw32Xd3 |   -3.261172     5.78271     -0.56    0.573     -14.59508     8.072732
  marrw33Xd3 |    -.061554    .4565407     -0.13    0.893     -.9563573     .8332492
  marrw34Xd3 |    17.30052     1074.65      0.02    0.987     -2088.975     2123.576
  marrw35Xd3 |    .0357107    .7782966      0.05    0.963     -1.489723     1.561144
      bf4Xd3 |   -.1255356    .3211828     -0.39    0.696     -.7550423     .5039711
     bf4mXd3 |    .0907915    .2884138      0.31    0.753     -.4744893     .6560722
 shrelaw3Xd3 |   -.0097172    .0069227     -1.40    0.160     -.0232854     .0038511
       _cons |   -7.579904    3.069205     -2.47    0.014     -13.59544    -1.564373
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        55            15  |         70
     -     |        39           254  |        293
-----------+--------------------------+-----------
   Total   |        94           269  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   58.51%
Specificity                     Pr( -|~D)   94.42%
Positive predictive value       Pr( D| +)   78.57%
Negative predictive value       Pr(~D| -)   86.69%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.58%
False - rate for true D         Pr( -| D)   41.49%
False + rate for classified +   Pr(~D| +)   21.43%
False - rate for classified -   Pr( D| -)   13.31%
--------------------------------------------------
Correctly classified                        85.12%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       362
            Pearson chi2(340) =       452.30
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.621     Log-Lik Full Model:         -135.138
D(340):                      270.275     LR(21):                      144.967
                                         Prob > LR:                     0.000
McFadden's R2:                 0.349     McFadden's Adj R2:             0.238
Maximum Likelihood R2:         0.329     Cragg & Uhler's R2:            0.483
McKelvey and Zavoina's R2:     0.779     Efron's R2:                    0.416
Variance of y*:               14.905     Variance of error:             3.290
Count R2:                      0.851     Adj Count R2:                  0.426
AIC:                           0.871     AIC*n:                       316.275
BIC:                       -1733.822     BIC':                        -21.185

. scalar sxlifeModFw3="none"

.
.
.
.
.  *----- testing female moderators
. title "partly trimmed female moderator model of dose & HP2sxlife relationship in wv 3"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****partly trimmed female moderator model of dose & HP2sxlife relationship in wv 3*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:32  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=3/3 {
  2. set more off
  3. des bf4 bf4m shfamw3 shrelaw3 avgcumdosew3
  4. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  5. title "Wave 3 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  6.         logit HP2sxlife age marrw31-marrw36 radhlw`j' bf4 bf4m   ///
>            shfamw`j' shrelaw`j' avgcumdosew`j' marrw31Xd3 marrw32Xd3 ///
>            marrw33Xd3 marrw34Xd3 marrw35Xd3 marrw36Xd3 radhlw`j'Xd3 ///
>            bf4Xd3 shfamw3Xd3 shrelaw3Xd3 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)


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


shrelaw3          double   %8.0g                        Percentage of strains and hassles related to relationships NOW


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
16 Jun 2012
20:47:32
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide13june2012.dta  currrently has  2374  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Wave 3 dose HP2sexlife relationship but avgcumdosew3: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:32  *****
*******************************************************************************
*******************************************************************************


note: marrw36 omitted because of collinearity
note: marrw36Xd3 omitted because of collinearity
Iteration 0:   log likelihood = -207.62116
Iteration 1:   log likelihood = -141.24621
Iteration 2:   log likelihood = -135.45322
Iteration 3:   log likelihood = -135.06483
Iteration 4:   log likelihood =  -134.9957
Iteration 5:   log likelihood = -134.97466
Iteration 6:   log likelihood =  -134.9706
Iteration 7:   log likelihood = -134.96946
Iteration 8:   log likelihood = -134.96923
Iteration 9:   log likelihood = -134.96917
Iteration 10:  log likelihood = -134.96916
Iteration 11:  log likelihood = -134.96915

Logistic regression                               Number of obs   =        363
                                                  LR chi2(21)     =     145.30
                                                  Prob > chi2     =     0.0000
Log likelihood = -134.96915                       Pseudo R2       =     0.3499

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0704827    .0174387      4.04    0.000      .0363034      .104662
     marrw31 |   -1.526734    1.875648     -0.81    0.416     -5.202936     2.149468
     marrw32 |    1.103621    4.081036      0.27    0.787     -6.895063     9.102305
     marrw33 |   -.8740582    .7389686     -1.18    0.237      -2.32241     .5742937
     marrw34 |   -36.63611    3874.821     -0.01    0.992     -7631.146     7557.874
     marrw35 |   -1.152859    1.129412     -1.02    0.307     -3.366467     1.060749
     marrw36 |           0   (omitted)
     radhlw3 |    .0014141    .0096951      0.15    0.884     -.0175881     .0204162
         bf4 |   -.4636015    .1826527     -2.54    0.011     -.8215941    -.1056089
        bf4m |    .3302633    .1629809      2.03    0.043      .0108266        .6497
     shfamw3 |    .0067642    .0105079      0.64    0.520     -.0138309     .0273592
    shrelaw3 |    .0028404    .0117929      0.24    0.810     -.0202733     .0259542
avgcumdosew3 |   -.2391157     1.08948     -0.22    0.826     -2.374458     1.896226
  marrw31Xd3 |    .5553424    1.593846      0.35    0.728     -2.568538     3.679223
  marrw32Xd3 |   -1.935909    5.073174     -0.38    0.703     -11.87915     8.007329
  marrw33Xd3 |   -.0368709    .6566922     -0.06    0.955     -1.323964     1.250222
  marrw34Xd3 |    19.23126     2306.55      0.01    0.993     -4501.524     4539.987
  marrw35Xd3 |    .3214642    .8715872      0.37    0.712     -1.386815     2.029744
  marrw36Xd3 |           0   (omitted)
  radhlw3Xd3 |    .0091172    .0095954      0.95    0.342     -.0096893     .0279238
      bf4Xd3 |   -.0273194    .0643627     -0.42    0.671     -.1534679     .0988292
  shfamw3Xd3 |    .0037913    .0100871      0.38    0.707      -.015979     .0235616
 shrelaw3Xd3 |   -.0141156    .0103071     -1.37    0.171     -.0343171     .0060859
       _cons |   -5.898959    2.139999     -2.76    0.006     -10.09328    -1.704637
-------------+----------------------------------------------------------------


Note: 6 failures and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        56            17  |         73
     -     |        38           252  |        290
-----------+--------------------------+-----------
   Total   |        94           269  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   59.57%
Specificity                     Pr( -|~D)   93.68%
Positive predictive value       Pr( D| +)   76.71%
Negative predictive value       Pr(~D| -)   86.90%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.32%
False - rate for true D         Pr( -| D)   40.43%
False + rate for classified +   Pr(~D| +)   23.29%
False - rate for classified -   Pr( D| -)   13.10%
--------------------------------------------------
Correctly classified                        84.85%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       362
            Pearson chi2(340) =       451.96
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.621     Log-Lik Full Model:         -134.969
D(339):                      269.938     LR(21):                      145.304
                                         Prob > LR:                     0.000
McFadden's R2:                 0.350     McFadden's Adj R2:             0.234
Maximum Likelihood R2:         0.330     Cragg & Uhler's R2:            0.484
McKelvey and Zavoina's R2:     0.810     Efron's R2:                    0.421
Variance of y*:               17.337     Variance of error:             3.290
Count R2:                      0.848     Adj Count R2:                  0.415
AIC:                           0.876     AIC*n:                       317.938
BIC:                       -1728.264     BIC':                        -21.522

.
. title "fully female moderator model of dose & HP2sxlife relationship in wv 3"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****fully female moderator model of dose & HP2sxlife relationship in wv 3*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:33  *****
*******************************************************************************
*******************************************************************************


. title2 "Signif female dose main effect "
-------------
title2: Signif female dose main effect
                                       Date and time:  16 Jun 2012    20:47:33
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
                                       Stata data file:  chwide13june2012.dta  has  2374  variables and  703  observations

Signif female dose main effect
-------------

.
. * female models
.         forvalues j=3/3 {
  2. des bf4 bf4m shfamw3 shrelaw3 avgcumdosew3
  3. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  4. title "Wave 3 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  5.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>            shrelaw3 shfamw`j'  avgcumdosew`j'  ///
>           shrelaw3Xd3 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)


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


shrelaw3          double   %8.0g                        Percentage of strains and hassles related to relationships NOW


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
16 Jun 2012
20:47:33
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide13june2012.dta  currrently has  2374  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Wave 3 dose HP2sexlife relationship but avgcumdosew3: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:33  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -207.62116
Iteration 1:   log likelihood =  -144.9565
Iteration 2:   log likelihood = -139.33502
Iteration 3:   log likelihood = -139.24024
Iteration 4:   log likelihood = -139.24007
Iteration 5:   log likelihood = -139.24007

Logistic regression                               Number of obs   =        363
                                                  LR chi2(8)      =     136.76
                                                  Prob > chi2     =     0.0000
Log likelihood = -139.24007                       Pseudo R2       =     0.3294

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0850443    .0159459      5.33    0.000      .0537908     .1162978
     radhlw3 |    .0101855    .0048586      2.10    0.036      .0006629     .0197081
         bf4 |   -.5127452    .1800997     -2.85    0.004     -.8657342    -.1597562
        bf4m |    .3584755    .1654365      2.17    0.030       .034226      .682725
    shrelaw3 |   -.0011763    .0085087     -0.14    0.890      -.017853     .0155004
     shfamw3 |    .0102584    .0053613      1.91    0.056     -.0002495     .0207662
avgcumdosew3 |    .4196812    .2507095      1.67    0.094     -.0717004     .9110629
 shrelaw3Xd3 |   -.0090959    .0060346     -1.51    0.132     -.0209235     .0027318
       _cons |   -8.337805    1.647879     -5.06    0.000     -11.56759    -5.108021
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        53            21  |         74
     -     |        41           248  |        289
-----------+--------------------------+-----------
   Total   |        94           269  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   56.38%
Specificity                     Pr( -|~D)   92.19%
Positive predictive value       Pr( D| +)   71.62%
Negative predictive value       Pr(~D| -)   85.81%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.81%
False - rate for true D         Pr( -| D)   43.62%
False + rate for classified +   Pr(~D| +)   28.38%
False - rate for classified -   Pr( D| -)   14.19%
--------------------------------------------------
Correctly classified                        82.92%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       362
            Pearson chi2(353) =       444.64
                  Prob > chi2 =         0.0007

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.621     Log-Lik Full Model:         -139.240
D(354):                      278.480     LR(8):                       136.762
                                         Prob > LR:                     0.000
McFadden's R2:                 0.329     McFadden's Adj R2:             0.286
Maximum Likelihood R2:         0.314     Cragg & Uhler's R2:            0.461
McKelvey and Zavoina's R2:     0.509     Efron's R2:                    0.394
Variance of y*:                6.704     Variance of error:             3.290
Count R2:                      0.829     Adj Count R2:                  0.340
AIC:                           0.817     AIC*n:                       296.480
BIC:                       -1808.138     BIC':                        -89.607

. * female models
.         forvalues j=3/3 {
  2. des bf4 bf4m shfamw3 shrelaw3 avgcumdosew3
  3. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  4. title "Wave 3 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  5.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>            shrelaw3 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)


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


shrelaw3          double   %8.0g                        Percentage of strains and hassles related to relationships NOW


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
16 Jun 2012
20:47:35
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide13june2012.dta  currrently has  2374  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Wave 3 dose HP2sexlife relationship but avgcumdosew3: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:47:35  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -207.62116
Iteration 1:   log likelihood = -148.10457
Iteration 2:   log likelihood = -142.10924
Iteration 3:   log likelihood = -142.00423
Iteration 4:   log likelihood = -142.00406
Iteration 5:   log likelihood = -142.00406

Logistic regression                               Number of obs   =        363
                                                  LR chi2(6)      =     131.23
                                                  Prob > chi2     =     0.0000
Log likelihood = -142.00406                       Pseudo R2       =     0.3160

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0888985    .0158716      5.60    0.000      .0577907     .1200062
     radhlw3 |    .0104339    .0048228      2.16    0.031      .0009812     .0198865
         bf4 |   -.5221133    .1784046     -2.93    0.003     -.8717799    -.1724467
        bf4m |    .3612435    .1636356      2.21    0.027      .0405235     .6819635
    shrelaw3 |   -.0123377    .0056981     -2.17    0.030     -.0235058    -.0011696
     shfamw3 |    .0113877     .005213      2.18    0.029      .0011705     .0216049
       _cons |   -8.106812     1.61823     -5.01    0.000     -11.27848     -4.93514
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        58            21  |         79
     -     |        36           248  |        284
-----------+--------------------------+-----------
   Total   |        94           269  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   61.70%
Specificity                     Pr( -|~D)   92.19%
Positive predictive value       Pr( D| +)   73.42%
Negative predictive value       Pr(~D| -)   87.32%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.81%
False - rate for true D         Pr( -| D)   38.30%
False + rate for classified +   Pr(~D| +)   26.58%
False - rate for classified -   Pr( D| -)   12.68%
--------------------------------------------------
Correctly classified                        84.30%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       359
            Pearson chi2(352) =       469.29
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -207.621     Log-Lik Full Model:         -142.004
D(356):                      284.008     LR(6):                       131.234
                                         Prob > LR:                     0.000
McFadden's R2:                 0.316     McFadden's Adj R2:             0.282
Maximum Likelihood R2:         0.303     Cragg & Uhler's R2:            0.445
McKelvey and Zavoina's R2:     0.483     Efron's R2:                    0.385
Variance of y*:                6.366     Variance of error:             3.290
Count R2:                      0.843     Adj Count R2:                  0.394
AIC:                           0.821     AIC*n:                       298.008
BIC:                       -1814.399     BIC':                        -95.868

.
. scalar MainEffsxlifeFw3 = "age radhlw3 bf4 bf4m shrelaw3 shfamw3"

. scalar SigDoseSxlifeFw3="no"

. * xx female main effects model: no sign dose main effect
. * xx 6 signif main effects
. * xx no moderator effects significant
.
. *-----------  mediator models for Dose => sexlife impact
.
. 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 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6336

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

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

                                                   AIC             =  7.839021
Log likelihood   = -1330.633586                    BIC             =   47957.2

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .5433648    .2472657      2.20    0.028       .058733     1.027997
       _cons |    48.52021    .7247376     66.95    0.000      47.09975     49.94067
-------------+----------------------------------------------------------------

. 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.)

.
. * illness is a mediating effect for males = > sex life for men
. des illw3

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


illw3             double   %8.0g                        Total number of illnesses experienced in time period 1996-NOW


. glm illw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -461.99206

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

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

                                                   AIC             =  2.729365
Log likelihood   = -461.9920626                    BIC             = -1668.714

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .038211    .0192139      1.99    0.047      .0005524     .0758696
       _cons |    .4504952    .0563162      8.00    0.000      .3401176     .5608729
-------------+----------------------------------------------------------------

. glm HP2sxlife illw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  314.6325
Iteration 2:   deviance =   314.577
Iteration 3:   deviance =  314.5769
Iteration 4:   deviance =  314.5769

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  314.5769306                    (1/df) Deviance =   .930701
Pearson          =  334.8347324                    (1/df) Pearson  =  .9906353

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

                                                   BIC             = -1655.607

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |     .406576    .0768494      5.29    0.000      .2559539     .5571981
       _cons |   -1.080731    .0906035    -11.93    0.000     -1.258311    -.9031518
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw3

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


radhlw3           double   %8.0g                        Self-perceived Chornobyl health threat in wave 3


. glm radhlw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1695.1855

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

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

                                                   AIC             =  9.983444
Log likelihood   = -1695.185473                    BIC             =  424265.5

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .9606492    .7224692      1.33    0.184     -.4553645     2.376663
       _cons |    46.19995    2.117563     21.82    0.000       42.0496      50.3503
-------------+----------------------------------------------------------------

. glm HP2sxlife radhlw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  292.0816
Iteration 2:   deviance =   288.766
Iteration 3:   deviance =  288.7109
Iteration 4:   deviance =  288.7109
Iteration 5:   deviance =  288.7109

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  288.7109182                    (1/df) Deviance =  .8541743
Pearson          =   337.697009                    (1/df) Pearson  =  .9991036

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

                                                   BIC             = -1681.473

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0170927    .0022806      7.49    0.000      .0126228     .0215625
       _cons |   -1.790621    .1598163    -11.20    0.000     -2.103856    -1.477387
-------------+----------------------------------------------------------------
(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  avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1072

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

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

                                                   AIC             =  6.053572
Log likelihood   = -1027.107224                    BIC             =  6403.723

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.0357675    .1012648     -0.35    0.724     -.2342429     .1627078
       _cons |    12.54064    .2968079     42.25    0.000      11.95891     13.12238
-------------+----------------------------------------------------------------

. 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  avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1060.7697

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

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

                                                   AIC             =  6.251587
Log likelihood   = -1060.769747                    BIC             =  8237.445

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.0292413    .1118039     -0.26    0.794     -.2483729     .1898903
       _cons |    20.35328     .327698     62.11    0.000        19.711     20.99556
-------------+----------------------------------------------------------------

. 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.)

.
.
. * age is a mediating effect for females for Dose=> sex life for women
. glm age avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1408.064

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

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

                                                   AIC             =  7.768948
Log likelihood   =  -1408.06405                    BIC             =  47606.63

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.058366    .3512614      3.01    0.003      .3699069     1.746826
       _cons |    48.94293    .7468173     65.54    0.000      47.47919     50.40666
-------------+----------------------------------------------------------------

. 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 illw3

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


illw3             double   %8.0g                        Total number of illnesses experienced in time period 1996-NOW


. glm illw3 avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -562.81042

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

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

                                                   AIC             =  3.111903
Log likelihood   = -562.8104237                    BIC             = -1655.676

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .1284565    .0342268      3.75    0.000      .0613733     .1955398
       _cons |    .5563644    .0727696      7.65    0.000      .4137387     .6989902
-------------+----------------------------------------------------------------

. glm HP2sxlife illw3 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  400.2066
Iteration 2:   deviance =  399.9405
Iteration 3:   deviance =  399.9404
Iteration 4:   deviance =  399.9404

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  399.9403905                    (1/df) Deviance =  1.107868
Pearson          =  359.3006709                    (1/df) Pearson  =  .9952927

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

                                                   BIC             = -1727.939

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    .2312781    .0622433      3.72    0.000      .1092835     .3532726
       _cons |   -.8313252    .0911599     -9.12    0.000     -1.009995    -.6526552
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw3

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


radhlw3           double   %8.0g                        Self-perceived Chornobyl health threat in wave 3


. glm radhlw3 avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1798.7074

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

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

                                                   AIC             =  9.921253
Log likelihood   = -1798.707367                    BIC             =  425821.1

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    2.751602     1.03038      2.67    0.008      .7320943      4.77111
       _cons |    57.70689    2.190692     26.34    0.000      53.41321     62.00057
-------------+----------------------------------------------------------------

. glm HP2sxlife radhlw3 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  385.4256
Iteration 2:   deviance =  385.0487
Iteration 3:   deviance =  385.0486
Iteration 4:   deviance =  385.0486

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  385.0485907                    (1/df) Deviance =  1.066617
Pearson          =  374.8310541                    (1/df) Pearson  =  1.038313

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

                                                   BIC             = -1742.831

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0117559    .0023184      5.07    0.000      .0072119     .0162999
       _cons |   -1.417393    .1757229     -8.07    0.000     -1.761803    -1.072982
-------------+----------------------------------------------------------------
(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  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.6569

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

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

                                                   AIC             =  6.124831
Log likelihood   = -1109.656873                    BIC             =   7479.99

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.4386292    .1543885     -2.84    0.004     -.7412252    -.1360333
       _cons |    11.01475    .3282456     33.56    0.000       10.3714      11.6581
-------------+----------------------------------------------------------------

. 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  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1141.3116

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

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

                                                   AIC             =  6.299237
Log likelihood   = -1141.311602                    BIC             =  9310.664

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    -.441173    .1684561     -2.62    0.009      -.771341    -.1110051
       _cons |    18.82772    .3581548     52.57    0.000      18.12575     19.52969
-------------+----------------------------------------------------------------

. 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 shfamw3

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


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


. glm shfamw3  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1798.0166

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

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

                                                   AIC             =  9.917447
Log likelihood   = -1798.016645                    BIC             =  424195.6

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    3.038333    1.028421      2.95    0.003      1.022665     5.054002
       _cons |    48.29894    2.186528     22.09    0.000      44.01342     52.58445
-------------+----------------------------------------------------------------

. glm HP2sxlife shfamw3 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  412.3031
Iteration 2:   deviance =  411.7515
Iteration 3:   deviance =  411.7513
Iteration 4:   deviance =  411.7513

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  411.7512965                    (1/df) Deviance =  1.140585
Pearson          =  363.5689973                    (1/df) Pearson  =  1.007116

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

                                                   BIC             = -1716.128

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw3 |     .003818    .0022067      1.73    0.084      -.000507     .0081429
       _cons |    -.850427    .1417252     -6.00    0.000     -1.128203    -.5726507
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shrelaw3

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


shrelaw3          double   %8.0g                        Percentage of strains and hassles related to relationships NOW


. glm shrelaw3  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1781.6583

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

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

                                                   AIC             =  9.827318
Log likelihood   = -1781.658257                    BIC             =  387452.2

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .719866    .9831048      0.73    0.464     -1.206984     2.646716
       _cons |    27.62247     2.09018     13.22    0.000      23.52579     31.71915
-------------+----------------------------------------------------------------

. glm HP2sxlife shrelaw3 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  415.8457
Iteration 2:   deviance =  415.1882
Iteration 3:   deviance =  415.1879
Iteration 4:   deviance =  415.1879

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  415.1879244                    (1/df) Deviance =  1.150105
Pearson          =  363.0035925                    (1/df) Pearson  =   1.00555

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

                                                   BIC             = -1712.691

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw3 |    .0005023    .0023156      0.22    0.828     -.0040363     .0050408
       _cons |   -.6609704     .101163     -6.53    0.000     -.8592462    -.4626947
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
. *xx summary of mediating effects:  age and illness mediate sex life for men
. *                                  age illnesss radhlw3 bf4 bf4m (soma) mediate sex life for women
.
. scalar sxlifeMedMw3 = "age illw3"

. scalar sxlifeMedFw3 = "age illw3 radhlw3 bf4 bf4m"

. title4 "5. summary matrix contstruction for dose -> sexlife impact"
-------------
5. summary matrix contstruction for dose -> sexlife impact
-------------

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

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

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

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

.     matrix define HP2sxlifeMw3 = (1, 2, 3, 1, 0, 4, 0, 2 )

.         matrix define HP2sxlifeFw3 = (1, 2, 3, 2, 1, 6, 0, 5)

.         matrix rowname HP2sxlifeMw3 = HP2sxlifeMw3

.         matrix rowname HP2sxlifeFw3 = HP2sxlifeFW3

.         matlist HP2sxlifeMw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2sxlifeMw3   |         1            2            3            1            0            4            0            2

.         matlist HP2sxlifeFw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2sxlifeFW3   |         1            2            3            2            1            6            0            5

. matrix define H1pt2w3 = ( HP2wkMw3 \ HP2wkFw3 \ HP2hmcrMw3 \ HP2hmcrFw3 \ HP2spMw3 \ HP2spFw3 \ HP2prbfamMw3 \ HP2prbfamFw3 \ HP2sxlifeMw3 \ HP2sxlifeFw3 )

.
.         matlist H1pt2w3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0            4
r1   |         1            2            3            2            0            1            0            6
r1   |         1            2            3            1            0            4            0            2
r1   |         1            2            3            2            0            2            0            2
HP2spMw3   |         1            2            3            1            0            2            0            1
HP2spFw3   |         1            2            3            2            1            5            5            2
HP2prbfamM   |         1            2            3            1            0            5            0            1
HP2prbfamF   |         1            2            3            2            0            2            2            2
HP2sxlifeMw3   |         1            2            3            1            0            4            0            2
HP2sxlifeFW3   |         1            2            3            2            1            6            0            5

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

.     matrix rownames H1pt2w3 =   HP2wkMw3 HP2wkFw3 HP2hmcrMw3 HP2hmcrFw3 HP2prbfhmMw3 HP2prbfhmFw3

.     matlist H1pt2w3

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
HP2wkMw3   |         1            2            3            1            0            4            0            4
HP2wkFw3   |         1            2            3            2            0            1            0            6
HP2hmcrMw3   |         1            2            3            1            0            4            0            2
HP2hmcrFw3   |         1            2            3            2            0            2            0            2
HP2prbfhmMw3   |         1            2            3            1            0            2            0            1
HP2prbfhmFw3   |         1            2            3            2            1            5            5            2
HP2prbfhmFw3   |         1            2            3            1            0            5            0            1
HP2prbfhmFw3   |         1            2            3            2            0            2            2            2
HP2prbfhmFw3   |         1            2            3            1            0            4            0            2
HP2prbfhmFw3   |         1            2            3            2            1            6            0            5

.
.
.
.
. *=================== Chunk 8    Dose => interests and Hobbies relationship
. title  "6. Moderators and Mediators of the Dose = > interests and hobbies Impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****6. Moderators and Mediators of the Dose = > interests and hobbies Impact*****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:09  *****
*******************************************************************************
*******************************************************************************


.
. title4 " Hyp. 1. pt 2 Wave 3 Main effects Dose=> Interests and Hobbies impact identification"
-------------
 Hyp. 1. pt 2 Wave 3 Main effects Dose=> Interests and Hobbies impact identification
-------------

.
. * Chunk 8 ---male models
. forvalues j=3/3 {
  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 w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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 radhlw3 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3

chunk 8 H1 test:Gender= 1  model Wave =  3 for HP2sxlife


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:09  *****
*******************************************************************************
*******************************************************************************


Model for gender==1 and wave == 3

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
note: _Ieduc_4 != 0 predicts failure perfectly
      _Ieduc_4 dropped and 14 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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 15 obs not used

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 7 obs not used

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw3 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        276
                                                  LR chi2(42)     =     117.91
                                                  Prob > chi2     =     0.0000
Log likelihood = -51.649162                       Pseudo R2       =     0.5330

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0817005    .0490304      1.67    0.096     -.0143973     .1777983
    _Ieduc_2 |   -1.531634    1.790651     -0.86    0.392     -5.041245     1.977977
    _Ieduc_3 |   -1.560462    .8580328     -1.82    0.069     -3.242176     .1212509
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.5489735    .8124194     -0.68    0.499     -2.141286     1.043339
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -16.51737    1.787426     -9.24    0.000     -20.02066    -13.01407
      occ2w3 |   -19.33037    1.805963    -10.70    0.000        -22.87    -15.79075
      occ3w3 |   -17.45879           .         .        .             .            .
      occ4w3 |    -16.4147    1.784409     -9.20    0.000     -19.91207    -12.91732
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -16.18451      1.9014     -8.51    0.000     -19.91119    -12.45784
      occ8w3 |           0   (omitted)
     marrw31 |    .8557338    1.989445      0.43    0.667     -3.043506     4.754974
     marrw32 |    1.067638    2.133137      0.50    0.617     -3.113233     5.248509
     marrw33 |   -.0597495    1.809944     -0.03    0.974     -3.607174     3.487675
     marrw35 |    4.178796    2.178555      1.92    0.055     -.0910924     8.448685
     marrw36 |           0   (omitted)
      inc1w3 |    14.99624    2.448683      6.12    0.000      10.19691     19.79557
      inc2w3 |    15.54637      2.1702      7.16    0.000      11.29286     19.79989
      inc3w3 |    16.08957    2.238064      7.19    0.000      11.70305      20.4761
      inc4w3 |    20.06926    2.676679      7.50    0.000      14.82306     25.31545
     radhlw3 |    .0608448    .0162567      3.74    0.000      .0289822     .0927075
      havmil |     .004278    .0106932      0.40    0.689     -.0166802     .0252362
avgcumdosew3 |   -.3594081    .1656259     -2.17    0.030     -.6840289    -.0347874
         bf1 |   -1.832947    .1402107    -13.07    0.000     -2.107755    -1.558139
         bf4 |   -.1459909    .3386475     -0.43    0.666     -.8097278     .5177459
         bf2 |   -.0007134    .0002919     -2.44    0.015     -.0012855    -.0001412
        bf4m |   -.0648789    .3169386     -0.20    0.838     -.6860671     .5563094
        bf5m |   -.0059221    .0033107     -1.79    0.074     -.0124109     .0005667
        bf7m |     -.00068    .0010134     -0.67    0.502     -.0026661     .0013062
         bf8 |    .0000248    .0000707      0.35    0.726     -.0001137     .0001633
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    1.839452    .1331884     13.81    0.000      1.578408     2.100497
        bf22 |     .000278    .0003035      0.92    0.360     -.0003168     .0008728
        bf29 |           0   (omitted)
        bf30 |    .0006467     .000603      1.07    0.284     -.0005352     .0018286
        bf40 |    .2996032    .3950362      0.76    0.448     -.4746534      1.07386
       deaw3 |   -.6086987     .521237     -1.17    0.243     -1.630304      .412907
      dvcew3 |   -.2319255    1.621511     -0.14    0.886     -3.410029     2.946178
      sepaw3 |   -1.758194    2.087815     -0.84    0.400     -5.850235     2.333848
      accdw3 |    .9189185    1.049896      0.88    0.381     -1.138839     2.976676
      movew3 |   -1.391188    1.335043     -1.04    0.297     -4.007824     1.225448
       illw3 |   -.3817303    .3999312     -0.95    0.340     -1.165581     .4021205
     shfamw3 |    .0654585    .0176224      3.71    0.000      .0309192     .0999978
      shhlw3 |   -.0105181    .0103515     -1.02    0.310     -.0308067     .0097705
     shjobw3 |   -.0144707    .0115767     -1.25    0.211     -.0371606     .0082192
    shrelaw3 |   -.0392022    .0137786     -2.85    0.004     -.0662077    -.0121967
     suprtw3 |    .0070974    .0130297      0.54    0.586     -.0184403     .0326352
     suchrw3 |     -.00232    .0110986     -0.21    0.834     -.0240728     .0194327
    havmilsq |   -7.67e-06    .0000192     -0.40    0.690     -.0000453       .00003
     radhlw3 |           0   (omitted)
       _cons |   -80.28913           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 32 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        23             7  |         30
     -     |        15           231  |        246
-----------+--------------------------+-----------
   Total   |        38           238  |        276

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   60.53%
Specificity                     Pr( -|~D)   97.06%
Positive predictive value       Pr( D| +)   76.67%
Negative predictive value       Pr(~D| -)   93.90%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.94%
False - rate for true D         Pr( -| D)   39.47%
False + rate for classified +   Pr(~D| +)   23.33%
False - rate for classified -   Pr( D| -)    6.10%
--------------------------------------------------
Correctly classified                        92.03%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       276
 number of covariate patterns =       276
            Pearson chi2(231) =       123.26
                  Prob > chi2 =         1.0000

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -110.602     Log-Lik Full Model:          -51.649
D(219):                      103.298     LR(42):                      117.906
                                         Prob > LR:                     0.000
McFadden's R2:                 0.533     McFadden's Adj R2:             0.018
Maximum Likelihood R2:         0.348     Cragg & Uhler's R2:            0.631
McKelvey and Zavoina's R2:     0.982     Efron's R2:                    0.500
Variance of y*:              180.636     Variance of error:             3.290
Count R2:                      0.920     Adj Count R2:                  0.421
AIC:                           0.787     AIC*n:                       217.298
BIC:                       -1127.569     BIC':                        118.151
Full main model for HP2inthob for wave= 3

chunk 8 H1 test:Gender= 2  model Wave =  3 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:11  *****
*******************************************************************************
*******************************************************************************


Model for gender==2 and wave == 3

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

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

note: occ8w3 != 0 predicts failure perfectly
      occ8w3 dropped and 1 obs not used

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

note: _Ieduc_8 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw3 omitted because of collinearity

Logistic regression                               Number of obs   =        337
                                                  LR chi2(49)     =     118.21
                                                  Prob > chi2     =     0.0000
Log likelihood = -107.57156                       Pseudo R2       =     0.3546

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0683881    .0247447      2.76    0.006      .0198893     .1168869
    _Ieduc_2 |   -13.79024    962.4068     -0.01    0.989     -1900.073     1872.492
    _Ieduc_3 |   -12.92792    962.4068     -0.01    0.989     -1899.211     1873.355
    _Ieduc_4 |   -12.05387    962.4069     -0.01    0.990     -1898.337     1874.229
    _Ieduc_5 |   -12.19345     962.407     -0.01    0.990     -1898.476      1874.09
    _Ieduc_6 |   -13.09489    962.4068     -0.01    0.989     -1899.378     1873.188
    _Ieduc_7 |    -13.1998    962.4102     -0.01    0.989     -1899.489      1873.09
    _Ieduc_8 |           0   (omitted)
      occ1w3 |     -1.2723    3.511631     -0.36    0.717     -8.154969      5.61037
      occ2w3 |   -2.590551    3.713618     -0.70    0.485     -9.869108     4.688006
      occ3w3 |   -.8635752    3.536644     -0.24    0.807      -7.79527      6.06812
      occ4w3 |           0   (omitted)
      occ5w3 |           0   (omitted)
      occ6w3 |   -.2036246    3.739879     -0.05    0.957     -7.533652     7.126403
      occ7w3 |   -.4066434     3.50728     -0.12    0.908     -7.280786     6.467499
      occ8w3 |           0   (omitted)
     marrw31 |   -2.820802    1.835568     -1.54    0.124     -6.418449      .776846
     marrw32 |    -2.10882    2.397053     -0.88    0.379     -6.806958     2.589318
     marrw33 |   -2.047151    1.625637     -1.26    0.208     -5.233341      1.13904
     marrw35 |   -2.933509    1.682447     -1.74    0.081     -6.231043     .3640262
     marrw36 |   -2.100943    1.718745     -1.22    0.222     -5.469621     1.267736
      inc1w3 |    1.771469    3.538577      0.50    0.617     -5.164014     8.706952
      inc2w3 |    1.229926     3.52319      0.35    0.727     -5.675399      8.13525
      inc3w3 |    1.602207    3.508288      0.46    0.648     -5.273911     8.478326
      inc4w3 |    2.650063    3.832399      0.69    0.489     -4.861301     10.16143
     radhlw3 |    .0254128     .010363      2.45    0.014      .0051018     .0457239
      havmil |    .0052121    .0043654      1.19    0.232      -.003344     .0137682
avgcumdosew3 |    .0592875    .0898505      0.66    0.509     -.1168163     .2353913
         bf1 |   -.0386178    .0465636     -0.83    0.407     -.1298807     .0526452
         bf4 |   -.3299735    .2318908     -1.42    0.155     -.7844712     .1245242
         bf2 |    5.14e-06    .0001261      0.04    0.967      -.000242     .0002523
        bf4m |      .24058    .2177227      1.10    0.269     -.1861487     .6673088
        bf5m |   -.0019924    .0019912     -1.00    0.317     -.0058951     .0019104
        bf7m |    -.000918    .0006896     -1.33    0.183     -.0022697     .0004336
         bf8 |    6.91e-06    .0000428      0.16    0.872     -.0000771     .0000909
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0290415    .0410365      0.71    0.479     -.0513885     .1094715
        bf22 |     .000145     .000139      1.04    0.297     -.0001275     .0004175
        bf29 |    .0000291    .0000389      0.75    0.455     -.0000472     .0001054
        bf30 |    .0005863    .0003477      1.69    0.092     -.0000953     .0012679
        bf40 |   -.1903404    .1540477     -1.24    0.217     -.4922683     .1115876
       deaw3 |   -.0727208     .201017     -0.36    0.718     -.4667069     .3212652
      dvcew3 |   -.3675995    .8921998     -0.41    0.680     -2.116279      1.38108
      sepaw3 |    1.146748    .9391994      1.22    0.222     -.6940491     2.987545
      accdw3 |   -.0400125    .5697822     -0.07    0.944     -1.156765      1.07674
      movew3 |    .1242816    1.400684      0.09    0.929     -2.621008     2.869572
       illw3 |    .0326786    .1772251      0.18    0.854     -.3146761     .3800333
     shfamw3 |   -.0089451    .0081686     -1.10    0.273     -.0249552     .0070651
      shhlw3 |   -.0019331    .0067351     -0.29    0.774     -.0151336     .0112673
     shjobw3 |    .0022608    .0074164      0.30    0.760      -.012275     .0167966
    shrelaw3 |    .0045217    .0078937      0.57    0.567     -.0109497     .0199931
     suprtw3 |   -.0034378    .0085075     -0.40    0.686     -.0201123     .0132366
     suchrw3 |   -.0106093    .0056039     -1.89    0.058     -.0215928     .0003741
    havmilsq |   -4.33e-06    6.65e-06     -0.65    0.515     -.0000174     8.70e-06
     radhlw3 |           0   (omitted)
       _cons |    7.330327    962.4125      0.01    0.994     -1878.964     1893.624
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        33            12  |         45
     -     |        33           259  |        292
-----------+--------------------------+-----------
   Total   |        66           271  |        337

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   50.00%
Specificity                     Pr( -|~D)   95.57%
Positive predictive value       Pr( D| +)   73.33%
Negative predictive value       Pr(~D| -)   88.70%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.43%
False - rate for true D         Pr( -| D)   50.00%
False + rate for classified +   Pr(~D| +)   26.67%
False - rate for classified -   Pr( D| -)   11.30%
--------------------------------------------------
Correctly classified                        86.65%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       337
 number of covariate patterns =       337
            Pearson chi2(287) =       317.53
                  Prob > chi2 =         0.1040

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -166.677     Log-Lik Full Model:         -107.572
D(280):                      215.143     LR(49):                      118.210
                                         Prob > LR:                     0.000
McFadden's R2:                 0.355     McFadden's Adj R2:             0.013
Maximum Likelihood R2:         0.296     Cragg & Uhler's R2:            0.471
McKelvey and Zavoina's R2:     0.678     Efron's R2:                    0.373
Variance of y*:               10.209     Variance of error:             3.290
Count R2:                      0.866     Adj Count R2:                  0.318
AIC:                           0.977     AIC*n:                       329.143
BIC:                       -1414.480     BIC':                        166.974

.
.  label var radhlw3 "Self-perceived Chornobyl health threat in wave 3"

.
. title4 "6. trimmed Moderators of male Dose => Interests and Hobbies Impact"
-------------
6. trimmed Moderators of male Dose => Interests and Hobbies Impact
-------------

.
. di as input "Wave 3 Main effects Dose=> Interests and Hobbies impact identification"
Wave 3 Main effects Dose=> Interests and Hobbies impact identification

. forvalues j=3/3 {
  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 w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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 shfamw3 radhlw3 bf4m
 13.       xi: logistic `var' age radhlw3 avgcumdosew3 shfamw3  ///
>                    bf5m 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3

chunk 8 H1 test:Gender= male  model Wave =  3 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              Full Nottingham Part 2 subscale models                 *****
*****                          males on  wave=3                           *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:13  *****
*******************************************************************************
*******************************************************************************


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


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


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


radhlw3           double   %8.0g                        Self-perceived Chornobyl health threat in wave 3


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


Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      68.96
                                                  Prob > chi2     =     0.0000
Log likelihood = -84.583465                       Pseudo R2       =     0.2896

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0503393    .0177324      2.84    0.005      .0155844     .0850941
     radhlw3 |     .036284    .0076652      4.73    0.000      .0212606     .0513075
avgcumdosew3 |   -.1055965    .1287622     -0.82    0.412     -.3579659     .1467728
     shfamw3 |     .015864    .0063173      2.51    0.012      .0034822     .0282458
        bf5m |    -.002198     .001127     -1.95    0.051     -.0044068     .0000109
       _cons |   -7.784484     1.20097     -6.48    0.000     -10.13834    -5.430625
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        11             6  |         17
     -     |        27           296  |        323
-----------+--------------------------+-----------
   Total   |        38           302  |        340

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.64%
--------------------------------------------------
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.36%
--------------------------------------------------
Correctly classified                        90.29%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       336
            Pearson chi2(330) =       249.07
                  Prob > chi2 =         0.9997

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -119.064     Log-Lik Full Model:          -84.583
D(334):                      169.167     LR(5):                        68.962
                                         Prob > LR:                     0.000
McFadden's R2:                 0.290     McFadden's Adj R2:             0.239
Maximum Likelihood R2:         0.184     Cragg & Uhler's R2:            0.365
McKelvey and Zavoina's R2:     0.495     Efron's R2:                    0.236
Variance of y*:                6.512     Variance of error:             3.290
Count R2:                      0.903     Adj Count R2:                  0.132
AIC:                           0.533     AIC*n:                       181.167
BIC:                       -1777.701     BIC':                        -39.817

Note: bf4m is necssary for bf5 but if bf4m is in model bf5 is not signif.
 Therefore, bf5 is not deemed significant.

.
. cap gen bf5mXd3 = bf5m*avgcumdosew3

.
.
.
. title3 "Wave 3 Main effects Dose=> Interests and Hobbies impact identification"
-------------
title3 : Wave 3 Main effects Dose=> Interests and Hobbies impact identification
16 Jun 2012
20:48:14
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide13june2012.dta  currrently has  2367  variables and  703  observations

. forvalues j=3/3 {
  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 w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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 males in wave=`j'"
 11.
.       xi: logistic `var' age   ///
>                 radhlw`j' avgcumdosew`j'  ///
>                  shfamw`j'  bf4m ///
>                  bf5m bf5mXd3  if gender==1, 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3

chunk 8 H1 test:Gender= male  model Wave =  3 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****     Full Nottingham Part 2 subscale models for males in wave=3      *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:14  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        340
                                                  LR chi2(7)      =      69.85
                                                  Prob > chi2     =     0.0000
Log likelihood = -84.141731                       Pseudo R2       =     0.2933

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0427782    .0194796      2.20    0.028       .004599     .0809575
     radhlw3 |    .0323992    .0086278      3.76    0.000       .015489     .0493095
avgcumdosew3 |   -.0334024     .265555     -0.13    0.900     -.5538806     .4870758
     shfamw3 |    .0129086     .006987      1.85    0.065     -.0007857     .0266028
        bf4m |   -.0374129     .040869     -0.92    0.360     -.1175146     .0426889
        bf5m |   -.0015707    .0014827     -1.06    0.289     -.0044767     .0013353
     bf5mXd3 |   -.0002159    .0008473     -0.25    0.799     -.0018766     .0014448
       _cons |   -6.355059    1.990746     -3.19    0.001     -10.25685    -2.453267
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        11             8  |         19
     -     |        27           294  |        321
-----------+--------------------------+-----------
   Total   |        38           302  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   28.95%
Specificity                     Pr( -|~D)   97.35%
Positive predictive value       Pr( D| +)   57.89%
Negative predictive value       Pr(~D| -)   91.59%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.65%
False - rate for true D         Pr( -| D)   71.05%
False + rate for classified +   Pr(~D| +)   42.11%
False - rate for classified -   Pr( D| -)    8.41%
--------------------------------------------------
Correctly classified                        89.71%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       338
            Pearson chi2(330) =       244.95
                  Prob > chi2 =         0.9999

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -119.064     Log-Lik Full Model:          -84.142
D(332):                      168.283     LR(7):                        69.845
                                         Prob > LR:                     0.000
McFadden's R2:                 0.293     McFadden's Adj R2:             0.226
Maximum Likelihood R2:         0.186     Cragg & Uhler's R2:            0.369
McKelvey and Zavoina's R2:     0.469     Efron's R2:                    0.238
Variance of y*:                6.195     Variance of error:             3.290
Count R2:                      0.897     Adj Count R2:                  0.079
AIC:                           0.542     AIC*n:                       184.283
BIC:                       -1766.926     BIC':                        -29.042

. scalar SigDoseInthbMw3 = "no"

. scalar MainEffInthbMw3 = "age radhlw3 shfamw3"

. scalar InthbMw3 = "none"

.
. *------chunk 8  female moderator models
. title "trimmed Moderators of female Dose => Interests and Hobbies Impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
***** trimmed Moderators of female Dose => Interests and Hobbies Impact   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:16  *****
*******************************************************************************
*******************************************************************************


.
.
. forvalues j=3/3 {
  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 w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3

chunk 8 H1 test:Gender= male  model Wave =  3 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        Full Nottingham Part 2 subscale models for females           *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:16  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        363
                                                  LR chi2(4)      =      85.17
                                                  Prob > chi2     =     0.0000
Log likelihood = -129.52718                       Pseudo R2       =     0.2474

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0747817    .0159584      4.69    0.000      .0435038     .1060596
     radhlw3 |    .0177314    .0055334      3.20    0.001      .0068862     .0285766
avgcumdosew3 |    .0423064    .0679809      0.62    0.534     -.0909337     .1755466
         bf4 |    -.092667    .0312315     -2.97    0.003     -.1538797    -.0314543
       _cons |   -6.042759    1.092151     -5.53    0.000     -8.183336    -3.902181
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        27            10  |         37
     -     |        39           287  |        326
-----------+--------------------------+-----------
   Total   |        66           297  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   40.91%
Specificity                     Pr( -|~D)   96.63%
Positive predictive value       Pr( D| +)   72.97%
Negative predictive value       Pr(~D| -)   88.04%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.37%
False - rate for true D         Pr( -| D)   59.09%
False + rate for classified +   Pr(~D| +)   27.03%
False - rate for classified -   Pr( D| -)   11.96%
--------------------------------------------------
Correctly classified                        86.50%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       361
            Pearson chi2(356) =       495.06
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -172.113     Log-Lik Full Model:         -129.527
D(358):                      259.054     LR(4):                        85.171
                                         Prob > LR:                     0.000
McFadden's R2:                 0.247     McFadden's Adj R2:             0.218
Maximum Likelihood R2:         0.209     Cragg & Uhler's R2:            0.341
McKelvey and Zavoina's R2:     0.412     Efron's R2:                    0.299
Variance of y*:                5.592     Variance of error:             3.290
Count R2:                      0.865     Adj Count R2:                  0.258
AIC:                           0.741     AIC*n:                       269.054
BIC:                       -1851.142     BIC':                        -61.593

. scalar SigdoseInthbFw3 = "no"

. scalar MainEffInthbFw3 = "age radhlw3 bf4"

.
. *------chunk 8 testing female moderators
. title "trimmed Moderators of female Dose => Interests and Hobbies Impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
***** trimmed Moderators of female Dose => Interests and Hobbies Impact   *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:17  *****
*******************************************************************************
*******************************************************************************


.
.
. forvalues j=3/3 {
  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 w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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 in wave=`j' "
 11.
.       xi: logistic `var' age   ///
>                 radhlw`j' avgcumdosew`j' ///
>                    bf4  bf4Xd3 ageXd3 radhlw3Xd3 ///
>                  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


marrw31           byte     %8.0g                        marrw3==1. single


marrw32           byte     %8.0g                        marrw3==2. cohabitating


marrw33           byte     %8.0g                        marrw3==3. married


marrw34           byte     %8.0g                        marrw3==4. separated


marrw35           byte     %8.0g                        marrw3==5. divorced


marrw36           byte     %8.0g                        marrw3==6. widowed


inc1w3            double   %15.0g        LABJ           Income is not sufficient for basic neccessities NOW


inc2w3            double   %15.0g        LABJ           Income is just sufficient for basic neccessities NOW


inc3w3            double   %15.0g        LABJ           Income is sufficient for basics plus extra purchases/savings NOW


inc4w3            double   %15.0g        LABJ           Income allows to comfortably afford luxury items NOW


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= 3

chunk 8 H1 test:Gender= male  model Wave =  3 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   Full Nottingham Part 2 subscale models for females in wave=3      *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:17  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        363
                                                  LR chi2(7)      =      85.42
                                                  Prob > chi2     =     0.0000
Log likelihood = -129.40062                       Pseudo R2       =     0.2482

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |      .07069    .0194156      3.64    0.000       .032636     .1087439
     radhlw3 |    .0190385    .0070172      2.71    0.007      .0052851     .0327919
avgcumdosew3 |   -.0765606    .6162688     -0.12    0.901     -1.284425     1.131304
         bf4 |   -.0964948    .0400004     -2.41    0.016     -.1748942    -.0180954
      bf4Xd3 |    .0029229     .020246      0.14    0.885     -.0367585     .0426043
      ageXd3 |    .0035645    .0097808      0.36    0.716     -.0156055     .0227346
  radhlw3Xd3 |   -.0011667     .003632     -0.32    0.748     -.0082854     .0059519
       _cons |   -5.898722    1.310131     -4.50    0.000     -8.466531    -3.330913
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        28            10  |         38
     -     |        38           287  |        325
-----------+--------------------------+-----------
   Total   |        66           297  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   42.42%
Specificity                     Pr( -|~D)   96.63%
Positive predictive value       Pr( D| +)   73.68%
Negative predictive value       Pr(~D| -)   88.31%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.37%
False - rate for true D         Pr( -| D)   57.58%
False + rate for classified +   Pr(~D| +)   26.32%
False - rate for classified -   Pr( D| -)   11.69%
--------------------------------------------------
Correctly classified                        86.78%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       361
            Pearson chi2(353) =       496.78
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -172.113     Log-Lik Full Model:         -129.401
D(355):                      258.801     LR(7):                        85.424
                                         Prob > LR:                     0.000
McFadden's R2:                 0.248     McFadden's Adj R2:             0.202
Maximum Likelihood R2:         0.210     Cragg & Uhler's R2:            0.342
McKelvey and Zavoina's R2:     0.413     Efron's R2:                    0.301
Variance of y*:                5.602     Variance of error:             3.290
Count R2:                      0.868     Adj Count R2:                  0.273
AIC:                           0.757     AIC*n:                       274.801
BIC:                       -1833.712     BIC':                        -44.163

. scalar InthbModFw3 = "none"

.
. title4 "Chunk 8  interests and hobbies testing mediator effects "
-------------
Chunk 8  interests and hobbies testing mediator effects
-------------

.
. * age is a mediating effect for males for Dose=> sex life for men
.
. glm age avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6336

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

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

                                                   AIC             =  7.839021
Log likelihood   = -1330.633586                    BIC             =   47957.2

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .5433648    .2472657      2.20    0.028       .058733     1.027997
       _cons |    48.52021    .7247376     66.95    0.000      47.09975     49.94067
-------------+----------------------------------------------------------------

. 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.)

.
. * illness is a mediating effect for males = > sex life for men
. des illw3

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


illw3             double   %8.0g                        Total number of illnesses experienced in time period 1996-NOW


. glm illw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -461.99206

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

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

                                                   AIC             =  2.729365
Log likelihood   = -461.9920626                    BIC             = -1668.714

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .038211    .0192139      1.99    0.047      .0005524     .0758696
       _cons |    .4504952    .0563162      8.00    0.000      .3401176     .5608729
-------------+----------------------------------------------------------------

. glm HP2inthob illw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  234.8681
Iteration 2:   deviance =  233.1574
Iteration 3:   deviance =  233.1444
Iteration 4:   deviance =  233.1444
Iteration 5:   deviance =  233.1444

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   233.144425                    (1/df) Deviance =  .6897764
Pearson          =  334.1788359                    (1/df) Pearson  =  .9886948

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

                                                   BIC             = -1737.039

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    .1917072    .0680987      2.82    0.005      .0582362     .3251781
       _cons |   -1.333765     .087554    -15.23    0.000     -1.505368    -1.162163
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw3

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


radhlw3           double   %8.0g                        Self-perceived Chornobyl health threat in wave 3


. glm radhlw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1695.1855

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

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

                                                   AIC             =  9.983444
Log likelihood   = -1695.185473                    BIC             =  424265.5

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .9606492    .7224692      1.33    0.184     -.4553645     2.376663
       _cons |    46.19995    2.117563     21.82    0.000       42.0496      50.3503
-------------+----------------------------------------------------------------

. glm HP2inthob radhlw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  203.3027
Iteration 2:   deviance =  188.4084
Iteration 3:   deviance =  186.1904
Iteration 4:   deviance =  186.0891
Iteration 5:   deviance =  186.0888
Iteration 6:   deviance =  186.0888

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   186.088809                    (1/df) Deviance =  .5505586
Pearson          =  318.4835319                    (1/df) Pearson  =   .942259

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

                                                   BIC             = -1784.095

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0212428    .0025645      8.28    0.000      .0162164     .0262691
       _cons |   -2.562769    .2038548    -12.57    0.000     -2.962317    -2.163221
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des shfamw3

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


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


. glm shfamw3  avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1708.9012

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

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

                                                   AIC             =  10.06412
Log likelihood   = -1708.901202                    BIC             =  460079.9

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.1212312    .7522098     -0.16    0.872     -1.595535     1.353073
       _cons |    54.35361    2.204733     24.65    0.000      50.03242     58.67481
-------------+----------------------------------------------------------------

. glm HP2inthob shfamw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  226.2154
Iteration 2:   deviance =  220.7262
Iteration 3:   deviance =  220.4926
Iteration 4:   deviance =  220.4922
Iteration 5:   deviance =  220.4922

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  220.4922229                    (1/df) Deviance =  .6523439
Pearson          =  359.3118386                    (1/df) Pearson  =  1.063053

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

                                                   BIC             = -1749.691

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw3 |    .0109039    .0022452      4.86    0.000      .0065034     .0153045
       _cons |     -1.9049     .171268    -11.12    0.000     -2.240579     -1.56922
-------------+----------------------------------------------------------------
(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  avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -2273.014

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

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

                                                   AIC             =  13.38244
Log likelihood   = -2273.013968                    BIC             =  1.28e+07

-------------+----------------------------------------------------------------
             |                 OIM
         bf5m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    9.087842    3.952764      2.30    0.021      1.340566     16.83512
       _cons |    102.4403    11.58558      8.84    0.000      79.73302     125.1477
-------------+----------------------------------------------------------------

. 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 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1072

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

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

                                                   AIC             =  6.053572
Log likelihood   = -1027.107224                    BIC             =  6403.723

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.0357675    .1012648     -0.35    0.724     -.2342429     .1627078
       _cons |    12.54064    .2968079     42.25    0.000      11.95891     13.12238
-------------+----------------------------------------------------------------

. 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.)

.
.
. * age is a mediating effect for females for Dose=> sex life for women
. glm age avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1408.064

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

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

                                                   AIC             =  7.768948
Log likelihood   =  -1408.06405                    BIC             =  47606.63

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.058366    .3512614      3.01    0.003      .3699069     1.746826
       _cons |    48.94293    .7468173     65.54    0.000      47.47919     50.40666
-------------+----------------------------------------------------------------

. 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.)

.
. 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  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.6569

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

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

                                                   AIC             =  6.124831
Log likelihood   = -1109.656873                    BIC             =   7479.99

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.4386292    .1543885     -2.84    0.004     -.7412252    -.1360333
       _cons |    11.01475    .3282456     33.56    0.000       10.3714      11.6581
-------------+----------------------------------------------------------------

. 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  avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1141.3116

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

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

                                                   AIC             =  6.299237
Log likelihood   = -1141.311602                    BIC             =  9310.664

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    -.441173    .1684561     -2.62    0.009      -.771341    -.1110051
       _cons |    18.82772    .3581548     52.57    0.000      18.12575     19.52969
-------------+----------------------------------------------------------------

. 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 shfamw3

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


shfamw3           double   %8.0g                        Percentage of strains and hassles related to family NOW


. glm shfamw3  avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1708.9012

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

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

                                                   AIC             =  10.06412
Log likelihood   = -1708.901202                    BIC             =  460079.9

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |   -.1212312    .7522098     -0.16    0.872     -1.595535     1.353073
       _cons |    54.35361    2.204733     24.65    0.000      50.03242     58.67481
-------------+----------------------------------------------------------------

. glm HP2sxlife shfamw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  329.7746
Iteration 2:   deviance =  329.2454
Iteration 3:   deviance =  329.2451
Iteration 4:   deviance =  329.2451

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  329.2450963                    (1/df) Deviance =  .9740979
Pearson          =  344.0536463                    (1/df) Pearson  =   1.01791

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

                                                   BIC             = -1640.939

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw3 |    .0079286    .0021676      3.66    0.000      .0036802      .012177
       _cons |   -1.296137    .1536069     -8.44    0.000     -1.597201    -.9950731
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shrelaw3

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


shrelaw3          double   %8.0g                        Percentage of strains and hassles related to relationships NOW


. glm shrelaw3  avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1712.5647

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

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

                                                   AIC             =  10.08567
Log likelihood   = -1712.564737                    BIC             =  470145.2

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    -.043239    .7603587     -0.06    0.955     -1.533515     1.447037
       _cons |    34.40857    2.228617     15.44    0.000      30.04056     38.77658
-------------+----------------------------------------------------------------

. glm HP2sxlife shrelaw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  334.5762
Iteration 2:   deviance =  334.3197
Iteration 3:   deviance =  334.3197
Iteration 4:   deviance =  334.3197

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  334.3196545                    (1/df) Deviance =  .9891114
Pearson          =  339.7061699                    (1/df) Pearson  =  1.005048

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

                                                   BIC             = -1635.864

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw3 |    .0060138     .002025      2.97    0.003      .0020449     .0099827
       _cons |   -1.058186    .1113913     -9.50    0.000     -1.276509    -.8398629
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. *xx summary of mediating effects: males only age and illw2  2
. *xx           females: age
.
.
.
. * summary of sxlife moderator effects  none
. scalar sxLifeMedMw3 = "age illw3"

. scalar sxLifeMedFw3 = "age bf4 bf4m"

.
. * 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
.  matrix define HP2inthbMw3 = J(1,8, 0)

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

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

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

.     matrix define HP2inthbMw3 = (1, 2, 3, 1, 0, 3, 0, 2 )

.         matrix define HP2inthbFw3 = (1, 2, 3, 2, 0, 3, 0, 3 )

.         matrix rowname HP2inthbMw3 = HP2inthbM

.         matrix rowname HP2inthbFw3 = HP2inthobF

.         matlist HP2inthbMw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2inthbM   |         1            2            3            1            0            3            0            2

.         matlist HP2inthbFw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2inthobF   |         1            2            3            2            0            3            0            3

.         matrix define H1pt2w3 = ( HP2wkMw3 \ HP2wkFw3 \ HP2hmcrMw3 \ HP2hmcrFw3 \ HP2spMw3 ///
>             \ HP2spFw3 \ HP2prbfamMw3 \ HP2prbfamFw3 \ HP2inthbMw3 \ HP2inthbFw3 )

.         matlist H1pt2w3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0            4
r1   |         1            2            3            2            0            1            0            6
r1   |         1            2            3            1            0            4            0            2
r1   |         1            2            3            2            0            2            0            2
HP2spMw3   |         1            2            3            1            0            2            0            1
HP2spFw3   |         1            2            3            2            1            5            5            2
HP2prbfamM   |         1            2            3            1            0            5            0            1
HP2prbfamF   |         1            2            3            2            0            2            2            2
HP2inthbM   |         1            2            3            1            0            3            0            2
HP2inthobF   |         1            2            3            2            0            3            0            3

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

.     matrix rownames H1pt2w3 =   HP2wkMw3 HP2wkFw3 HP2hmcrMw3 HP2hmcrFw3 HP2spMw3 HP2spFw3 HP2prbfamMw3 HP2prbfamFw3 HP2inthbMw3 HP2inthbFw3

.     matlist H1pt2w3

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
HP2wkMw3   |         1            2            3            1            0            4            0            4
HP2wkFw3   |         1            2            3            2            0            1            0            6
HP2hmcrMw3   |         1            2            3            1            0            4            0            2
HP2hmcrFw3   |         1            2            3            2            0            2            0            2
HP2spMw3   |         1            2            3            1            0            2            0            1
HP2spFw3   |         1            2            3            2            1            5            5            2
HP2prbfamMw3   |         1            2            3            1            0            5            0            1
HP2prbfamFw3   |         1            2            3            2            0            2            2            2
HP2inthbMw3   |         1            2            3            1            0            3            0            2
HP2inthbFw3   |         1            2            3            2            0            3            0            3

.
. *xxxxxxxxxxxxxxx  chunk 9  Dose=> vacation plans impactxxxxxxxxxxxxxxxxxxxxxxxxx
. title "7. Hypothesis 1 pt 2 wave 3 dose vacation plans impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       7. Hypothesis 1 pt 2 wave 3 dose vacation plans impact        *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:49  *****
*******************************************************************************
*******************************************************************************


.
. cap gen hp2vacatn = HP2vacatn

.
. forvalues j=3/3 {
  2. title " Wave 3 Dose = >hp2vacatn main effects models for H1 pt2"
  3. set more off
  4. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40
  5. local w2bf bf1 bf4 bf6 bf7 bf14 bf15 bf40
  6. local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  7. di _skip(3)
  8.
. di as input "Male model wave 3 dose-hp2vactn moderator model "
  9. di _skip(4)
 10. xi: logistic hp2vacatn 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 hp2hmcare main effects models for H1 no direct dose effect for male"
 13.  pwcorr hp2hmcare age  deaw3 shjobw3 bf7m shjobw3 havmilsq ///
>   radhlw3 avgcumdosew1 if gender==1, sig obs sidak star(.05) listwise
 14. di _skip(1)
 15. di as input "For males hp2hmcare on wave3 and d3 is not signif "
 16. di _skip(1)
 17.   logistic hp2hmcare age  deaw3 shjobw3 bf7m  havmilsq ///
>   radhlw3 avgcumdosew1 if ///
>    gender==1, coef
 18. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       Wave 3 Dose = >hp2vacatn main effects models for H1 pt2       *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:49  *****
*******************************************************************************
*******************************************************************************


Male model wave 3 dose-hp2vactn moderator model

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
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: occ5w3 != 0 predicts failure perfectly
      occ5w3 dropped and 18 obs not used

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

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

note: bf29 != 0 predicts failure perfectly
      bf29 dropped and 7 obs not used

note: _Ieduc_6 omitted because of collinearity
note: occ8w3 omitted because of collinearity
note: marrw36 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw3 omitted because of collinearity
note: avgcumdosew3 omitted because of collinearity

Logistic regression                               Number of obs   =        286
                                                  LR chi2(45)     =     130.35
                                                  Prob > chi2     =     0.0000
Log likelihood = -52.374274                       Pseudo R2       =     0.5544

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1141267    .0450696      2.53    0.011       .025792     .2024615
    _Ieduc_2 |    1.212945    1.630503      0.74    0.457     -1.982782     4.408672
    _Ieduc_3 |   -1.181748    .8345653     -1.42    0.157     -2.817465     .4539703
    _Ieduc_4 |   -.2703336    1.707405     -0.16    0.874     -3.616786     3.076119
    _Ieduc_5 |    .0781642     .821705      0.10    0.924     -1.532348     1.688676
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w3 |   -13.38278    1622.421     -0.01    0.993      -3193.27     3166.504
      occ2w3 |   -12.82938    1622.421     -0.01    0.994     -3192.717     3167.058
      occ3w3 |   -12.16922    1622.422     -0.01    0.994     -3192.057     3167.719
      occ4w3 |   -9.847245    1622.421     -0.01    0.995     -3189.735      3170.04
      occ5w3 |           0   (omitted)
      occ6w3 |           0   (omitted)
      occ7w3 |   -10.21639    1622.421     -0.01    0.995     -3190.104     3169.671
      occ8w3 |           0   (omitted)
     marrw31 |    2.471663    1.877772      1.32    0.188     -1.208702     6.152028
     marrw32 |    3.882172    2.040109      1.90    0.057      -.116367     7.880711
     marrw33 |    .7861586    1.848468      0.43    0.671     -2.836772     4.409089
     marrw35 |    5.481699    2.097529      2.61    0.009      1.370617     9.592781
     marrw36 |           0   (omitted)
      inc1w3 |    12.51469    1622.421      0.01    0.994     -3167.373     3192.402
      inc2w3 |    14.55722    1622.421      0.01    0.993     -3165.329     3194.444
      inc3w3 |    14.35316    1622.421      0.01    0.993     -3165.533      3194.24
      inc4w3 |    15.92527    1622.422      0.01    0.992     -3163.963     3195.813
     radhlw3 |    .0197321    .0147075      1.34    0.180     -.0090941     .0485583
      havmil |    .0234742    .0160068      1.47    0.143     -.0078985      .054847
avgcumdosew3 |    .1032883    .1755565      0.59    0.556      -.240796     .4473726
         bf1 |   -.4769574    .3289335     -1.45    0.147     -1.121655     .1677405
         bf4 |   -.1442369    .2873042     -0.50    0.616     -.7073429     .4188691
         bf2 |    .0000186    .0002978      0.06    0.950     -.0005651     .0006023
        bf4m |   -.1956152    .2497206     -0.78    0.433     -.6850586     .2938281
        bf5m |   -.0071533    .0043294     -1.65    0.098     -.0156388     .0013321
        bf7m |    .0000185    .0010386      0.02    0.986     -.0020172     .0020542
         bf8 |   -.0000173    .0000922     -0.19    0.851     -.0001981     .0001635
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .4362509    .3222411      1.35    0.176     -.1953299     1.067832
        bf22 |    .0001349    .0003106      0.43    0.664     -.0004739     .0007437
        bf29 |           0   (omitted)
        bf30 |   -.0009931    .0006553     -1.52    0.130     -.0022775     .0002912
        bf40 |    .5185801    .3611964      1.44    0.151     -.1893518     1.226512
       deaw3 |    .2097501    .3135963      0.67    0.504     -.4048875     .8243876
      dvcew3 |    2.012022    1.543197      1.30    0.192     -1.012588     5.036632
      sepaw3 |   -2.054184    1.443349     -1.42    0.155     -4.883097     .7747288
      accdw3 |    .2022258     1.25899      0.16    0.872     -2.265349     2.669801
      movew3 |   -4.177869    1.807922     -2.31    0.021     -7.721331    -.6344073
       illw3 |   -.4549089    .4293751     -1.06    0.289     -1.296469     .3866508
     shfamw3 |    .0141549    .0145895      0.97    0.332     -.0144399     .0427498
      shhlw3 |     .004885     .011315      0.43    0.666     -.0172919     .0270619
     shjobw3 |   -.0003857    .0112584     -0.03    0.973     -.0224516     .0216803
    shrelaw3 |    -.008433    .0120996     -0.70    0.486     -.0321477     .0152817
     suprtw3 |    .0050194    .0152005      0.33    0.741     -.0247729     .0348118
     suchrw3 |   -.0175411    .0097951     -1.79    0.073     -.0367391     .0016569
    havmilsq |    -.000046    .0000341     -1.35    0.178     -.0001129     .0000209
     radhlw3 |           0   (omitted)
avgcumdosew3 |           0   (omitted)
       _cons |   -25.70032    13.82795     -1.86    0.063     -52.80261      1.40197
-------------+----------------------------------------------------------------


Note: 8 failures and 0 successes completely determined.


-------------
title3 : trimmed hp2hmcare main effects models for H1 no direct dose effect for male
16 Jun 2012
20:48:50
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/h1tests/h1pt2
Data file  chwide13june2012.dta  currrently has  2374  variables and  703  observations

             | hp2hmc~e      age    deaw3  shjobw3     bf7m  shjobw3 havmilsq
-------------+---------------------------------------------------------------
   hp2hmcare |   1.0000
             |
             |      340
             |
         age |   0.2761*  1.0000
             |   0.0000
             |      340      340
             |
       deaw3 |  -0.0456   0.1402   1.0000
             |   1.0000   0.2940
             |      340      340      340
             |
     shjobw3 |  -0.1006  -0.2840* -0.1099   1.0000
             |   0.9068   0.0000   0.7935
             |      340      340      340      340
             |
        bf7m |  -0.1339  -0.0182   0.1015  -0.0869   1.0000
             |   0.3860   1.0000   0.8986   0.9848
             |      340      340      340      340      340
             |
     shjobw3 |  -0.1006  -0.2840* -0.1099   1.0000* -0.0869   1.0000
             |   0.9068   0.0000   0.7935   0.0000   0.9848
             |      340      340      340      340      340      340
             |
    havmilsq |  -0.0347   0.0207   0.0454  -0.0558  -0.0420  -0.0558   1.0000
             |   1.0000   1.0000   1.0000   1.0000   1.0000   1.0000
             |      340      340      340      340      340      340      340
             |
     radhlw3 |   0.2838*  0.3440* -0.0287   0.0799   0.1399   0.0799  -0.0586
             |   0.0000   0.0000   1.0000   0.9959   0.2988   0.9959   1.0000
             |      340      340      340      340      340      340      340
             |
avgcumdosew1 |   0.0010   0.0918   0.0267   0.0383   0.0206   0.0383  -0.0345
             |   1.0000   0.9680   1.0000   1.0000   1.0000   1.0000   1.0000
             |      340      340      340      340      340      340      340
             |

             |  radhlw3 avgcum~1
-------------+------------------
     radhlw3 |   1.0000
             |
             |      340
             |
avgcumdosew1 |   0.0552   1.0000
             |   1.0000
             |      340      340
             |

For males hp2hmcare on wave3 and d3 is not signif


Logistic regression                               Number of obs   =        340
                                                  LR chi2(7)      =      52.61
                                                  Prob > chi2     =     0.0000
Log likelihood = -146.56853                       Pseudo R2       =     0.1522

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0359393    .0137717      2.61    0.009      .0089474     .0629312
       deaw3 |   -.1733746    .1952123     -0.89    0.374     -.5559836     .2092344
     shjobw3 |   -.0060376    .0041837     -1.44    0.149     -.0142376     .0021624
        bf7m |    -.000621    .0002094     -2.97    0.003     -.0010314    -.0002106
    havmilsq |   -1.50e-06    2.86e-06     -0.52    0.601     -7.10e-06     4.11e-06
     radhlw3 |     .018215    .0044436      4.10    0.000      .0095058     .0269242
avgcumdosew1 |   -.0316268    .1092264     -0.29    0.772     -.2457066      .182453
       _cons |   -3.230154    .8068125     -4.00    0.000     -4.811477     -1.64883
-------------+----------------------------------------------------------------

.
. scalar SigDoseVactnMw3 = "no"

. scalar MainEffVactnMw3 = "age bf7m radhlw3 "

.
. local cn7:colnames(e(b))

. di "`cn7'"
age deaw3 shjobw3 bf7m havmilsq radhlw3 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 deaw3 shjobw3 bf7m havmilsq radhlw3 avgcumdosew1

.
. foreach var in `myvarlist' {
  2. cap gen `var'Xd3 = `var'*avgcumdosew3
  3. }

.
. title " Trimmed male main effects dose=> vacation plans  model"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       Trimmed male main effects dose=> vacation plans  model        *****
*****                                                                     *****
*****                                                                     *****
*****                                            16 Jun 2012    20:48:51  *****
*******************************************************************************
*******************************************************************************


. 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.6528 >= 0.1000  removing avgcumdosew1


p = 0.4319 >= 0.1000  removing deaw3


p = 0.4230 >= 0.1000  removing havmilsq


p = 0.2153 >= 0.1000  removing shjobw3


Logistic regression                               Number of obs   =        340
                                                  LR chi2(3)      =      38.31
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.99881                       Pseudo R2       =     0.1530

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0582498    .0159119      3.66    0.000       .027063     .0894366
     radhlw3 |    .0163308    .0053758      3.04    0.002      .0057944     .0268671
        bf7m |   -.0003954    .0002402     -1.65    0.100     -.0008662     .0000754
       _cons |   -5.639649    .9231625     -6.11    0.000     -7.449014    -3.830284
-------------+----------------------------------------------------------------

.
.
. local cn8:colnames(e(b))

. di "`cn8'"
age radhlw3 bf7m _cons

. local len8 = length("`cn8'")

. di `len7'
58

. local len8b = `len8' - 6

. di `len8b'
16

. local myvarlist = substr("`cn8'",1,`len8b')

. di "`myvarlist'"
age radhlw3 bf7m

.
.
.
.  title4 "Trimmed male interaction dose=> vacation plans model"
-------------
Trimmed male interaction dose=> vacation plans model
-------------

.  logit hp2vacatn age radhlw3 ageXd3 bf7m avgcumdosew3 bf4m bf4mXd3 bf7mXd3 if gender==1

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood =   -103.468
Iteration 2:   log likelihood = -95.130161
Iteration 3:   log likelihood = -94.528514
Iteration 4:   log likelihood =  -94.47901
Iteration 5:   log likelihood = -94.478195
Iteration 6:   log likelihood = -94.478195

Logistic regression                               Number of obs   =        340
                                                  LR chi2(8)      =      61.35
                                                  Prob > chi2     =     0.0000
Log likelihood = -94.478195                       Pseudo R2       =     0.2451

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0800514    .0379791      2.11    0.035      .0056137     .1544891
     radhlw3 |   -.0025156    .0070187     -0.36    0.720     -.0162721     .0112409
      ageXd3 |   -.0428824    .0401478     -1.07    0.285     -.1215705     .0358058
        bf7m |    .0002096     .000436      0.48    0.631     -.0006449      .001064
avgcumdosew3 |    3.600094    3.230198      1.11    0.265     -2.730977     9.931165
        bf4m |   -.1155875     .069371     -1.67    0.096     -.2515523     .0203772
     bf4mXd3 |   -.0793872    .0595624     -1.33    0.183     -.1961273      .037353
     bf7mXd3 |    .0002138    .0002797      0.76    0.445     -.0003343      .000762
       _cons |    -4.31894    3.045103     -1.42    0.156     -10.28723     1.649352
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


.
.  scalar vactnModMw3 ="none"

.
.  di as input "Trimmed Female model wave 3 main effects dose-hp2vacatn model "
Trimmed Female model wave 3 main effects dose-hp2vacatn model

.  forvalues j=3/3 {
  2.  local w3bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 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   =        363
                                                  LR chi2(5)      =      69.60
                                                  Prob > chi2     =     0.0000
Log likelihood = -132.71672                       Pseudo R2       =     0.2077

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0916152    .0157813      5.81    0.000      .0606844     .1225459
     radhlw3 |    .0117344    .0050394      2.33    0.020      .0018573     .0216115
avgcumdosew3 |    .0985606    .0692713      1.42    0.155     -.0372087     .2343299
       deaw3 |    .3433813     .158229      2.17    0.030      .0332581     .6535045
     suchrw3 |   -.0061918    .0037117     -1.67    0.095     -.0134666     .0010831
       _cons |    -7.50211    .9350027     -8.02    0.000     -9.334682    -5.669539
-------------+----------------------------------------------------------------

.
. scalar SigDoseVactnMw3 = "no"

.
.  * 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
.  *                   3 signif main effects
.
. local cn9:colnames(e(b))

. di "`cn9'"
age radhlw3 avgcumdosew3 deaw3 suchrw3 _cons

. local len9 = length("`cn9'")

. di `len9'
44

. local len9b = `len9' - 6

. di `len9b'
38

. local myvarlist = substr("`cn9'",1,`len9b')

. di "`myvarlist'"
age radhlw3 avgcumdosew3 deaw3 suchrw3

.
.
. foreach var in `myvarlist' {
  2.   cap gen `var'Xd3 = `var'*avgcumdosew3
  3.   }

.
.
. * female dose vacatn w3 models
.
. title4 "trimmed hp2vacatn wave3 main effects models for H1"
-------------
trimmed hp2vacatn wave3 main effects models for H1
-------------

. di as input "For females hp2vacatn on wave3"
For females hp2vacatn on wave3

. sw, pr(.1):logit hp2vacatn `myvarlist' if gender==2


  begin with full model


p = 0.1548 >= 0.1000  removing avgcumdosew3


p = 0.1174 >= 0.1000  removing suchrw3


Logistic regression                               Number of obs   =        363
                                                  LR chi2(3)      =      65.18
                                                  Prob > chi2     =     0.0000
Log likelihood = -134.92371                       Pseudo R2       =     0.1946

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0872837    .0154104      5.66    0.000      .0570799     .1174875
     radhlw3 |    .0131054    .0049947      2.62    0.009       .003316     .0228948
       deaw3 |    .2791769    .1537034      1.82    0.069     -.0220763     .5804301
       _cons |   -7.430633    .9404734     -7.90    0.000     -9.273927    -5.587339
-------------+----------------------------------------------------------------

. estat class

Logistic model for hp2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        15             5  |         20
     -     |        48           295  |        343
-----------+--------------------------+-----------
   Total   |        63           300  |        363

Classified + if predicted Pr(D) >= .5
True D defined as hp2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   23.81%
Specificity                     Pr( -|~D)   98.33%
Positive predictive value       Pr( D| +)   75.00%
Negative predictive value       Pr(~D| -)   86.01%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.67%
False - rate for true D         Pr( -| D)   76.19%
False + rate for classified +   Pr(~D| +)   25.00%
False - rate for classified -   Pr( D| -)   13.99%
--------------------------------------------------
Correctly classified                        85.40%
--------------------------------------------------

. estat gof


Logistic model for hp2vacatn, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       291
            Pearson chi2(287) =       335.34
                  Prob > chi2 =         0.0261

. fitstat

Measures of Fit for logit of hp2vacatn

Log-Lik Intercept Only:     -167.516     Log-Lik Full Model:         -134.924
D(359):                      269.847     LR(3):                        65.185
                                         Prob > LR:                     0.000
McFadden's R2:                 0.195     McFadden's Adj R2:             0.171
Maximum Likelihood R2:         0.164     Cragg & Uhler's R2:            0.273
McKelvey and Zavoina's R2:     0.341     Efron's R2:                    0.227
Variance of y*:                4.992     Variance of error:             3.290
Count R2:                      0.854     Adj Count R2:                  0.159
AIC:                           0.765     AIC*n:                       277.847
BIC:                       -1846.243     BIC':                        -47.501

.
. scalar SigDoseVactnFw3 = "no"

. scalar MainEffVactnFw3 = "age radhlw3 deaw3"

.
. di as result " Full moderator model for females for dose=> Vacation plans"
 Full moderator model for females for dose=> Vacation plans

. logit hp2vacatn age radhlw3 deaw3 suchrw3 avgcumdosew3 ageXd3 radhlw3Xd3 deaw3Xd3  ///
>     suchrw3Xd3 havmilsq if gender==2

Iteration 0:   log likelihood =   -167.516
Iteration 1:   log likelihood = -131.66933
Iteration 2:   log likelihood = -127.22328
Iteration 3:   log likelihood = -127.01792
Iteration 4:   log likelihood = -127.01661
Iteration 5:   log likelihood =  -127.0166

Logistic regression                               Number of obs   =        363
                                                  LR chi2(10)     =      81.00
                                                  Prob > chi2     =     0.0000
Log likelihood =  -127.0166                       Pseudo R2       =     0.2418

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1051773    .0237507      4.43    0.000      .0586268     .1517279
     radhlw3 |    .0086474    .0071994      1.20    0.230     -.0054632     .0227581
       deaw3 |    -.018111    .2299772     -0.08    0.937     -.4688582     .4326361
     suchrw3 |   -.0131465    .0051799     -2.54    0.011     -.0232988    -.0029941
avgcumdosew3 |   -.4455554    1.249774     -0.36    0.721     -2.895067     2.003957
      ageXd3 |   -.0067688    .0178685     -0.38    0.705     -.0417904     .0282529
  radhlw3Xd3 |    .0045845    .0048868      0.94    0.348     -.0049935     .0141625
    deaw3Xd3 |    .3320908    .1608104      2.07    0.039      .0169081     .6472735
  suchrw3Xd3 |    .0055826    .0032326      1.73    0.084     -.0007533     .0119184
    havmilsq |   -3.31e-07    8.64e-07     -0.38    0.701     -2.02e-06     1.36e-06
       _cons |   -7.357805     1.47262     -5.00    0.000     -10.24409    -4.471523
-------------+----------------------------------------------------------------

.
. di as result "trimmed female moderator model for dose=> vacation plans"
trimmed female moderator model for dose=> vacation plans

. logit hp2vacatn age avgcumdosew3 suchrw3 deaw3 deaw3Xd3  if gender==2

Iteration 0:   log likelihood =   -167.516
Iteration 1:   log likelihood = -136.37785
Iteration 2:   log likelihood = -133.24846
Iteration 3:   log likelihood = -133.21681
Iteration 4:   log likelihood = -133.21679
Iteration 5:   log likelihood = -133.21679

Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =      68.60
                                                  Prob > chi2     =     0.0000
Log likelihood = -133.21679                       Pseudo R2       =     0.2048

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0997666    .0154683      6.45    0.000      .0694493     .1300839
avgcumdosew3 |    .0469958    .0857324      0.55    0.584     -.1210366     .2150283
     suchrw3 |   -.0068988    .0037456     -1.84    0.065       -.01424     .0004423
       deaw3 |    .1355918    .2007115      0.68    0.499     -.2577956     .5289792
    deaw3Xd3 |    .2112882    .1167631      1.81    0.070     -.0175632     .4401397
       _cons |   -7.069816    .8971072     -7.88    0.000     -8.828114    -5.311518
-------------+----------------------------------------------------------------

.
. scalar VacatnModFw3 = "none"

. *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
. cap gen hp2vactn = HP2vacatn

. title4 "Chunk 9 HP2vacatn plans mediator models for males"
-------------
Chunk 9 HP2vacatn plans mediator models for males
-------------

.
. * age is a mediator for males
. glm age avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6336

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

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

                                                   AIC             =  7.839021
Log likelihood   = -1330.633586                    BIC             =   47957.2

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .5433648    .2472657      2.20    0.028       .058733     1.027997
       _cons |    48.52021    .7247376     66.95    0.000      47.09975     49.94067
-------------+----------------------------------------------------------------

. 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.)

.
. * illness is a mediating effect for males = > vacatn for men
. des illw3

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


illw3             double   %8.0g                        Total number of illnesses experienced in time period 1996-NOW


. glm illw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -461.99206

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

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

                                                   AIC             =  2.729365
Log likelihood   = -461.9920626                    BIC             = -1668.714

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |     .038211    .0192139      1.99    0.047      .0005524     .0758696
       _cons |    .4504952    .0563162      8.00    0.000      .3401176     .5608729
-------------+----------------------------------------------------------------

. glm hp2vactn illw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  247.0817
Iteration 2:   deviance =  245.9165
Iteration 3:   deviance =  245.9101
Iteration 4:   deviance =  245.9101
Iteration 5:   deviance =  245.9101

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  245.9100555                    (1/df) Deviance =  .7275445
Pearson          =  334.9802312                    (1/df) Pearson  =  .9910658

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

                                                   BIC             = -1724.274

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |    .1787158    .0693787      2.58    0.010      .0427362     .3146955
       _cons |   -1.278417    .0876012    -14.59    0.000     -1.450112    -1.106721
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw3

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


radhlw3           double   %8.0g                        Self-perceived Chornobyl health threat in wave 3


. glm radhlw3 avgcumdosew3 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1695.1855

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

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

                                                   AIC             =  9.983444
Log likelihood   = -1695.185473                    BIC             =  424265.5

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .9606492    .7224692      1.33    0.184     -.4553645     2.376663
       _cons |    46.19995    2.117563     21.82    0.000       42.0496      50.3503
-------------+----------------------------------------------------------------

. glm hp2vactn radhlw3 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  235.0568
Iteration 2:   deviance =  230.1721
Iteration 3:   deviance =  230.0122
Iteration 4:   deviance =  230.0119
Iteration 5:   deviance =  230.0119

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  230.0118626                    (1/df) Deviance =  .6805085
Pearson          =  338.3882304                    (1/df) Pearson  =  1.001149

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

                                                   BIC             = -1740.172

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0115045    .0021825      5.27    0.000      .0072269     .0157822
       _cons |   -1.814894    .1529622    -11.86    0.000     -2.114694    -1.515093
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. title4 "HP2vacatn plans mediator models for females"
-------------
HP2vacatn plans mediator models for females
-------------

.
. * age is a mediator for females
. glm age avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood =  -1408.064

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

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

                                                   AIC             =  7.768948
Log likelihood   =  -1408.06405                    BIC             =  47606.63

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    1.058366    .3512614      3.01    0.003      .3699069     1.746826
       _cons |    48.94293    .7468173     65.54    0.000      47.47919     50.40666
-------------+----------------------------------------------------------------

. 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 illw3

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


illw3             double   %8.0g                        Total number of illnesses experienced in time period 1996-NOW


. glm illw3 avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -562.81042

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

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

                                                   AIC             =  3.111903
Log likelihood   = -562.8104237                    BIC             = -1655.676

-------------+----------------------------------------------------------------
             |                 OIM
        illw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    .1284565    .0342268      3.75    0.000      .0613733     .1955398
       _cons |    .5563644    .0727696      7.65    0.000      .4137387     .6989902
-------------+----------------------------------------------------------------

. glm hp2vactn illw3 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  334.6961
Iteration 2:   deviance =  334.6441
Iteration 3:   deviance =  334.6441
Iteration 4:   deviance =  334.6441

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   334.644123                    (1/df) Deviance =   .926992
Pearson          =  362.8044598                    (1/df) Pearson  =  1.004999

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

                                                   BIC             = -1793.235

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw3 |     .041243    .0622857      0.66    0.508     -.0808348     .1633209
       _cons |   -.9706284    .0880746    -11.02    0.000     -1.143252    -.7980053
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * radhlw3 is a mediating effect for females => vactn
. des radhlw3

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


radhlw3           double   %8.0g                        Self-perceived Chornobyl health threat in wave 3


. glm radhlw3 avgcumdosew3 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1798.7074

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

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

                                                   AIC             =  9.921253
Log likelihood   = -1798.707367                    BIC             =  425821.1

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew3 |    2.751602     1.03038      2.67    0.008      .7320943      4.77111
       _cons |    57.70689    2.190692     26.34    0.000      53.41321     62.00057
-------------+----------------------------------------------------------------

. glm hp2vactn radhlw3 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =   316.824
Iteration 2:   deviance =  314.9168
Iteration 3:   deviance =   314.905
Iteration 4:   deviance =   314.905
Iteration 5:   deviance =   314.905

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  314.9050287                    (1/df) Deviance =  .8723131
Pearson          =  371.6251351                    (1/df) Pearson  =  1.029433

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

                                                   BIC             = -1812.974

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw3 |    .0106148    .0023181      4.58    0.000      .0060715     .0151582
       _cons |   -1.651184     .179583     -9.19    0.000     -2.003161    -1.299208
-------------+----------------------------------------------------------------
(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
.
. scalar VactnMedMw3 = "age illw3"

. scalar VactnMedFw3 = "age illw3 radhlw3"

.
. *xx summary of moderator effects for females:
.     * no signif main dose effect
.     * 3 signif main effects in main effect model
.     * 1 moderator: deaw3Xd3
. title4 "7. SUMMARY MATRIX of dose - vacation plans impact"
-------------
7. SUMMARY MATRIX of dose - vacation plans impact
-------------

. set more off

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

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

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

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

.     matrix define HP2vactnMw3= (1, 2, 3, 1, 0, 3, 0, 2 )

.         matrix define HP2vactnFw3= (1, 2, 3, 2, 0, 3, 1, 3 )

.         matrix rowname HP2vactnMw3 = HP2vactnM

.         matrix rowname HP2vactnFw3 = HP2vactnF

.         matlist HP2vactnMw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2vactnM   |         1            2            3            1            0            3            0            2

.         matlist HP2vactnFw3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
HP2vactnF   |         1            2            3            2            0            3            1            3

. matrix define H1pt2w3=(HP2wkMw3 \ HP2wkFw3 \ HP2hmcrMw3 \ HP2hmcrFw3 \ HP2spMw3 \ HP2spFw3 \ HP2prbfamMw3 \ HP2prbfamFw3 \ HP2inthbMw3 \ HP2inthbFw3 \ HP2vactnMw3 \ HP2vactnFw3 )

.
.         matlist H1pt2w3

   | c1    c2    c3    c4    c5    c6    c7    c8
-------------+----------------------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0            4
r1   |         1            2            3            2            0            1            0            6
r1   |         1            2            3            1            0            4            0            2
r1   |         1            2            3            2            0            2            0            2
HP2spMw3   |         1            2            3            1            0            2            0            1
HP2spFw3   |         1            2            3            2            1            5            5            2
HP2prbfamM   |         1            2            3            1            0            5            0            1
HP2prbfamF   |         1            2            3            2            0            2            2            2
HP2inthbM   |         1            2            3            1            0            3            0            2
HP2inthobF   |         1            2            3            2            0            3            0            3
HP2vactnM   |         1            2            3            1            0            3            0            2
HP2vactnF   |         1            2            3            2            0            3            1            3

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

. matrix rownames H1pt2w3 =HP2wkMw3 HP2wkFw3 HP2hmcrMw3 HP2hmcrFw3 HP2socprbMw3 HP2socprbFw3 HP2prbfamMw3 HP2prbfamFw3 HP2inthbMw3 HP2inthbFw3 HP2vacatnMw3 HP2vacatnFw3

.     matlist H1pt2w3

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig    numMed
-------------+----------------------------------------------------------------------------------------
HP2wkMw3   |         1            2            3            1            0            4            0            4
HP2wkFw3   |         1            2            3            2            0            1            0            6
HP2hmcrMw3   |         1            2            3            1            0            4            0            2
HP2hmcrFw3   |         1            2            3            2            0            2            0            2
HP2socprbMw3   |         1            2            3            1            0            2            0            1
HP2socprbFw3   |         1            2            3            2            1            5            5            2
HP2prbfamMw3   |         1            2            3            1            0            5            0            1
HP2prbfamFw3   |         1            2            3            2            0            2            2            2
HP2inthbMw3   |         1            2            3            1            0            3            0            2
HP2inthbFw3   |         1            2            3            2            0            3            0            3
HP2vacatnMw3   |         1            2            3            1            0            3            0            2
HP2vacatnFw3   |         1            2            3            2            0            3            1            3

.
.
. sjlog close, replace