. set linesize 80

. 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 two"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****            Testing part 2 of hypothesis 1 for wave two              *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    14:58:43  *****
*******************************************************************************
*******************************************************************************


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

. use chwide1jul2012, 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 *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    14:58:43  *****
*******************************************************************************
*******************************************************************************


.
.
. //  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
.
. set linesize 130

.
. est clear

. title "Zero order tests"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                          Zero order tests                           *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    14:58:43  *****
*******************************************************************************
*******************************************************************************


. set more off

. foreach var in HP2work HP2hmcare HP2probsoc HP2pbfhm HP2sxlife HP2inthob ///
>       HP2vacatn  {
  2.       forvalues k=2/2 {
  3.   logit `var' avgcumdosew2 if gender==`k', nolog
  4.   eststo w2`var'dose
  5.   }
  6.  }

Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =       6.63
                                                  Prob > chi2     =     0.0100
Log likelihood = -203.24758                       Pseudo R2       =     0.0160

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .2046594    .0826501      2.48    0.013      .0426681     .3666507
       _cons |   -1.260388    .1448325     -8.70    0.000     -1.544255    -.9765218
-------------+----------------------------------------------------------------

Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =       0.01
                                                  Prob > chi2     =     0.9082
Log likelihood = -233.72194                       Pseudo R2       =     0.0000

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0093108    .0810645     -0.11    0.909     -.1681944     .1495727
       _cons |   -.6356448      .13193     -4.82    0.000     -.8942228    -.3770668
-------------+----------------------------------------------------------------

Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =      25.69
                                                  Prob > chi2     =     0.0000
Log likelihood = -170.72516                       Pseudo R2       =     0.0700

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5024747    .1391198      3.61    0.000       .229805     .7751444
       _cons |   -1.841993    .1807682    -10.19    0.000     -2.196292    -1.487694
-------------+----------------------------------------------------------------

Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =       1.97
                                                  Prob > chi2     =     0.1602
Log likelihood = -138.91068                       Pseudo R2       =     0.0070

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1290516    .0853896      1.51    0.131     -.0383089     .2964121
       _cons |    -2.03386    .1824844    -11.15    0.000     -2.391523    -1.676197
-------------+----------------------------------------------------------------

Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =      13.99
                                                  Prob > chi2     =     0.0002
Log likelihood = -200.62862                       Pseudo R2       =     0.0337

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .3220323    .1022608      3.15    0.002      .1216048     .5224598
       _cons |   -1.353229    .1520692     -8.90    0.000      -1.65128    -1.055179
-------------+----------------------------------------------------------------

Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =       5.33
                                                  Prob > chi2     =     0.0210
Log likelihood = -169.44834                       Pseudo R2       =     0.0155

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1881347    .0796521      2.36    0.018      .0320195       .34425
       _cons |   -1.691176    .1610367    -10.50    0.000     -2.006802     -1.37555
-------------+----------------------------------------------------------------

Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =       4.26
                                                  Prob > chi2     =     0.0389
Log likelihood = -165.38435                       Pseudo R2       =     0.0127

-------------+----------------------------------------------------------------
    HP2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1706012    .0795148      2.15    0.032      .0147551     .3264474
       _cons |   -1.730143    .1632828    -10.60    0.000     -2.050172    -1.410115
-------------+----------------------------------------------------------------

.
.
. *------- estout code snippt
.
. estout  *,      cells(b(star fmt(%9.3f)) se(par) t p)                ///
>                 stats( bic N, fmt(%9.3f %9.0g) )        ///
>                 legend collabels(none) varlabels(_cons Constant)  ///
>                 mlabels(workw2  homecarew2 socprobsw2 pbfhmw2 sexlifew2 inthobw2 vactnw2) ///
>                                 title("Zero-order regression coefficients" ///
>                  "of reconstructed dose for females in wave 2")

Zero-order regression coefficients of reconstructed dose for females in wave 2
----------------------------------------------------------------------------------------------------------------------------
                   workw2      homecarew2      socprobsw2         pbfhmw2       sexlifew2        inthobw2         vactnw2
----------------------------------------------------------------------------------------------------------------------------
main
avgcumdosew2        0.205*         -0.009           0.502***        0.129           0.322**         0.188*          0.171*
                  (0.083)         (0.081)         (0.139)         (0.085)         (0.102)         (0.080)         (0.080)
                    2.476          -0.115           3.612           1.511           3.149           2.362           2.146
                    0.013           0.909           0.000           0.131           0.002           0.018           0.032
Constant           -1.260***       -0.636***       -1.842***       -2.034***       -1.353***       -1.691***       -1.730***
                  (0.145)         (0.132)         (0.181)         (0.182)         (0.152)         (0.161)         (0.163)
                   -8.702          -4.818         -10.190         -11.145          -8.899         -10.502         -10.596
                    0.000           0.000           0.000           0.000           0.000           0.000           0.000
----------------------------------------------------------------------------------------------------------------------------
bic               418.284         479.233         353.239         289.610         413.046         350.685         342.558
N                     363             363             363             363             363             363             363
----------------------------------------------------------------------------------------------------------------------------
* p<0.05, ** p<0.01, *** p<0.001

.
.
.
.
. // signif zero order relationships in wave 2 are
.
. // female work social life  sex life   interest and hobbies vacation plans
. // no significant male zero order effects
.
.
.
. local w1bf bf1 bf4 bf9 bf10 bf11 bf4m bf15m bf20 bf22 bf30 bf40

. local w2bf bf1 bf4 bf6 bf7 bf14 bf15 bf40

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

.
. *-------------------------------------------------------------------------------
. *  Hypothesis 1   Part 2 wave 2 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 2  H1: General models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****            Hypothesis 1 part2 wave 2  H1: General models            *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    14:58:53  *****
*******************************************************************************
*******************************************************************************


. forvalues j=2/2 {
  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 w2bf 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 nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

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

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

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

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

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

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

note: _Ieduc_6 omitted because of collinearity

Logistic regression                               Number of obs   =        308
                                                  LR chi2(49)     =     125.45
                                                  Prob > chi2     =     0.0000
Log likelihood = -101.11616                       Pseudo R2       =     0.3828

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0178547      .02477      0.72    0.471     -.0306936      .066403
    _Ieduc_2 |    .9615826    1.161557      0.83    0.408     -1.315028     3.238193
    _Ieduc_3 |    .1912036    .4980888      0.38    0.701     -.7850324      1.16744
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    .2718345    .6506078      0.42    0.676     -1.003333     1.547002
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.858647    2.691228     -0.69    0.490     -7.133356     3.416062
      occ2w2 |   -.9190027    2.701749     -0.34    0.734     -6.214333     4.376327
      occ3w2 |   -1.367634    2.744529     -0.50    0.618     -6.746813     4.011544
      occ4w2 |   -1.016435    2.721494     -0.37    0.709     -6.350464     4.317595
      occ5w2 |   -.5999128    2.751196     -0.22    0.827     -5.992157     4.792331
      occ6w2 |   -.5670745    3.449094     -0.16    0.869     -7.327174     6.193025
      occ7w2 |    2.144137    2.835688      0.76    0.450     -3.413709     7.701983
      occ8w2 |   -2.120696    2.805072     -0.76    0.450     -7.618536     3.377144
     marrw21 |    14.38867    1053.846      0.01    0.989     -2051.112     2079.889
     marrw22 |    16.49882    1053.847      0.02    0.988     -2049.002         2082
     marrw23 |    12.83702    1053.846      0.01    0.990     -2052.664     2078.338
     marrw25 |    16.98709    1053.848      0.02    0.987     -2048.516      2082.49
     marrw26 |     10.7478     1053.85      0.01    0.992     -2054.761     2076.257
      inc1w2 |   -1.841061    2.889059     -0.64    0.524     -7.503512      3.82139
      inc2w2 |   -.6970371    2.730495     -0.26    0.799     -6.048709     4.654635
      inc3w2 |    .9384724    2.718417      0.35    0.730     -4.389527     6.266472
      inc4w2 |    -.858635    3.109771     -0.28    0.782     -6.953674     5.236404
     radhlw2 |    .0018692    .0077721      0.24    0.810     -.0133638     .0171022
      havmil |    .0022022    .0068548      0.32    0.748     -.0112329     .0156372
avgcumdosew2 |     .070113    .0753046      0.93    0.352     -.0774813     .2177072
         bf1 |   -.0449847    .0685219     -0.66    0.512      -.179285     .0893157
         bf4 |   -.1461292    .1896969     -0.77    0.441     -.5179284     .2256699
         bf2 |    .0001003     .000156      0.64    0.520     -.0002054      .000406
        bf4m |   -.1398009    .1731245     -0.81    0.419     -.4791186     .1995169
        bf5m |    .0035939    .0017506      2.05    0.040      .0001629     .0070249
        bf7m |    .0007449    .0005463      1.36    0.173     -.0003258     .0018155
         bf8 |   -.0001778    .0000525     -3.39    0.001     -.0002807     -.000075
       bf15m |    .0003329    .0002956      1.13    0.260     -.0002465     .0009123
        bf17 |           0   (omitted)
        bf20 |    .0339605    .0629951      0.54    0.590     -.0895076     .1574286
        bf22 |    .0001355    .0001659      0.82    0.414     -.0001898     .0004607
        bf29 |    .0000158    .0000126      1.26    0.209     -8.86e-06     .0000405
        bf30 |   -.0008498    .0004225     -2.01    0.044      -.001678    -.0000217
        bf40 |    .2709577    .2293641      1.18    0.237     -.1785876      .720503
       deaw2 |   -.1725628    .3614849     -0.48    0.633     -.8810602     .5359345
      dvcew2 |    .1194741    2.327974      0.05    0.959      -4.44327     4.682218
      sepaw2 |           0   (omitted)
      accdw2 |    .5158656    .4604363      1.12    0.263     -.3865729     1.418304
      movew2 |    .5486063    .5239018      1.05    0.295     -.4782225     1.575435
       illw2 |   -.3094309    .3968427     -0.78    0.436     -1.087228     .4683664
     shfamw2 |    .0096065    .0075095      1.28    0.201     -.0051119     .0243249
      shhlw2 |     .025216    .0096203      2.62    0.009      .0063606     .0440714
     shjobw2 |   -.0077587    .0087746     -0.88    0.377     -.0249567     .0094392
    shrelaw2 |   -.0309717    .0089502     -3.46    0.001     -.0485137    -.0134296
     suprtw2 |   -.0064843    .0062583     -1.04    0.300     -.0187504     .0057818
     suchrw2 |    .0039898    .0060514      0.66    0.510     -.0078708     .0158504
    havmilsq |   -3.35e-06    .0000119     -0.28    0.779     -.0000267       .00002
       _cons |   -13.33296    1053.852     -0.01    0.990     -2078.845     2052.179
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        39            14  |         53
     -     |        30           225  |        255
-----------+--------------------------+-----------
   Total   |        69           239  |        308

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   56.52%
Specificity                     Pr( -|~D)   94.14%
Positive predictive value       Pr( D| +)   73.58%
Negative predictive value       Pr(~D| -)   88.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.86%
False - rate for true D         Pr( -| D)   43.48%
False + rate for classified +   Pr(~D| +)   26.42%
False - rate for classified -   Pr( D| -)   11.76%
--------------------------------------------------
Correctly classified                        85.71%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       308
 number of covariate patterns =       308
            Pearson chi2(258) =       291.84
                  Prob > chi2 =         0.0724

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -163.843     Log-Lik Full Model:         -101.116
D(252):                      202.232     LR(49):                      125.453
                                         Prob > LR:                     0.000
McFadden's R2:                 0.383     McFadden's Adj R2:             0.041
Maximum Likelihood R2:         0.335     Cragg & Uhler's R2:            0.511
McKelvey and Zavoina's R2:     0.690     Efron's R2:                    0.405
Variance of y*:               10.621     Variance of error:             3.290
Count R2:                      0.857     Adj Count R2:                  0.362
AIC:                           1.020     AIC*n:                       314.232
BIC:                       -1241.753     BIC':                        155.322
Full main model for HP2work for wave= 2

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

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

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

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

Logistic regression                               Number of obs   =        343
                                                  LR chi2(50)     =     108.12
                                                  Prob > chi2     =     0.0000
Log likelihood = -145.38882                       Pseudo R2       =     0.2710

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0346814    .0173019      2.00    0.045      .0007704     .0685925
    _Ieduc_2 |   -12.41086    627.6909     -0.02    0.984     -1242.662     1217.841
    _Ieduc_3 |   -12.75017    627.6907     -0.02    0.984     -1243.001     1217.501
    _Ieduc_4 |    -11.4477    627.6909     -0.02    0.985     -1241.699     1218.804
    _Ieduc_5 |   -12.87307    627.6909     -0.02    0.984     -1243.125     1217.378
    _Ieduc_6 |   -12.46967    627.6908     -0.02    0.984     -1242.721     1217.782
    _Ieduc_7 |   -13.03665    627.6932     -0.02    0.983     -1243.293     1217.219
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.438425    1.492752     -0.96    0.335     -4.364164     1.487314
      occ2w2 |   -1.219105    1.521371     -0.80    0.423     -4.200936     1.762727
      occ3w2 |   -.4904819    1.510651     -0.32    0.745     -3.451303     2.470339
      occ4w2 |   -.7947689    1.589999     -0.50    0.617     -3.911109     2.321571
      occ5w2 |   -1.879935    1.884007     -1.00    0.318     -5.572521     1.812651
      occ6w2 |    -1.41539    1.738012     -0.81    0.415      -4.82183     1.991051
      occ7w2 |   -.4577922    1.461285     -0.31    0.754     -3.321858     2.406274
      occ8w2 |    .0350208    1.713285      0.02    0.984     -3.322957     3.392998
     marrw21 |   -1.099109     1.06403     -1.03    0.302      -3.18457     .9863517
     marrw22 |   -.6975171     1.30484     -0.53    0.593     -3.254956     1.859922
     marrw23 |   -.3956567    .7323121     -0.54    0.589     -1.830962     1.039649
     marrw25 |   -.7188967    1.177006     -0.61    0.541     -3.025787     1.587994
     marrw26 |           0   (omitted)
      inc1w2 |   -.0941374    1.513476     -0.06    0.950     -3.060495     2.872221
      inc2w2 |     .386998     1.46305      0.26    0.791     -2.480528     3.254524
      inc3w2 |    1.121465    1.474278      0.76    0.447     -1.768066     4.010997
      inc4w2 |   -.1060071     1.96548     -0.05    0.957     -3.958277     3.746263
     radhlw2 |    .0065443     .006673      0.98    0.327     -.0065345     .0196232
      havmil |   -.0029953    .0026107     -1.15    0.251     -.0081121     .0021215
avgcumdosew2 |    .0909294    .1016445      0.89    0.371     -.1082903      .290149
         bf1 |    .0126789    .0317569      0.40    0.690     -.0495634     .0749212
         bf4 |   -.5949349    .2433538     -2.44    0.014       -1.0719    -.1179702
         bf2 |    .0000735    .0001079      0.68    0.496      -.000138     .0002851
        bf4m |    .4176215    .2303793      1.81    0.070     -.0339136     .8691567
        bf5m |    .0024297    .0013344      1.82    0.069     -.0001856     .0050451
        bf7m |    .0006992     .000527      1.33    0.185     -.0003337     .0017321
         bf8 |   -.0000458    .0000327     -1.40    0.161     -.0001099     .0000182
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0183297    .0268984     -0.68    0.496     -.0710496     .0343903
        bf22 |   -.0000828    .0001199     -0.69    0.490     -.0003178     .0001523
        bf29 |    .0000183    .0000373      0.49    0.624     -.0000549     .0000915
        bf30 |   -.0001261    .0002961     -0.43    0.670     -.0007064     .0004542
        bf40 |    .1798311    .1314097      1.37    0.171     -.0777271     .4373893
       deaw2 |    .2386669    .2047617      1.17    0.244     -.1626586     .6399924
      dvcew2 |   -.6260314    1.520804     -0.41    0.681     -3.606752     2.354689
      sepaw2 |           0   (omitted)
      accdw2 |    .6391808    .5174116      1.24    0.217     -.3749273     1.653289
      movew2 |   -.2794343    .5405557     -0.52    0.605     -1.338904     .7800355
       illw2 |    .0571776    .1835422      0.31    0.755     -.3025585     .4169137
     shfamw2 |    -.007536    .0064071     -1.18    0.240     -.0200936     .0050216
      shhlw2 |    .0061348    .0064298      0.95    0.340     -.0064673     .0187369
     shjobw2 |   -.0013978     .005787     -0.24    0.809     -.0127401     .0099444
    shrelaw2 |   -.0084778    .0068136     -1.24    0.213     -.0218322     .0048765
     suprtw2 |   -.0040427    .0050205     -0.81    0.421     -.0138827     .0057973
     suchrw2 |    .0071509    .0055885      1.28    0.201     -.0038025     .0181042
    havmilsq |    5.93e-07    1.54e-06      0.38    0.701     -2.43e-06     3.62e-06
       _cons |    8.163054    627.6961      0.01    0.990     -1222.099     1238.425
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        46            16  |         62
     -     |        46           235  |        281
-----------+--------------------------+-----------
   Total   |        92           251  |        343

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   50.00%
Specificity                     Pr( -|~D)   93.63%
Positive predictive value       Pr( D| +)   74.19%
Negative predictive value       Pr(~D| -)   83.63%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.37%
False - rate for true D         Pr( -| D)   50.00%
False + rate for classified +   Pr(~D| +)   25.81%
False - rate for classified -   Pr( D| -)   16.37%
--------------------------------------------------
Correctly classified                        81.92%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       343
 number of covariate patterns =       343
            Pearson chi2(292) =       491.86
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -199.448     Log-Lik Full Model:         -145.389
D(287):                      290.778     LR(50):                      108.119
                                         Prob > LR:                     0.000
McFadden's R2:                 0.271     McFadden's Adj R2:            -0.010
Maximum Likelihood R2:         0.270     Cragg & Uhler's R2:            0.393
McKelvey and Zavoina's R2:     0.502     Efron's R2:                    0.313
Variance of y*:                6.601     Variance of error:             3.290
Count R2:                      0.819     Adj Count R2:                  0.326
AIC:                           1.174     AIC*n:                       402.778
BIC:                       -1384.651     BIC':                        183.768
Full main model for HP2hmcare for wave= 2

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

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

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

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

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

note: _Ieduc_7 omitted because of collinearity

Logistic regression                               Number of obs   =        270
                                                  LR chi2(49)     =     112.39
                                                  Prob > chi2     =     0.0000
Log likelihood = -98.319474                       Pseudo R2       =     0.3637

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0339056    .0231493      1.46    0.143     -.0114661     .0792774
    _Ieduc_2 |   -4.046801     2.06481     -1.96    0.050     -8.093754     .0001521
    _Ieduc_3 |   -2.332961    1.654719     -1.41    0.159     -5.576151     .9102284
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -2.109138    1.662617     -1.27    0.205     -5.367807     1.149531
    _Ieduc_6 |   -2.575578    1.598895     -1.61    0.107     -5.709355     .5581988
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |    .2791915    3.076664      0.09    0.928     -5.750959     6.309342
      occ2w2 |   -.2043325    3.082144     -0.07    0.947     -6.245223     5.836559
      occ3w2 |    .5280791    3.097215      0.17    0.865     -5.542352      6.59851
      occ4w2 |    .3530379    3.103258      0.11    0.909     -5.729235     6.435311
      occ5w2 |    1.030726    3.128223      0.33    0.742     -5.100479     7.161931
      occ6w2 |    1.834194    3.454783      0.53    0.595     -4.937056     8.605444
      occ7w2 |    .6310877    3.205439      0.20    0.844     -5.651457     6.913633
      occ8w2 |           0   (omitted)
     marrw21 |   -1.774375    1.681557     -1.06    0.291     -5.070167     1.521417
     marrw22 |   -3.603201    2.051956     -1.76    0.079     -7.624961     .4185589
     marrw23 |   -3.822298    1.717545     -2.23    0.026     -7.188624    -.4559723
     marrw25 |   -.1941937    2.536946     -0.08    0.939     -5.166517      4.77813
     marrw26 |   -3.213845    2.602626     -1.23    0.217     -8.314899     1.887208
      inc1w2 |    2.821191    3.187221      0.89    0.376     -3.425647     9.068029
      inc2w2 |    2.680447    3.109489      0.86    0.389      -3.41404     8.774935
      inc3w2 |      2.9859    3.107015      0.96    0.337     -3.103737     9.075536
      inc4w2 |    1.060877    3.414563      0.31    0.756     -5.631544     7.753298
     radhlw2 |    .0009802    .0078741      0.12    0.901     -.0144527     .0164132
      havmil |    .0033106     .008219      0.40    0.687     -.0127982     .0194195
avgcumdosew2 |   -.0408898    .0892564     -0.46    0.647     -.2158292     .1340496
         bf1 |   -.0224294    .0411105     -0.55    0.585     -.1030045     .0581457
         bf4 |   -.1579765    .2337949     -0.68    0.499      -.616206      .300253
         bf2 |    .0000992    .0001626      0.61    0.542     -.0002196      .000418
        bf4m |   -.1739281    .2154639     -0.81    0.420     -.5962296     .2483734
        bf5m |    .0006314    .0017487      0.36    0.718      -.002796     .0040589
        bf7m |    .0005115     .000594      0.86    0.389     -.0006527     .0016757
         bf8 |   -.0000403    .0000473     -0.85    0.394     -.0001331     .0000525
       bf15m |   -.0001301    .0003714     -0.35    0.726      -.000858     .0005979
        bf17 |           0   (omitted)
        bf20 |    .0027387    .0345917      0.08    0.937     -.0650597     .0705372
        bf22 |   -.0000529    .0001896     -0.28    0.780     -.0004245     .0003187
        bf29 |    2.63e-06    .0000221      0.12    0.905     -.0000407     .0000459
        bf30 |   -.0002608    .0004218     -0.62    0.536     -.0010875     .0005659
        bf40 |    .3296594    .2457937      1.34    0.180     -.1520874     .8114062
       deaw2 |    .0069355    .3395872      0.02    0.984     -.6586432     .6725142
      dvcew2 |   -.8346564    3.597118     -0.23    0.817     -7.884878     6.215565
      sepaw2 |           0   (omitted)
      accdw2 |    .1481124    .4606844      0.32    0.748     -.7548124     1.051037
      movew2 |    .2192344    .5237343      0.42    0.676      -.807266     1.245735
       illw2 |   -.2794365    .3922624     -0.71    0.476     -1.048257     .4893838
     shfamw2 |   -.0130582    .0087013     -1.50    0.133     -.0301125     .0039961
      shhlw2 |   -.0041104    .0095817     -0.43    0.668     -.0228901     .0146694
     shjobw2 |    .0000993     .009716      0.01    0.992     -.0189438     .0191423
    shrelaw2 |    .0041598    .0074695      0.56    0.578     -.0104802     .0187997
     suprtw2 |    .0129457    .0070817      1.83    0.068     -.0009342     .0268256
     suchrw2 |   -.0024472    .0063512     -0.39    0.700     -.0148953      .010001
    havmilsq |   -8.45e-06     .000015     -0.56    0.573     -.0000379      .000021
       _cons |    3.897935    3.960914      0.98    0.325     -3.865314     11.66118
-------------+----------------------------------------------------------------

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        41            17  |         58
     -     |        29           183  |        212
-----------+--------------------------+-----------
   Total   |        70           200  |        270

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   58.57%
Specificity                     Pr( -|~D)   91.50%
Positive predictive value       Pr( D| +)   70.69%
Negative predictive value       Pr(~D| -)   86.32%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.50%
False - rate for true D         Pr( -| D)   41.43%
False + rate for classified +   Pr(~D| +)   29.31%
False - rate for classified -   Pr( D| -)   13.68%
--------------------------------------------------
Correctly classified                        82.96%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       270
 number of covariate patterns =       270
            Pearson chi2(220) =       227.64
                  Prob > chi2 =         0.3476

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -154.516     Log-Lik Full Model:          -98.319
D(214):                      196.639     LR(49):                      112.393
                                         Prob > LR:                     0.000
McFadden's R2:                 0.364     McFadden's Adj R2:             0.001
Maximum Likelihood R2:         0.340     Cragg & Uhler's R2:            0.500
McKelvey and Zavoina's R2:     0.594     Efron's R2:                    0.390
Variance of y*:                8.112     Variance of error:             3.290
Count R2:                      0.830     Adj Count R2:                  0.343
AIC:                           1.143     AIC*n:                       308.639
BIC:                       -1001.423     BIC':                        161.930
Full main model for HP2hmcare for wave= 2

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

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

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

Logistic regression                               Number of obs   =        358
                                                  LR chi2(51)     =     177.21
                                                  Prob > chi2     =     0.0000
Log likelihood = -139.72732                       Pseudo R2       =     0.3881

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0689184    .0184884      3.73    0.000      .0326818      .105155
    _Ieduc_2 |   -17.33023    2.370203     -7.31    0.000     -21.97575    -12.68472
    _Ieduc_3 |   -17.85228    2.271622     -7.86    0.000     -22.30458    -13.39998
    _Ieduc_4 |   -16.22367    2.322199     -6.99    0.000      -20.7751    -11.67225
    _Ieduc_5 |   -17.51753    2.330541     -7.52    0.000      -22.0853    -12.94975
    _Ieduc_6 |   -18.46499    2.320848     -7.96    0.000     -23.01377    -13.91621
    _Ieduc_7 |   -17.72595    3.034199     -5.84    0.000     -23.67287    -11.77903
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -2.066459     1.51974     -1.36    0.174     -5.045095     .9121779
      occ2w2 |   -2.243078    1.553998     -1.44    0.149     -5.288858     .8027026
      occ3w2 |    -1.29392    1.568233     -0.83    0.409     -4.367601      1.77976
      occ4w2 |   -3.169244    1.685231     -1.88    0.060     -6.472236     .1337472
      occ5w2 |   -4.174961    1.966604     -2.12    0.034     -8.029433    -.3204881
      occ6w2 |   -5.016961    2.033875     -2.47    0.014     -9.003283    -1.030639
      occ7w2 |   -1.338521    1.557092     -0.86    0.390     -4.390365     1.713323
      occ8w2 |    .0102882    1.823109      0.01    0.995      -3.56294     3.583517
     marrw21 |   -.4364242    1.195764     -0.36    0.715     -2.780078     1.907229
     marrw22 |    .2779117    1.516808      0.18    0.855     -2.694977       3.2508
     marrw23 |    1.982364    .8407589      2.36    0.018      .3345069     3.630221
     marrw25 |    .7265557    1.247315      0.58    0.560     -1.718137     3.171248
     marrw26 |           0   (omitted)
      inc1w2 |      2.1918    1.615301      1.36    0.175     -.9741308     5.357731
      inc2w2 |    3.722591    1.551917      2.40    0.016      .6808895     6.764292
      inc3w2 |    3.205652    1.561296      2.05    0.040      .1455678     6.265737
      inc4w2 |    3.577016    1.917029      1.87    0.062     -.1802924     7.334325
     radhlw2 |   -.0017814    .0069396     -0.26    0.797     -.0153829       .01182
      havmil |    .0004744    .0029523      0.16    0.872      -.005312     .0062609
avgcumdosew2 |    -.232422    .1275125     -1.82    0.068     -.4823419      .017498
         bf1 |   -.0155252    .0283044     -0.55    0.583     -.0710008     .0399503
         bf4 |   -.6331543    .2104116     -3.01    0.003     -1.045553    -.2207551
         bf2 |    .0002047    .0001148      1.78    0.075     -.0000203     .0004296
        bf4m |     .369727    .1901433      1.94    0.052     -.0029469      .742401
        bf5m |   -.0009929     .001436     -0.69    0.489     -.0038073     .0018215
        bf7m |    .0003779    .0005084      0.74    0.457     -.0006186     .0013744
         bf8 |   -5.36e-07    .0000355     -0.02    0.988     -.0000702     .0000691
       bf15m |   -.0123361     .496536     -0.02    0.980     -.9855287     .9608566
        bf17 |    .0006265    .0248268      0.03    0.980     -.0480332     .0492861
        bf20 |   -.0134138    .0231788     -0.58    0.563     -.0588434     .0320158
        bf22 |   -.0000815    .0001207     -0.67    0.500      -.000318     .0001551
        bf29 |           0   (omitted)
        bf30 |   -.0000914    .0002999     -0.30    0.760     -.0006791     .0004963
        bf40 |    .1554702    .1284498      1.21    0.226     -.0962868     .4072271
       deaw2 |    .7476902    .2584678      2.89    0.004      .2411026     1.254278
      dvcew2 |    1.232183    1.276036      0.97    0.334     -1.268802     3.733168
      sepaw2 |    -1.82805    1.829743     -1.00    0.318      -5.41428      1.75818
      accdw2 |   -.7440138    .5452818     -1.36    0.172     -1.812746     .3247189
      movew2 |   -.5229006    .4948092     -1.06    0.291     -1.492709     .4469077
       illw2 |   -.1315546    .1759029     -0.75    0.455     -.4763179     .2132087
     shfamw2 |   -.0038201    .0062872     -0.61    0.543     -.0161429     .0085027
      shhlw2 |   -.0093005    .0066582     -1.40    0.162     -.0223502     .0037493
     shjobw2 |    .0003285     .005919      0.06    0.956     -.0112724     .0119295
    shrelaw2 |   -.0125743    .0072115     -1.74    0.081     -.0267086       .00156
     suprtw2 |   -.0093988    .0049637     -1.89    0.058     -.0191275     .0003299
     suchrw2 |    .0039959    .0055359      0.72    0.470     -.0068542     .0148461
    havmilsq |   -6.92e-07    2.48e-06     -0.28    0.780     -5.56e-06     4.18e-06
       _cons |    12.62346           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        86            29  |        115
     -     |        34           209  |        243
-----------+--------------------------+-----------
   Total   |       120           238  |        358

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   71.67%
Specificity                     Pr( -|~D)   87.82%
Positive predictive value       Pr( D| +)   74.78%
Negative predictive value       Pr(~D| -)   86.01%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   12.18%
False - rate for true D         Pr( -| D)   28.33%
False + rate for classified +   Pr(~D| +)   25.22%
False - rate for classified -   Pr( D| -)   13.99%
--------------------------------------------------
Correctly classified                        82.40%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       358
 number of covariate patterns =       358
            Pearson chi2(305) =       382.80
                  Prob > chi2 =         0.0016

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -228.331     Log-Lik Full Model:         -139.727
D(302):                      279.455     LR(51):                      177.208
                                         Prob > LR:                     0.000
McFadden's R2:                 0.388     McFadden's Adj R2:             0.143
Maximum Likelihood R2:         0.390     Cragg & Uhler's R2:            0.542
McKelvey and Zavoina's R2:     0.930     Efron's R2:                    0.437
Variance of y*:               47.071     Variance of error:             3.290
Count R2:                      0.824     Adj Count R2:                  0.475
AIC:                           1.093     AIC*n:                       391.455
BIC:                       -1496.466     BIC':                        122.699
Full main model for HP2probsoc for wave= 2

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

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

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

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

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

note: occ7w2 != 0 predicts failure perfectly
      occ7w2 dropped and 14 obs not used

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

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

note: inc4w2 != 0 predicts failure perfectly
      inc4w2 dropped and 10 obs not used

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

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

note: marrw25 != 0 predicts success perfectly
      marrw25 dropped and 1 obs not used

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

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

Logistic regression                               Number of obs   =        217
                                                  LR chi2(40)     =     113.21
                                                  Prob > chi2     =     0.0000
Log likelihood = -47.096671                       Pseudo R2       =     0.5459

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1159429    .0419803      2.76    0.006      .0336631     .1982228
    _Ieduc_2 |   -.0479004    1.407174     -0.03    0.973      -2.80591     2.710109
    _Ieduc_3 |   -.8284731    .7880615     -1.05    0.293     -2.373045      .716099
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    .2454375    1.100079      0.22    0.823     -1.910677     2.401552
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |     -1.3725    16.54078     -0.08    0.934     -33.79183     31.04683
      occ2w2 |   -1.244674    16.53791     -0.08    0.940     -33.65838     31.16903
      occ3w2 |   -.7835828    16.55903     -0.05    0.962     -33.23868     31.67152
      occ4w2 |   -3.862736    16.57719     -0.23    0.816     -36.35344     28.62797
      occ5w2 |   -2.775301    16.58962     -0.17    0.867     -35.29036     29.73976
      occ6w2 |           0   (omitted)
      occ7w2 |           0   (omitted)
      occ8w2 |           0   (omitted)
     marrw21 |    12.58162    1075.856      0.01    0.991     -2096.057      2121.22
     marrw22 |           0   (omitted)
     marrw23 |    10.03646    1075.856      0.01    0.993     -2098.602     2118.675
     marrw25 |           0   (omitted)
     marrw26 |           0   (omitted)
      inc1w2 |    .0757099    16.62358      0.00    0.996     -32.50591     32.65733
      inc2w2 |    2.619578    16.55703      0.16    0.874     -29.83159     35.07075
      inc3w2 |     4.14916      16.572      0.25    0.802     -28.33137     36.62969
      inc4w2 |           0   (omitted)
     radhlw2 |    .0130005    .0142344      0.91    0.361     -.0148985     .0408995
      havmil |    -.002818    .0090337     -0.31    0.755     -.0205238     .0148877
avgcumdosew2 |    .0114306    .0823526      0.14    0.890     -.1499776     .1728387
         bf1 |    .0037783    .0642153      0.06    0.953     -.1220814      .129638
         bf4 |     .016836    .3033169      0.06    0.956     -.5776542     .6113261
         bf2 |    .0006302    .0003126      2.02    0.044      .0000175     .0012428
        bf4m |   -.5319968    .2823116     -1.88    0.060     -1.085317     .0213237
        bf5m |    .0058806    .0028091      2.09    0.036      .0003749     .0113862
        bf7m |    .0013216    .0011466      1.15    0.249     -.0009257     .0035688
         bf8 |   -.0001829    .0000911     -2.01    0.045     -.0003616    -4.31e-06
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0241214    .0536769     -0.45    0.653     -.1293262     .0810833
        bf22 |    .0004188    .0002855      1.47    0.142     -.0001407     .0009783
        bf29 |    -.000073    .0001017     -0.72    0.473     -.0002723     .0001263
        bf30 |   -.0016782    .0007996     -2.10    0.036     -.0032455     -.000111
        bf40 |   -.1773534    .3453449     -0.51    0.608      -.854217     .4995102
       deaw2 |   -.7039739    .7523846     -0.94    0.349     -2.178621     .7706728
      dvcew2 |           0   (omitted)
      sepaw2 |           0   (omitted)
      accdw2 |   -.0469037    .8655378     -0.05    0.957     -1.743327     1.649519
      movew2 |    1.585081    .8835966      1.79    0.073     -.1467362     3.316899
       illw2 |   -.6496621    .6161215     -1.05    0.292     -1.857238     .5579138
     shfamw2 |   -.0160373    .0116025     -1.38    0.167     -.0387778     .0067033
      shhlw2 |   -.0105176    .0138341     -0.76    0.447     -.0376321     .0165968
     shjobw2 |    .0250231    .0129193      1.94    0.053     -.0002983     .0503445
    shrelaw2 |   -.0217826    .0114409     -1.90    0.057     -.0442063     .0006412
     suprtw2 |    .0083099    .0108445      0.77    0.444      -.012945     .0295648
     suchrw2 |    .0212997    .0111718      1.91    0.057     -.0005966     .0431959
    havmilsq |    6.25e-06    .0000101      0.62    0.537     -.0000136     .0000261
       _cons |   -13.61182    1075.864     -0.01    0.990     -2122.266     2095.042
-------------+----------------------------------------------------------------


Note: 2 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        26             4  |         30
     -     |        14           173  |        187
-----------+--------------------------+-----------
   Total   |        40           177  |        217

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   65.00%
Specificity                     Pr( -|~D)   97.74%
Positive predictive value       Pr( D| +)   86.67%
Negative predictive value       Pr(~D| -)   92.51%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.26%
False - rate for true D         Pr( -| D)   35.00%
False + rate for classified +   Pr(~D| +)   13.33%
False - rate for classified -   Pr( D| -)    7.49%
--------------------------------------------------
Correctly classified                        91.71%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       217
 number of covariate patterns =       217
            Pearson chi2(176) =       158.28
                  Prob > chi2 =         0.8270

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -103.704     Log-Lik Full Model:          -47.097
D(161):                       94.193     LR(40):                      113.215
                                         Prob > LR:                     0.000
McFadden's R2:                 0.546     McFadden's Adj R2:             0.006
Maximum Likelihood R2:         0.407     Cragg & Uhler's R2:            0.660
McKelvey and Zavoina's R2:     0.840     Efron's R2:                    0.562
Variance of y*:               20.586     Variance of error:             3.290
Count R2:                      0.917     Adj Count R2:                  0.550
AIC:                           0.950     AIC*n:                       206.193
BIC:                        -771.970     BIC':                        101.981
Full main model for HP2probsoc for wave= 2

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

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

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

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

Logistic regression                               Number of obs   =        341
                                                  LR chi2(50)     =     174.30
                                                  Prob > chi2     =     0.0000
Log likelihood = -89.934458                       Pseudo R2       =     0.4921

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1034919    .0270041      3.83    0.000      .0505648     .1564191
    _Ieduc_2 |   -13.17654    1236.407     -0.01    0.991      -2436.49     2410.137
    _Ieduc_3 |   -13.38577    1236.407     -0.01    0.991     -2436.699     2409.928
    _Ieduc_4 |   -12.54323    1236.407     -0.01    0.992     -2435.857     2410.771
    _Ieduc_5 |   -12.47221    1236.407     -0.01    0.992     -2435.786     2410.842
    _Ieduc_6 |   -13.80248    1236.407     -0.01    0.991     -2437.116     2409.511
    _Ieduc_7 |   -15.17121    1236.497     -0.01    0.990     -2438.662     2408.319
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.147886    3.571925     -0.32    0.748      -8.14873     5.852957
      occ2w2 |   -1.271517    3.611241     -0.35    0.725     -8.349419     5.806385
      occ3w2 |    .2117582    3.586153      0.06    0.953     -6.816973      7.24049
      occ4w2 |   -1.534382    3.689834     -0.42    0.678     -8.766324      5.69756
      occ5w2 |   -2.414751      3.8284     -0.63    0.528     -9.918277     5.088775
      occ6w2 |           0   (omitted)
      occ7w2 |   -.6787306    3.585162     -0.19    0.850      -7.70552     6.348058
      occ8w2 |    2.909649    3.844529      0.76    0.449     -4.625489     10.44479
     marrw21 |   -1.181403    1.729099     -0.68    0.494     -4.570375     2.207569
     marrw22 |    1.066113    1.762045      0.61    0.545     -2.387432     4.519658
     marrw23 |    .6150888    .9283649      0.66    0.508     -1.204473     2.434651
     marrw25 |    .4424041    1.311023      0.34    0.736     -2.127154     3.011962
     marrw26 |           0   (omitted)
      inc1w2 |     .302891    3.591795      0.08    0.933     -6.736898      7.34268
      inc2w2 |    1.142371    3.560505      0.32    0.748     -5.836091     8.120833
      inc3w2 |    .8314334    3.569583      0.23    0.816     -6.164821     7.827688
      inc4w2 |    .0290561    3.848853      0.01    0.994     -7.514557      7.57267
     radhlw2 |    .0111407    .0096438      1.16    0.248     -.0077607     .0300422
      havmil |    .0005515    .0077361      0.07    0.943     -.0146109     .0157139
avgcumdosew2 |     .546822      .23001      2.38    0.017      .0960107     .9976333
         bf1 |    .0275412    .0390831      0.70    0.481     -.0490602     .1041427
         bf4 |   -.4078914    .2433269     -1.68    0.094     -.8848033     .0690205
         bf2 |    .0001427    .0001416      1.01    0.314     -.0001349     .0004204
        bf4m |    .1372093    .2260724      0.61    0.544     -.3058844     .5803031
        bf5m |   -.0016005    .0026021     -0.62    0.538     -.0067005     .0034995
        bf7m |    .0002743    .0007319      0.37    0.708     -.0011601     .0017087
         bf8 |    .0000233    .0000548      0.42    0.671     -.0000841     .0001306
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |     -.04615    .0319322     -1.45    0.148     -.1087361      .016436
        bf22 |    9.68e-06    .0001672      0.06    0.954      -.000318     .0003374
        bf29 |   -.0000266    .0000488     -0.54    0.586     -.0001221      .000069
        bf30 |    .0001087    .0003798      0.29    0.775     -.0006357     .0008531
        bf40 |   -.0077229    .1716746     -0.04    0.964      -.344199     .3287532
       deaw2 |   -.0328171    .2515674     -0.13    0.896     -.5258803      .460246
      dvcew2 |    1.645199    1.729548      0.95    0.341     -1.744652      5.03505
      sepaw2 |    -.787699    2.185185     -0.36    0.718     -5.070584     3.495186
      accdw2 |   -.7482691    .7741464     -0.97    0.334     -2.265568     .7690299
      movew2 |   -.1983887    .9882329     -0.20    0.841      -2.13529     1.738512
       illw2 |     .037099    .2627647      0.14    0.888     -.4779104     .5521084
     shfamw2 |   -.0189411    .0086476     -2.19    0.028       -.03589    -.0019922
      shhlw2 |    .0013266    .0086367      0.15    0.878     -.0156011     .0182542
     shjobw2 |   -.0022444    .0078272     -0.29    0.774     -.0175855     .0130966
    shrelaw2 |   -.0057107    .0089259     -0.64    0.522     -.0232051     .0117837
     suprtw2 |    .0019185    .0068705      0.28    0.780     -.0115475     .0153845
     suchrw2 |   -.0030114    .0077253     -0.39    0.697     -.0181526     .0121298
    havmilsq |   -5.64e-06    .0000161     -0.35    0.725     -.0000371     .0000258
       _cons |    8.438379    1236.411      0.01    0.995     -2414.883      2431.76
-------------+----------------------------------------------------------------


Note: 2 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        52            13  |         65
     -     |        21           255  |        276
-----------+--------------------------+-----------
   Total   |        73           268  |        341

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   71.23%
Specificity                     Pr( -|~D)   95.15%
Positive predictive value       Pr( D| +)   80.00%
Negative predictive value       Pr(~D| -)   92.39%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.85%
False - rate for true D         Pr( -| D)   28.77%
False + rate for classified +   Pr(~D| +)   20.00%
False - rate for classified -   Pr( D| -)    7.61%
--------------------------------------------------
Correctly classified                        90.03%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       341
 number of covariate patterns =       341
            Pearson chi2(290) =       351.64
                  Prob > chi2 =         0.0077

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -177.084     Log-Lik Full Model:          -89.934
D(285):                      179.869     LR(50):                      174.299
                                         Prob > LR:                     0.000
McFadden's R2:                 0.492     McFadden's Adj R2:             0.176
Maximum Likelihood R2:         0.400     Cragg & Uhler's R2:            0.619
McKelvey and Zavoina's R2:     0.858     Efron's R2:                    0.531
Variance of y*:               23.160     Variance of error:             3.290
Count R2:                      0.900     Adj Count R2:                  0.534
AIC:                           0.856     AIC*n:                       291.869
BIC:                       -1482.218     BIC':                        117.295
Full main model for HP2pbfhm for wave= 2

chunk 2 H1 test:Gender= 1  model Wave =  2 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 13 obs not used

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

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

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

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

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

note: marrw26 != 0 predicts failure perfectly
      marrw26 dropped and 3 obs not used

note: inc1w2 != 0 predicts failure perfectly
      inc1w2 dropped and 13 obs not used

note: inc4w2 != 0 predicts failure perfectly
      inc4w2 dropped and 10 obs not used

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

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

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

note: marrw25 != 0 predicts success perfectly
      marrw25 dropped and 1 obs not used

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

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

Logistic regression                               Number of obs   =        188
                                                  LR chi2(37)     =      54.88
                                                  Prob > chi2     =     0.0294
Log likelihood = -38.373257                       Pseudo R2       =     0.4169

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0444593    .0428518      1.04    0.299     -.0395286     .1284472
    _Ieduc_2 |           0   (omitted)
    _Ieduc_3 |   -1.216759    1.079528     -1.13    0.260     -3.332594     .8990769
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.8969887    1.218662     -0.74    0.462     -3.285522     1.491544
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -.1675434    7.199614     -0.02    0.981     -14.27853     13.94344
      occ2w2 |   -.7756164    7.209263     -0.11    0.914     -14.90551     13.35428
      occ3w2 |     1.02351    7.214423      0.14    0.887      -13.1165     15.16352
      occ4w2 |    1.180132    7.249556      0.16    0.871     -13.02874       15.389
      occ5w2 |           0   (omitted)
      occ6w2 |           0   (omitted)
      occ7w2 |   -1.331976    7.411247     -0.18    0.857     -15.85775      13.1938
      occ8w2 |           0   (omitted)
     marrw21 |    11.23886    2191.219      0.01    0.996     -4283.471     4305.948
     marrw22 |           0   (omitted)
     marrw23 |    11.19426    2191.219      0.01    0.996     -4283.515     4305.904
     marrw25 |           0   (omitted)
     marrw26 |           0   (omitted)
      inc1w2 |           0   (omitted)
      inc2w2 |    1.591635    7.274442      0.22    0.827     -12.66601     15.84928
      inc3w2 |    2.001132    7.228455      0.28    0.782     -12.16638     16.16864
      inc4w2 |           0   (omitted)
     radhlw2 |    .0450707    .0190833      2.36    0.018      .0076681     .0824733
      havmil |   -.0149705    .0133639     -1.12    0.263     -.0411632     .0112223
avgcumdosew2 |   -.0788123    .3549706     -0.22    0.824     -.7745419     .6169173
         bf1 |   -.1607809    .1318246     -1.22    0.223     -.4191523     .0975906
         bf4 |   -.2790034    .3019344     -0.92    0.355     -.8707839     .3127772
         bf2 |    .0006459    .0003574      1.81    0.071     -.0000546     .0013465
        bf4m |    .1083622     .270079      0.40    0.688     -.4209828     .6377072
        bf5m |    .0014293     .004266      0.34    0.738     -.0069319     .0097905
        bf7m |    .0014124    .0012328      1.15    0.252     -.0010038     .0038286
         bf8 |   -.0000455    .0000891     -0.51    0.610     -.0002201     .0001291
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0990519    .1141451      0.87    0.386     -.1246683     .3227721
        bf22 |    .0000324    .0003377      0.10    0.924     -.0006295     .0006943
        bf29 |           0   (omitted)
        bf30 |   -.0005162    .0007544     -0.68    0.494     -.0019949     .0009625
        bf40 |   -.3427693    .4881552     -0.70    0.483     -1.299536     .6139973
       deaw2 |    1.277518    .6289072      2.03    0.042      .0448826     2.510153
      dvcew2 |           0   (omitted)
      sepaw2 |           0   (omitted)
      accdw2 |   -.8756107    1.266217     -0.69    0.489      -3.35735     1.606128
      movew2 |    .2828439    1.570553      0.18    0.857     -2.795383      3.36107
       illw2 |    1.383819    .6666357      2.08    0.038      .0772372     2.690401
     shfamw2 |   -.0048065    .0139543     -0.34    0.731     -.0321564     .0225433
      shhlw2 |   -.0126567    .0158426     -0.80    0.424     -.0437076     .0183942
     shjobw2 |    .0113436    .0152838      0.74    0.458      -.018612     .0412992
    shrelaw2 |   -.0154518    .0162014     -0.95    0.340      -.047206     .0163025
     suprtw2 |   -.0271504    .0129849     -2.09    0.037     -.0526003    -.0017006
     suchrw2 |    .0166833    .0117501      1.42    0.156     -.0063465      .039713
    havmilsq |    .0000156    .0000131      1.19    0.234       -.00001     .0000412
       _cons |   -21.58182    2191.227     -0.01    0.992     -4316.307     4273.143
-------------+----------------------------------------------------------------

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         8             4  |         12
     -     |        13           163  |        176
-----------+--------------------------+-----------
   Total   |        21           167  |        188

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   38.10%
Specificity                     Pr( -|~D)   97.60%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   92.61%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.40%
False - rate for true D         Pr( -| D)   61.90%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)    7.39%
--------------------------------------------------
Correctly classified                        90.96%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       188
 number of covariate patterns =       188
            Pearson chi2(150) =       103.39
                  Prob > chi2 =         0.9986

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:      -65.811     Log-Lik Full Model:          -38.373
D(132):                       76.747     LR(37):                       54.876
                                         Prob > LR:                     0.029
McFadden's R2:                 0.417     McFadden's Adj R2:            -0.434
Maximum Likelihood R2:         0.253     Cragg & Uhler's R2:            0.503
McKelvey and Zavoina's R2:     0.754     Efron's R2:                    0.356
Variance of y*:               13.351     Variance of error:             3.290
Count R2:                      0.910     Adj Count R2:                  0.190
AIC:                           1.004     AIC*n:                       188.747
BIC:                        -614.464     BIC':                        138.873
Full main model for HP2pbfhm for wave= 2

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

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

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

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

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

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

note: movew2 != 0 predicts failure perfectly
      movew2 dropped and 37 obs not used

note: _Ieduc_8 omitted because of collinearity
note: marrw26 omitted because of collinearity
note: bf17 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        282
                                                  LR chi2(45)     =     115.64
                                                  Prob > chi2     =     0.0000
Log likelihood = -69.237721                       Pseudo R2       =     0.4551

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0573216    .0276334      2.07    0.038      .0031611     .1114822
    _Ieduc_2 |    24.79783    5.419934      4.58    0.000      14.17495      35.4207
    _Ieduc_3 |    25.40648    5.405293      4.70    0.000       14.8123     36.00065
    _Ieduc_4 |     26.0435    5.498915      4.74    0.000      15.26582     36.82117
    _Ieduc_5 |    25.99152    5.477282      4.75    0.000      15.25625      36.7268
    _Ieduc_6 |    25.22458    5.399044      4.67    0.000      14.64265     35.80651
    _Ieduc_7 |    24.91381           .         .        .             .            .
    _Ieduc_8 |           0   (omitted)
      occ1w2 |    .1268694    2.741862      0.05    0.963     -5.247082      5.50082
      occ2w2 |   -2.180454    2.943693     -0.74    0.459     -7.949987     3.589079
      occ3w2 |    .8729362    2.776498      0.31    0.753     -4.568899     6.314772
      occ4w2 |   -1.353704    2.942107     -0.46    0.645     -7.120128      4.41272
      occ5w2 |      2.7416    3.183927      0.86    0.389     -3.498782     8.981982
      occ6w2 |           0   (omitted)
      occ7w2 |    1.723368    2.749238      0.63    0.531      -3.66504     7.111775
      occ8w2 |    1.071406    3.004006      0.36    0.721     -4.816337     6.959149
     marrw21 |    1.363708    1.652619      0.83    0.409     -1.875365     4.602781
     marrw22 |           0   (omitted)
     marrw23 |    .3462148    1.088773      0.32    0.750      -1.78774      2.48017
     marrw25 |    1.049262    1.686487      0.62    0.534     -2.256193     4.354717
     marrw26 |           0   (omitted)
      inc1w2 |   -.4454501    2.822154     -0.16    0.875     -5.976771     5.085871
      inc2w2 |    1.223562    2.740806      0.45    0.655     -4.148319     6.595444
      inc3w2 |    .8897543    2.773723      0.32    0.748     -4.546642     6.326151
      inc4w2 |           0   (omitted)
     radhlw2 |    .0162494    .0128872      1.26    0.207     -.0090091     .0415079
      havmil |    .0034284    .0174028      0.20    0.844     -.0306804     .0375372
avgcumdosew2 |    .2841701    .2286177      1.24    0.214     -.1639122     .7322525
         bf1 |   -.0034211    .0428716     -0.08    0.936     -.0874479     .0806057
         bf4 |   -.5482161    .2947147     -1.86    0.063     -1.125846     .0294141
         bf2 |    .0001496    .0001782      0.84    0.401     -.0001996     .0004989
        bf4m |    .2436517    .2745867      0.89    0.375     -.2945285     .7818318
        bf5m |   -.0026475    .0036526     -0.72    0.469     -.0098065     .0045114
        bf7m |   -.0008652    .0008476     -1.02    0.307     -.0025264      .000796
         bf8 |    .0000586    .0000741      0.79    0.429     -.0000867     .0002038
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0232359    .0348214     -0.67    0.505     -.0914845     .0450127
        bf22 |    .0000587    .0002121      0.28    0.782     -.0003569     .0004744
        bf29 |    .0000275    .0000434      0.63    0.527     -.0000576     .0001126
        bf30 |    .0000875    .0005016      0.17    0.862     -.0008956     .0010706
        bf40 |   -.3662342    .2446561     -1.50    0.134     -.8457514     .1132829
       deaw2 |    .0470792    .2393731      0.20    0.844     -.4220834     .5162419
      dvcew2 |   -1.779925    2.445695     -0.73    0.467     -6.573399     3.013549
      sepaw2 |           0   (omitted)
      accdw2 |   -2.474844    1.428768     -1.73    0.083     -5.275177     .3254891
      movew2 |           0   (omitted)
       illw2 |   -.2222062    .2628556     -0.85    0.398     -.7373938     .2929813
     shfamw2 |    .0141915    .0093043      1.53    0.127     -.0040446     .0324276
      shhlw2 |    .0087578    .0103731      0.84    0.399     -.0115731     .0290887
     shjobw2 |   -.0066068    .0093228     -0.71    0.479     -.0248791     .0116655
    shrelaw2 |   -.0301632    .0120406     -2.51    0.012     -.0537624    -.0065641
     suprtw2 |   -.0125721    .0077017     -1.63    0.103     -.0276672      .002523
     suchrw2 |   -.0060097    .0083821     -0.72    0.473     -.0224384      .010419
    havmilsq |   -.0000291     .000055     -0.53    0.597     -.0001368     .0000787
       _cons |   -27.59558     6.62482     -4.17    0.000     -40.57999    -14.61117
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        29             7  |         36
     -     |        18           228  |        246
-----------+--------------------------+-----------
   Total   |        47           235  |        282

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   61.70%
Specificity                     Pr( -|~D)   97.02%
Positive predictive value       Pr( D| +)   80.56%
Negative predictive value       Pr(~D| -)   92.68%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.98%
False - rate for true D         Pr( -| D)   38.30%
False + rate for classified +   Pr(~D| +)   19.44%
False - rate for classified -   Pr( D| -)    7.32%
--------------------------------------------------
Correctly classified                        91.13%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       282
 number of covariate patterns =       282
            Pearson chi2(235) =       241.50
                  Prob > chi2 =         0.3715

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:     -127.058     Log-Lik Full Model:          -69.238
D(226):                      138.475     LR(45):                      115.641
                                         Prob > LR:                     0.000
McFadden's R2:                 0.455     McFadden's Adj R2:             0.014
Maximum Likelihood R2:         0.336     Cragg & Uhler's R2:            0.566
McKelvey and Zavoina's R2:     0.950     Efron's R2:                    0.475
Variance of y*:               65.351     Variance of error:             3.290
Count R2:                      0.911     Adj Count R2:                  0.468
AIC:                           0.888     AIC*n:                       250.475
BIC:                       -1136.596     BIC':                        138.245
Full main model for HP2sxlife for wave= 2

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

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

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

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

note: inc4w2 != 0 predicts failure perfectly
      inc4w2 dropped and 10 obs not used

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

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

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

note: marrw25 != 0 predicts success perfectly
      marrw25 dropped and 1 obs not used

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

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

Logistic regression                               Number of obs   =        230
                                                  LR chi2(43)     =     118.95
                                                  Prob > chi2     =     0.0000
Log likelihood = -79.289222                       Pseudo R2       =     0.4286

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0432555    .0255157      1.70    0.090     -.0067543     .0932653
    _Ieduc_2 |    .5443827    2.506052      0.22    0.828     -4.367389     5.456154
    _Ieduc_3 |    .1796978     2.28739      0.08    0.937     -4.303504       4.6629
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    .4368682    2.317398      0.19    0.850     -4.105148     4.978884
    _Ieduc_6 |    .0186117    2.278221      0.01    0.993     -4.446619     4.483842
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.105479    2.816517     -0.39    0.695      -6.62575     4.414792
      occ2w2 |   -1.682569    2.827571     -0.60    0.552     -7.224506     3.859369
      occ3w2 |   -1.865477     2.89914     -0.64    0.520     -7.547687     3.816733
      occ4w2 |    -1.59066    2.872678     -0.55    0.580     -7.221004     4.039685
      occ5w2 |   -2.726982     3.04188     -0.90    0.370     -8.688957     3.234994
      occ6w2 |   -.2649406    3.127605     -0.08    0.932     -6.394934     5.865053
      occ7w2 |   -.4867933    2.955714     -0.16    0.869     -6.279885     5.306299
      occ8w2 |           0   (omitted)
     marrw21 |     12.4944    2424.109      0.01    0.996     -4738.671      4763.66
     marrw22 |           0   (omitted)
     marrw23 |    12.40066    2424.109      0.01    0.996     -4738.765     4763.566
     marrw25 |           0   (omitted)
     marrw26 |    11.43457     2424.11      0.00    0.996     -4739.733     4762.602
      inc1w2 |    2.196401     3.02039      0.73    0.467     -3.723454     8.116257
      inc2w2 |    2.746044     2.89601      0.95    0.343     -2.930031     8.422118
      inc3w2 |    2.442664    2.894545      0.84    0.399      -3.23054     8.115869
      inc4w2 |           0   (omitted)
     radhlw2 |     .017419    .0089507      1.95    0.052      -.000124     .0349621
      havmil |     -.00067    .0081563     -0.08    0.935     -.0166561     .0153161
avgcumdosew2 |    .0428691    .0600095      0.71    0.475     -.0747474     .1604856
         bf1 |    .0291477    .0465434      0.63    0.531     -.0620756     .1203711
         bf4 |   -.2016289    .2378115     -0.85    0.397      -.667731     .2644731
         bf2 |    .0001142    .0001714      0.67    0.505     -.0002218     .0004501
        bf4m |   -.1000095    .2151889     -0.46    0.642     -.5217719      .321753
        bf5m |    .0017962    .0020545      0.87    0.382     -.0022305     .0058229
        bf7m |    .0013709    .0007292      1.88    0.060     -.0000582     .0028001
         bf8 |   -.0000501    .0000511     -0.98    0.327     -.0001502     .0000501
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0313008    .0383214     -0.82    0.414     -.1064094     .0438077
        bf22 |   -.0000976    .0002072     -0.47    0.637     -.0005038     .0003085
        bf29 |           0   (omitted)
        bf30 |    -.000152    .0004096     -0.37    0.711     -.0009547     .0006507
        bf40 |    .4229922    .2840028      1.49    0.136     -.1336431     .9796275
       deaw2 |   -.1048722    .3851952     -0.27    0.785     -.8598409     .6500964
      dvcew2 |           0   (omitted)
      sepaw2 |           0   (omitted)
      accdw2 |   -.0405016    .5549457     -0.07    0.942     -1.128175     1.047172
      movew2 |     .116116    .6197485      0.19    0.851     -1.098569     1.330801
       illw2 |    .1039214    .3746121      0.28    0.781     -.6303047     .8381476
     shfamw2 |   -.0104564    .0087383     -1.20    0.231     -.0275832     .0066703
      shhlw2 |   -.0161825    .0102333     -1.58    0.114     -.0362395     .0038744
     shjobw2 |     .018921    .0100999      1.87    0.061     -.0008744     .0387165
    shrelaw2 |    -.008619    .0087825     -0.98    0.326     -.0258323     .0085944
     suprtw2 |    .0043231    .0078499      0.55    0.582     -.0110624     .0197086
     suchrw2 |     .006568    .0072888      0.90    0.368     -.0077177     .0208538
    havmilsq |   -9.54e-07     .000013     -0.07    0.941     -.0000264     .0000245
       _cons |   -15.57434    2424.111     -0.01    0.995     -4766.744     4735.596
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        46            14  |         60
     -     |        21           149  |        170
-----------+--------------------------+-----------
   Total   |        67           163  |        230

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   68.66%
Specificity                     Pr( -|~D)   91.41%
Positive predictive value       Pr( D| +)   76.67%
Negative predictive value       Pr(~D| -)   87.65%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.59%
False - rate for true D         Pr( -| D)   31.34%
False + rate for classified +   Pr(~D| +)   23.33%
False - rate for classified -   Pr( D| -)   12.35%
--------------------------------------------------
Correctly classified                        84.78%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       230
 number of covariate patterns =       230
            Pearson chi2(186) =       248.57
                  Prob > chi2 =         0.0015

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -138.763     Log-Lik Full Model:          -79.289
D(174):                      158.578     LR(43):                      118.947
                                         Prob > LR:                     0.000
McFadden's R2:                 0.429     McFadden's Adj R2:             0.025
Maximum Likelihood R2:         0.404     Cragg & Uhler's R2:            0.576
McKelvey and Zavoina's R2:     0.727     Efron's R2:                    0.487
Variance of y*:               12.053     Variance of error:             3.290
Count R2:                      0.848     Adj Count R2:                  0.478
AIC:                           1.176     AIC*n:                       270.578
BIC:                        -787.647     BIC':                        114.891
Full main model for HP2sxlife for wave= 2

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

i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
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: marrw26 omitted because of collinearity
note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        346
                                                  LR chi2(50)     =     172.45
                                                  Prob > chi2     =     0.0000
Log likelihood = -111.04151                       Pseudo R2       =     0.4371

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1025465    .0220099      4.66    0.000      .0594079      .145685
    _Ieduc_2 |   -15.48089     5580.75     -0.00    0.998     -10953.55     10922.59
    _Ieduc_3 |   -13.96022     5580.75     -0.00    0.998     -10952.03     10924.11
    _Ieduc_4 |   -13.71505     5580.75     -0.00    0.998     -10951.78     10924.35
    _Ieduc_5 |   -14.90906     5580.75     -0.00    0.998     -10952.98     10923.16
    _Ieduc_6 |     -14.036     5580.75     -0.00    0.998      -10952.1     10924.03
    _Ieduc_7 |   -14.35246    5580.751     -0.00    0.998     -10952.42     10923.72
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.981003    1.626317     -1.22    0.223     -5.168525      1.20652
      occ2w2 |   -1.199181    1.677697     -0.71    0.475     -4.487407     2.089044
      occ3w2 |   -.7937582    1.670584     -0.48    0.635     -4.068042     2.480526
      occ4w2 |   -.8102305     1.76353     -0.46    0.646     -4.266686     2.646225
      occ5w2 |   -.5056346     1.89785     -0.27    0.790     -4.225353     3.214084
      occ6w2 |   -1.645496    1.931022     -0.85    0.394     -5.430229     2.139237
      occ7w2 |   -1.288749    1.611028     -0.80    0.424     -4.446306     1.868809
      occ8w2 |   -.2492981    1.896994     -0.13    0.895     -3.967338     3.468742
     marrw21 |   -.8001566    1.260909     -0.63    0.526     -3.271493      1.67118
     marrw22 |   -.5650635    1.458662     -0.39    0.698     -3.423989     2.293861
     marrw23 |   -1.064868    .8865967     -1.20    0.230     -2.802566     .6728293
     marrw25 |    -2.27112    1.443829     -1.57    0.116     -5.100972     .5587328
     marrw26 |           0   (omitted)
      inc1w2 |    .5165366    1.706152      0.30    0.762      -2.82746     3.860533
      inc2w2 |    .9386295    1.604285      0.59    0.558     -2.205712     4.082971
      inc3w2 |   -.0514022    1.646264     -0.03    0.975      -3.27802     3.175215
      inc4w2 |    .0543252    2.074029      0.03    0.979     -4.010697     4.119348
     radhlw2 |    .0162077    .0081749      1.98    0.047      .0001852     .0322303
      havmil |   -.0014745    .0033419     -0.44    0.659     -.0080244     .0050754
avgcumdosew2 |    .1675129    .1251712      1.34    0.181     -.0778182      .412844
         bf1 |   -.0006699    .0354295     -0.02    0.985     -.0701104     .0687707
         bf4 |   -.6290339    .2665349     -2.36    0.018     -1.151433    -.1066351
         bf2 |    .0000625     .000131      0.48    0.633     -.0001943     .0003193
        bf4m |    .4940985    .2505491      1.97    0.049      .0030312     .9851658
        bf5m |    -.002308    .0018303     -1.26    0.207     -.0058953     .0012792
        bf7m |      .00018    .0006254      0.29    0.773     -.0010457     .0014058
         bf8 |    6.11e-06    .0000425      0.14    0.886     -.0000772     .0000894
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0009967    .0290168     -0.03    0.973     -.0578686     .0558752
        bf22 |   -.0001321    .0001453     -0.91    0.363     -.0004169     .0001527
        bf29 |           0   (omitted)
        bf30 |   -.0003317    .0003532     -0.94    0.348      -.001024     .0003605
        bf40 |     .149372     .145042      1.03    0.303     -.1349052     .4336491
       deaw2 |    .0989356    .2231863      0.44    0.658     -.3385014     .5363726
      dvcew2 |   -14.61462    1422.458     -0.01    0.992     -2802.582     2773.353
      sepaw2 |    13.19252     1422.46      0.01    0.993     -2774.778     2801.163
      accdw2 |   -.3607593    .7071147     -0.51    0.610     -1.746679      1.02516
      movew2 |    .2363995    .5198633      0.45    0.649     -.7825137     1.255313
       illw2 |    .5572231    .2374511      2.35    0.019      .0918274     1.022619
     shfamw2 |     .001878    .0072955      0.26    0.797     -.0124209     .0161768
      shhlw2 |    .0092925    .0072946      1.27    0.203     -.0050046     .0235896
     shjobw2 |   -.0069643    .0067203     -1.04    0.300     -.0201358     .0062073
    shrelaw2 |   -.0169606    .0081044     -2.09    0.036      -.032845    -.0010762
     suprtw2 |   -.0129953    .0058047     -2.24    0.025     -.0243723    -.0016183
     suchrw2 |    .0118245    .0068566      1.72    0.085     -.0016142     .0252632
    havmilsq |   -6.39e-08    2.74e-06     -0.02    0.981     -5.43e-06     5.30e-06
       _cons |    5.841436     5580.75      0.00    0.999     -10932.23     10943.91
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        57            17  |         74
     -     |        32           240  |        272
-----------+--------------------------+-----------
   Total   |        89           257  |        346

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   64.04%
Specificity                     Pr( -|~D)   93.39%
Positive predictive value       Pr( D| +)   77.03%
Negative predictive value       Pr(~D| -)   88.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.61%
False - rate for true D         Pr( -| D)   35.96%
False + rate for classified +   Pr(~D| +)   22.97%
False - rate for classified -   Pr( D| -)   11.76%
--------------------------------------------------
Correctly classified                        85.84%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       346
 number of covariate patterns =       346
            Pearson chi2(295) =       312.67
                  Prob > chi2 =         0.2294

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -197.267     Log-Lik Full Model:         -111.042
D(290):                      222.083     LR(50):                      172.450
                                         Prob > LR:                     0.000
McFadden's R2:                 0.437     McFadden's Adj R2:             0.153
Maximum Likelihood R2:         0.393     Cragg & Uhler's R2:            0.577
McKelvey and Zavoina's R2:     0.765     Efron's R2:                    0.477
Variance of y*:               14.018     Variance of error:             3.290
Count R2:                      0.858     Adj Count R2:                  0.449
AIC:                           0.966     AIC*n:                       334.083
BIC:                       -1473.384     BIC':                        119.872
Full main model for HP2inthob for wave= 2

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

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

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

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

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

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

note: marrw26 != 0 predicts failure perfectly
      marrw26 dropped and 3 obs not used

note: inc4w2 != 0 predicts failure perfectly
      inc4w2 dropped and 10 obs not used

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

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

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

note: marrw25 != 0 predicts success perfectly
      marrw25 dropped and 1 obs not used

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

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

Logistic regression                               Number of obs   =        222
                                                  LR chi2(38)     =      87.92
                                                  Prob > chi2     =     0.0000
Log likelihood = -56.065557                       Pseudo R2       =     0.4395

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0628957    .0331927      1.89    0.058     -.0021608     .1279522
    _Ieduc_2 |     -1.6685    1.649966     -1.01    0.312     -4.902374     1.565374
    _Ieduc_3 |   -1.215713    .7907875     -1.54    0.124     -2.765628      .334202
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.4779232    .8553091     -0.56    0.576     -2.154298     1.198452
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.082181    4.607241     -0.23    0.814     -10.11221     7.947846
      occ2w2 |   -2.603476    4.649764     -0.56    0.576     -11.71685     6.509893
      occ3w2 |   -1.004632       4.641     -0.22    0.829     -10.10083     8.091562
      occ4w2 |   -2.019345    4.651526     -0.43    0.664     -11.13617     7.097479
      occ5w2 |    .6122404    4.674482      0.13    0.896     -8.549576     9.774057
      occ6w2 |           0   (omitted)
      occ7w2 |    -.673024    4.745659     -0.14    0.887     -9.974345     8.628297
      occ8w2 |           0   (omitted)
     marrw21 |    20.61385           .         .        .             .            .
     marrw22 |           0   (omitted)
     marrw23 |    18.42435    .9174041     20.08    0.000      16.62627     20.22243
     marrw25 |           0   (omitted)
     marrw26 |           0   (omitted)
      inc1w2 |   -2.249864    4.853935     -0.46    0.643      -11.7634     7.263674
      inc2w2 |   -.5178361    4.628216     -0.11    0.911     -9.588972       8.5533
      inc3w2 |    .1239712    4.620272      0.03    0.979     -8.931596     9.179539
      inc4w2 |           0   (omitted)
     radhlw2 |    .0343977     .012966      2.65    0.008      .0089848     .0598107
      havmil |    .0008574    .0092743      0.09    0.926       -.01732     .0190348
avgcumdosew2 |    -.193618    .3161247     -0.61    0.540     -.8132111      .425975
         bf1 |   -1.886122    .0917045    -20.57    0.000     -2.065859    -1.706384
         bf4 |   -.3784715    .2556706     -1.48    0.139     -.8795766     .1226337
         bf2 |    .0000547    .0002055      0.27    0.790     -.0003482     .0004575
        bf4m |    .0723497    .2259826      0.32    0.749      -.370568     .5152675
        bf5m |     .001341    .0024956      0.54    0.591     -.0035502     .0062323
        bf7m |    .0004844    .0009455      0.51    0.608     -.0013686     .0023375
         bf8 |   -.0000611    .0000655     -0.93    0.351     -.0001895     .0000674
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |     1.88387    .0868318     21.70    0.000      1.713682     2.054057
        bf22 |    .0002363     .000249      0.95    0.343     -.0002517     .0007243
        bf29 |           0   (omitted)
        bf30 |   -.0000596     .000538     -0.11    0.912     -.0011141     .0009949
        bf40 |    .1920076    .3256519      0.59    0.555     -.4462584     .8302735
       deaw2 |    .0505905    .5418118      0.09    0.926     -1.011341     1.112522
      dvcew2 |           0   (omitted)
      sepaw2 |           0   (omitted)
      accdw2 |    .6361143    .5519575      1.15    0.249     -.4457025     1.717931
      movew2 |    1.255677    .7610419      1.65    0.099     -.2359377     2.747292
       illw2 |   -.8504102    .5855803     -1.45    0.146     -1.998126     .2973061
     shfamw2 |   -.0084797    .0105947     -0.80    0.423      -.029245     .0122856
      shhlw2 |   -.0041615    .0127463     -0.33    0.744     -.0291439     .0208209
     shjobw2 |    .0098894    .0132981      0.74    0.457     -.0161744     .0359532
    shrelaw2 |   -.0107778    .0098723     -1.09    0.275     -.0301272     .0085716
     suprtw2 |   -.0039714    .0091015     -0.44    0.663     -.0218101     .0138672
     suchrw2 |    .0137146    .0086956      1.58    0.115     -.0033283     .0307576
    havmilsq |   -2.48e-06    .0000157     -0.16    0.875     -.0000333     .0000283
       _cons |   -98.68478           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 21 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        20             6  |         26
     -     |        17           179  |        196
-----------+--------------------------+-----------
   Total   |        37           185  |        222

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   54.05%
Specificity                     Pr( -|~D)   96.76%
Positive predictive value       Pr( D| +)   76.92%
Negative predictive value       Pr(~D| -)   91.33%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.24%
False - rate for true D         Pr( -| D)   45.95%
False + rate for classified +   Pr(~D| +)   23.08%
False - rate for classified -   Pr( D| -)    8.67%
--------------------------------------------------
Correctly classified                        89.64%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       222
 number of covariate patterns =       222
            Pearson chi2(181) =       382.48
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -100.025     Log-Lik Full Model:          -56.066
D(166):                      112.131     LR(38):                       87.918
                                         Prob > LR:                     0.000
McFadden's R2:                 0.439     McFadden's Adj R2:            -0.120
Maximum Likelihood R2:         0.327     Cragg & Uhler's R2:            0.551
McKelvey and Zavoina's R2:     0.982     Efron's R2:                    0.466
Variance of y*:              186.924     Variance of error:             3.290
Count R2:                      0.896     Adj Count R2:                  0.378
AIC:                           1.010     AIC*n:                       224.131
BIC:                        -784.713     BIC':                        117.384
Full main model for HP2inthob for wave= 2

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

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

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

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

Logistic regression                               Number of obs   =        343
                                                  LR chi2(50)     =     122.71
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.17277                       Pseudo R2       =     0.3684

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0823123    .0222811      3.69    0.000      .0386422     .1259824
    _Ieduc_2 |   -11.49207    1090.325     -0.01    0.992     -2148.489     2125.505
    _Ieduc_3 |   -10.49189    1090.324     -0.01    0.992     -2147.489     2126.505
    _Ieduc_4 |   -9.521531    1090.325     -0.01    0.993     -2146.519     2127.476
    _Ieduc_5 |   -10.03097    1090.325     -0.01    0.993     -2147.028     2126.966
    _Ieduc_6 |   -10.65519    1090.325     -0.01    0.992     -2147.652     2126.342
    _Ieduc_7 |   -10.56771     1090.33     -0.01    0.992     -2147.575      2126.44
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.444251    1.786645     -0.81    0.419      -4.94601     2.057508
      occ2w2 |    -1.72162     1.86422     -0.92    0.356     -5.375425     1.932185
      occ3w2 |   -.6960307    1.813742     -0.38    0.701       -4.2509     2.858838
      occ4w2 |   -1.340236    1.971898     -0.68    0.497     -5.205085     2.524613
      occ5w2 |   -1.866674    2.177453     -0.86    0.391     -6.134403     2.401055
      occ6w2 |   -.6630026    2.009767     -0.33    0.741     -4.602073     3.276067
      occ7w2 |   -.3132082    1.768051     -0.18    0.859     -3.778525     3.152109
      occ8w2 |   -.4424864    1.980995     -0.22    0.823     -4.325166     3.440193
     marrw21 |    1.198754    1.252366      0.96    0.338     -1.255838     3.653346
     marrw22 |    -.723147     1.45696     -0.50    0.620     -3.578736     2.132442
     marrw23 |   -.1412732    .8614541     -0.16    0.870     -1.829692     1.547146
     marrw25 |     .030411    1.273943      0.02    0.981     -2.466472     2.527294
     marrw26 |           0   (omitted)
      inc1w2 |    .7639278    1.820866      0.42    0.675     -2.804904      4.33276
      inc2w2 |    1.088119    1.754837      0.62    0.535     -2.351299     4.527537
      inc3w2 |    .8549853    1.806256      0.47    0.636     -2.685212     4.395182
      inc4w2 |    2.107171    2.102907      1.00    0.316     -2.014451     6.228794
     radhlw2 |    .0162662    .0092193      1.76    0.078     -.0018033     .0343356
      havmil |    .0028568    .0035632      0.80    0.423      -.004127     .0098406
avgcumdosew2 |    .1191237    .1112746      1.07    0.284     -.0989705     .3372179
         bf1 |   -.0579291    .0444461     -1.30    0.192     -.1450419     .0291837
         bf4 |   -.5134212    .2911522     -1.76    0.078     -1.084069     .0572265
         bf2 |    .0000225    .0001357      0.17    0.868     -.0002436     .0002885
        bf4m |    .3813738    .2769085      1.38    0.168     -.1613568     .9241045
        bf5m |   -.0013491    .0018728     -0.72    0.471     -.0050196     .0023214
        bf7m |   -.0007653    .0006452     -1.19    0.236     -.0020299     .0004993
         bf8 |    .0000124    .0000428      0.29    0.772     -.0000716     .0000964
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0409398    .0388667      1.05    0.292     -.0352376     .1171172
        bf22 |    .0000496    .0001446      0.34    0.732     -.0002338     .0003329
        bf29 |    .0000147    .0000386      0.38    0.704      -.000061     .0000904
        bf30 |    .0005975    .0003487      1.71    0.087     -.0000859     .0012809
        bf40 |    -.092913    .1571517     -0.59    0.554     -.4009247     .2150987
       deaw2 |    .1650922    .2350487      0.70    0.482     -.2955947     .6257792
      dvcew2 |     -.44027    1.751166     -0.25    0.801     -3.872493     2.991953
      sepaw2 |           0   (omitted)
      accdw2 |    .3072193    .6191348      0.50    0.620     -.9062626     1.520701
      movew2 |   -.4208456    .8150343     -0.52    0.606     -2.018283     1.176592
       illw2 |     .146668    .2184808      0.67    0.502     -.2815466     .5748825
     shfamw2 |    .0028218    .0077742      0.36    0.717     -.0124154      .018059
      shhlw2 |    .0082475    .0076919      1.07    0.284     -.0068283     .0233233
     shjobw2 |   -.0093426    .0067931     -1.38    0.169     -.0226569     .0039716
    shrelaw2 |   -.0142034    .0081278     -1.75    0.081     -.0301336     .0017268
     suprtw2 |   -.0099735    .0060387     -1.65    0.099      -.021809     .0018621
     suchrw2 |   -.0045113    .0068989     -0.65    0.513     -.0180329     .0090102
    havmilsq |   -2.60e-06    4.34e-06     -0.60    0.550     -.0000111     5.92e-06
       _cons |    2.140849     1090.33      0.00    0.998     -2134.867     2139.148
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        32            12  |         44
     -     |        33           266  |        299
-----------+--------------------------+-----------
   Total   |        65           278  |        343

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   49.23%
Specificity                     Pr( -|~D)   95.68%
Positive predictive value       Pr( D| +)   72.73%
Negative predictive value       Pr(~D| -)   88.96%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.32%
False - rate for true D         Pr( -| D)   50.77%
False + rate for classified +   Pr(~D| +)   27.27%
False - rate for classified -   Pr( D| -)   11.04%
--------------------------------------------------
Correctly classified                        86.88%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       343
 number of covariate patterns =       343
            Pearson chi2(292) =       307.38
                  Prob > chi2 =         0.2568

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -166.528     Log-Lik Full Model:         -105.173
D(287):                      210.346     LR(50):                      122.710
                                         Prob > LR:                     0.000
McFadden's R2:                 0.368     McFadden's Adj R2:             0.032
Maximum Likelihood R2:         0.301     Cragg & Uhler's R2:            0.484
McKelvey and Zavoina's R2:     0.627     Efron's R2:                    0.388
Variance of y*:                8.828     Variance of error:             3.290
Count R2:                      0.869     Adj Count R2:                  0.308
AIC:                           0.940     AIC*n:                       322.346
BIC:                       -1465.083     BIC':                        169.177
Full main model for HP2vacatn for wave= 2

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

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

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

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

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

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

note: marrw26 != 0 predicts failure perfectly
      marrw26 dropped and 3 obs not used

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

note: inc4w2 != 0 predicts failure perfectly
      inc4w2 dropped and 10 obs not used

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

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

note: sepaw2 != 0 predicts failure perfectly
      sepaw2 dropped and 3 obs not used

note: marrw25 != 0 predicts success perfectly
      marrw25 dropped and 2 obs not used

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

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

Logistic regression                               Number of obs   =        209
                                                  LR chi2(39)     =     102.98
                                                  Prob > chi2     =     0.0000
Log likelihood = -47.602962                       Pseudo R2       =     0.5196

-------------+----------------------------------------------------------------
    HP2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1088786    .0407817      2.67    0.008       .028948     .1888093
    _Ieduc_2 |   -.9318847    1.583195     -0.59    0.556     -4.034891     2.171121
    _Ieduc_3 |   -.3013966    .8062315     -0.37    0.709     -1.881581     1.278788
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    .7382214    .9602436      0.77    0.442     -1.143821     2.620264
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |    .5124208    2.878835      0.18    0.859     -5.129992     6.154834
      occ2w2 |   -.4408554    2.792442     -0.16    0.875     -5.913941      5.03223
      occ3w2 |    -2.00202    3.038272     -0.66    0.510     -7.956923     3.952884
      occ4w2 |    -1.69795    2.828364     -0.60    0.548     -7.241441      3.84554
      occ5w2 |    .7563117    3.026518      0.25    0.803     -5.175555     6.688178
      occ6w2 |           0   (omitted)
      occ7w2 |   -1.936351    3.240951     -0.60    0.550     -8.288498     4.415797
      occ8w2 |           0   (omitted)
     marrw21 |   -1.786228    2.087814     -0.86    0.392     -5.878268     2.305811
     marrw22 |           0   (omitted)
     marrw23 |   -3.710107    2.110606     -1.76    0.079     -7.846818     .4266038
     marrw25 |           0   (omitted)
     marrw26 |           0   (omitted)
      inc1w2 |           0   (omitted)
      inc2w2 |    6.638966    3.131338      2.12    0.034      .5016569     12.77628
      inc3w2 |    6.255863     3.02429      2.07    0.039      .3283623     12.18336
      inc4w2 |           0   (omitted)
     radhlw2 |    .0154566    .0132775      1.16    0.244     -.0105668     .0414799
      havmil |    .0154293     .016452      0.94    0.348      -.016816     .0476745
avgcumdosew2 |   -.0557184    .2274565     -0.24    0.806      -.501525     .3900881
         bf1 |   -.1915136    .1848361     -1.04    0.300     -.5537857     .1707584
         bf4 |   -1.014161     .384844     -2.64    0.008     -1.768442    -.2598809
         bf2 |    .0009651    .0003217      3.00    0.003      .0003345     .0015957
        bf4m |    .5255255    .2920885      1.80    0.072     -.0469573     1.098008
        bf5m |   -.0090927    .0046394     -1.96    0.050     -.0181857     3.32e-07
        bf7m |    .0026491    .0014384      1.84    0.066     -.0001701     .0054684
         bf8 |   -.0000651    .0001057     -0.62    0.538     -.0002723     .0001421
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .1424239    .1725233      0.83    0.409     -.1957155     .4805633
        bf22 |   -.0003108    .0003594     -0.86    0.387     -.0010152     .0003936
        bf29 |           0   (omitted)
        bf30 |   -.0023793    .0008117     -2.93    0.003     -.0039701    -.0007885
        bf40 |    .9125294    .4548855      2.01    0.045      .0209702     1.804089
       deaw2 |   -.6840264    .6025074     -1.14    0.256     -1.864919     .4968663
      dvcew2 |           0   (omitted)
      sepaw2 |           0   (omitted)
      accdw2 |    1.109415    .6826211      1.63    0.104     -.2284975     2.447328
      movew2 |    1.822244    1.095619      1.66    0.096     -.3251288     3.969618
       illw2 |   -.4132514    .5817296     -0.71    0.477      -1.55342     .7269176
     shfamw2 |    .0127979    .0115841      1.10    0.269     -.0099065     .0355022
      shhlw2 |    .0134786    .0158032      0.85    0.394     -.0174951     .0444522
     shjobw2 |    -.038737    .0177181     -2.19    0.029     -.0734639    -.0040101
    shrelaw2 |   -.0185842    .0149559     -1.24    0.214     -.0478973     .0107288
     suprtw2 |     .013763    .0125463      1.10    0.273     -.0108273     .0383533
     suchrw2 |   -.0155904    .0122501     -1.27    0.203     -.0396002     .0084195
    havmilsq |    -.000036    .0000355     -1.01    0.312     -.0001056     .0000337
       _cons |   -17.72332    9.218306     -1.92    0.055     -35.79086     .3442328
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        24             8  |         32
     -     |        14           163  |        177
-----------+--------------------------+-----------
   Total   |        38           171  |        209

Classified + if predicted Pr(D) >= .5
True D defined as HP2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   63.16%
Specificity                     Pr( -|~D)   95.32%
Positive predictive value       Pr( D| +)   75.00%
Negative predictive value       Pr(~D| -)   92.09%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.68%
False - rate for true D         Pr( -| D)   36.84%
False + rate for classified +   Pr(~D| +)   25.00%
False - rate for classified -   Pr( D| -)    7.91%
--------------------------------------------------
Correctly classified                        89.47%
--------------------------------------------------


Logistic model for HP2vacatn, goodness-of-fit test


       number of observations =       209
 number of covariate patterns =       209
            Pearson chi2(169) =       254.11
                  Prob > chi2 =         0.0000

Measures of Fit for logistic of HP2vacatn

Log-Lik Intercept Only:      -99.095     Log-Lik Full Model:          -47.603
D(153):                       95.206     LR(39):                      102.984
                                         Prob > LR:                     0.000
McFadden's R2:                 0.520     McFadden's Adj R2:            -0.045
Maximum Likelihood R2:         0.389     Cragg & Uhler's R2:            0.635
McKelvey and Zavoina's R2:     0.876     Efron's R2:                    0.535
Variance of y*:               26.488     Variance of error:             3.290
Count R2:                      0.895     Adj Count R2:                  0.421
AIC:                           0.991     AIC*n:                       207.206
BIC:                        -722.171     BIC':                        105.367
Full main model for HP2vacatn for wave= 2

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

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

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

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

Logistic regression                               Number of obs   =        343
                                                  LR chi2(50)     =     113.11
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.52458                       Pseudo R2       =     0.3489

-------------+----------------------------------------------------------------
    HP2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0854752    .0223994      3.82    0.000      .0415731     .1293772
    _Ieduc_2 |   -13.44949    933.6235     -0.01    0.989     -1843.318     1816.419
    _Ieduc_3 |   -13.23035    933.6235     -0.01    0.989     -1843.099     1816.638
    _Ieduc_4 |   -11.35201    933.6237     -0.01    0.990     -1841.221     1818.517
    _Ieduc_5 |   -12.71553    933.6236     -0.01    0.989     -1842.584     1817.153
    _Ieduc_6 |   -12.77592    933.6235     -0.01    0.989     -1842.644     1817.093
    _Ieduc_7 |   -13.29025    933.6257     -0.01    0.989     -1843.163     1816.582
    _Ieduc_8 |           0   (omitted)
      occ1w2 |    -1.13677    2.279208     -0.50    0.618     -5.603935     3.330396
      occ2w2 |   -.2856297    2.305316     -0.12    0.901     -4.803966     4.232706
      occ3w2 |    -.216915     2.29482     -0.09    0.925     -4.714679     4.280849
      occ4w2 |   -.6834035    2.371062     -0.29    0.773     -5.330599     3.963792
      occ5w2 |   -1.371419    2.630896     -0.52    0.602      -6.52788     3.785042
      occ6w2 |    .0514808    2.451681      0.02    0.983     -4.753725     4.856686
      occ7w2 |    -.181635    2.248007     -0.08    0.936     -4.587648     4.224378
      occ8w2 |    .8447418    2.549831      0.33    0.740     -4.152835     5.842319
     marrw21 |   -.3962422    1.357576     -0.29    0.770     -3.057042     2.264558
     marrw22 |   -.7030307    1.344505     -0.52    0.601     -3.338211      1.93215
     marrw23 |   -.2946063    .8362364     -0.35    0.725     -1.933599     1.344387
     marrw25 |   -.3847231    1.312392     -0.29    0.769     -2.956964     2.187518
     marrw26 |           0   (omitted)
      inc1w2 |   -.1652405    2.308326     -0.07    0.943     -4.689477     4.358996
      inc2w2 |    .5715205    2.259629      0.25    0.800     -3.857271     5.000312
      inc3w2 |    .4239257    2.273462      0.19    0.852     -4.031977     4.879829
      inc4w2 |   -.1023194     2.63109     -0.04    0.969      -5.25916     5.054522
     radhlw2 |    .0311839    .0092957      3.35    0.001      .0129647     .0494031
      havmil |    .0003102    .0031015      0.10    0.920     -.0057687      .006389
avgcumdosew2 |    .0845928     .134995      0.63    0.531     -.1799926     .3491782
         bf1 |   -.0293287     .036543     -0.80    0.422     -.1009517     .0422942
         bf4 |   -.0358912    .2239004     -0.16    0.873      -.474728     .4029456
         bf2 |    .0000573    .0001382      0.41    0.678     -.0002135     .0003281
        bf4m |   -.0145732    .2099542     -0.07    0.945     -.4260759     .3969296
        bf5m |   -.0005729    .0016599     -0.35    0.730     -.0038263     .0026805
        bf7m |   -.0009478    .0006252     -1.52    0.130     -.0021731     .0002775
         bf8 |   -.0000327    .0000408     -0.80    0.422     -.0001126     .0000472
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0039961    .0309743      0.13    0.897     -.0567124     .0647046
        bf22 |    .0000865    .0001546      0.56    0.576     -.0002165     .0003895
        bf29 |    .0000586    .0000394      1.49    0.137     -.0000187      .000136
        bf30 |   -.0003297    .0003684     -0.89    0.371     -.0010518     .0003924
        bf40 |    -.198659    .1714101     -1.16    0.246     -.5346167     .1372987
       deaw2 |    .2948234    .2283214      1.29    0.197     -.1526784     .7423251
      dvcew2 |    1.552638    1.538913      1.01    0.313     -1.463576     4.568851
      sepaw2 |           0   (omitted)
      accdw2 |   -.6724358     .784314     -0.86    0.391     -2.209663     .8647914
      movew2 |   -.2536718    .8260112     -0.31    0.759     -1.872624      1.36528
       illw2 |    .1943909    .2307856      0.84    0.400     -.2579405     .6467223
     shfamw2 |    .0107227    .0072538      1.48    0.139     -.0034944     .0249399
      shhlw2 |    .0100533    .0078834      1.28    0.202     -.0053979     .0255045
     shjobw2 |   -.0092742    .0068673     -1.35    0.177     -.0227339     .0041855
    shrelaw2 |   -.0224847    .0085804     -2.62    0.009      -.039302    -.0056674
     suprtw2 |   -.0043934    .0060874     -0.72    0.470     -.0163245     .0075377
     suchrw2 |    .0021142    .0069953      0.30    0.762     -.0115964     .0158248
    havmilsq |   -6.39e-07    2.42e-06     -0.26    0.792     -5.38e-06     4.10e-06
       _cons |    8.078046     933.628      0.01    0.993     -1821.799     1837.955
-------------+----------------------------------------------------------------

Logistic model for HP2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        30            11  |         41
     -     |        32           270  |        302
-----------+--------------------------+-----------
   Total   |        62           281  |        343

Classified + if predicted Pr(D) >= .5
True D defined as HP2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   48.39%
Specificity                     Pr( -|~D)   96.09%
Positive predictive value       Pr( D| +)   73.17%
Negative predictive value       Pr(~D| -)   89.40%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.91%
False - rate for true D         Pr( -| D)   51.61%
False + rate for classified +   Pr(~D| +)   26.83%
False - rate for classified -   Pr( D| -)   10.60%
--------------------------------------------------
Correctly classified                        87.46%
--------------------------------------------------


Logistic model for HP2vacatn, goodness-of-fit test


       number of observations =       343
 number of covariate patterns =       343
            Pearson chi2(292) =       331.68
                  Prob > chi2 =         0.0548

Measures of Fit for logistic of HP2vacatn

Log-Lik Intercept Only:     -162.082     Log-Lik Full Model:         -105.525
D(287):                      211.049     LR(50):                      113.114
                                         Prob > LR:                     0.000
McFadden's R2:                 0.349     McFadden's Adj R2:             0.003
Maximum Likelihood R2:         0.281     Cragg & Uhler's R2:            0.460
McKelvey and Zavoina's R2:     0.590     Efron's R2:                    0.377
Variance of y*:                8.031     Variance of error:             3.290
Count R2:                      0.875     Adj Count R2:                  0.306
AIC:                           0.942     AIC*n:                       323.049
BIC:                       -1464.379     BIC':                        178.773

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

. * male models
.         forvalues j=2/2 {
  2. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. di as input "Gender =1 HP2work model"
  4. di _skip(5)
  5.         logit HP2work age inc1w2-inc4w2 bf2 bf4  bf5m bf30 bf40 illw`j' ///
>         shhlw`j' radhlw2 havmilsq ///
>          avgcumdosew`j' if gender==1
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }
Gender =1 HP2work model


Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -142.40034
Iteration 2:   log likelihood = -139.93804
Iteration 3:   log likelihood = -139.91728
Iteration 4:   log likelihood = -139.91728

Logistic regression                               Number of obs   =        340
                                                  LR chi2(15)     =      65.91
                                                  Prob > chi2     =     0.0000
Log likelihood = -139.91728                       Pseudo R2       =     0.1906

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0011282    .0148134      0.08    0.939     -.0279056      .030162
      inc1w2 |   -.9128308    1.006103     -0.91    0.364     -2.884756     1.059095
      inc2w2 |    .2695533    .6709232      0.40    0.688     -1.045432     1.584539
      inc3w2 |    .7986152    .6627163      1.21    0.228     -.5002849     2.097515
      inc4w2 |   -.2811072      1.2809     -0.22    0.826     -2.791626     2.229412
         bf2 |    .0000321    .0000932      0.34    0.730     -.0001506     .0002148
         bf4 |   -.1434674    .0383586     -3.74    0.000     -.2186488    -.0682859
        bf5m |   -.0001776    .0008906     -0.20    0.842     -.0019232     .0015679
        bf30 |   -.0001426    .0003057     -0.47    0.641     -.0007418     .0004566
        bf40 |    .3375085    .0997566      3.38    0.001      .1419893     .5330278
       illw2 |   -.0213359     .267186     -0.08    0.936     -.5450108      .502339
      shhlw2 |    .0011092    .0043627      0.25    0.799     -.0074416       .00966
     radhlw2 |     .000307    .0058685      0.05    0.958      -.011195      .011809
    havmilsq |    2.49e-08    1.65e-06      0.02    0.988     -3.21e-06     3.26e-06
avgcumdosew2 |    .0233352    .0524776      0.44    0.657     -.0795191     .1261894
       _cons |    -1.06417    1.235654     -0.86    0.389     -3.486007     1.357667
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        19            15  |         34
     -     |        51           255  |        306
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   27.14%
Specificity                     Pr( -|~D)   94.44%
Positive predictive value       Pr( D| +)   55.88%
Negative predictive value       Pr(~D| -)   83.33%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.56%
False - rate for true D         Pr( -| D)   72.86%
False + rate for classified +   Pr(~D| +)   44.12%
False - rate for classified -   Pr( D| -)   16.67%
--------------------------------------------------
Correctly classified                        80.59%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       336
            Pearson chi2(320) =       291.79
                  Prob > chi2 =         0.8693

Measures of Fit for logit of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -139.917
D(324):                      279.835     LR(15):                       65.911
                                         Prob > LR:                     0.000
McFadden's R2:                 0.191     McFadden's Adj R2:             0.098
Maximum Likelihood R2:         0.176     Cragg & Uhler's R2:            0.276
McKelvey and Zavoina's R2:     0.292     Efron's R2:                    0.182
Variance of y*:                4.649     Variance of error:             3.290
Count R2:                      0.806     Adj Count R2:                  0.057
AIC:                           0.917     AIC*n:                       311.835
BIC:                       -1608.744     BIC':                         21.523

.
.
. forvalues j=2/2 {
  2. title4 "trimmed HP2work main effects models wave `j' for H1 part 2 with dose ns"
  3. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  4. di as input "Gender = male HP2work model"
  5.
. set more off
  6. forvalues j=2/2 {
  7.                 logistic HP2work age bf4 illw`j' shhlw`j' havmilsq ///
>                 avgcumdosew`j' if gender==1, coef nolog
  8.                         estat class
  9.                         estat gof
 10.                         fitstat
 11. }
 12. }
-------------
trimmed HP2work main effects models wave 2 for H1 part 2 with dose ns
-------------
Gender = male HP2work model

Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      46.77
                                                  Prob > chi2     =     0.0000
Log likelihood = -149.49038                       Pseudo R2       =     0.1353

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0127019    .0133613      0.95    0.342     -.0134858     .0388895
         bf4 |   -.1397142    .0305029     -4.58    0.000     -.1994988    -.0799296
       illw2 |    .2410569    .2214219      1.09    0.276      -.192922     .6750358
      shhlw2 |    .0043743    .0038731      1.13    0.259     -.0032168     .0119654
    havmilsq |    2.84e-07    1.53e-06      0.19    0.852     -2.71e-06     3.28e-06
avgcumdosew2 |    .0173789    .0498005      0.35    0.727     -.0802284     .1149862
       _cons |   -.7234318    .9036114     -0.80    0.423     -2.494478     1.047614
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        15            13  |         28
     -     |        55           257  |        312
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.43%
Specificity                     Pr( -|~D)   95.19%
Positive predictive value       Pr( D| +)   53.57%
Negative predictive value       Pr(~D| -)   82.37%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.81%
False - rate for true D         Pr( -| D)   78.57%
False + rate for classified +   Pr(~D| +)   46.43%
False - rate for classified -   Pr( D| -)   17.63%
--------------------------------------------------
Correctly classified                        80.00%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       325
            Pearson chi2(318) =       310.55
                  Prob > chi2 =         0.6069

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -149.490
D(333):                      298.981     LR(6):                        46.765
                                         Prob > LR:                     0.000
McFadden's R2:                 0.135     McFadden's Adj R2:             0.095
Maximum Likelihood R2:         0.129     Cragg & Uhler's R2:            0.201
McKelvey and Zavoina's R2:     0.196     Efron's R2:                    0.134
Variance of y*:                4.094     Variance of error:             3.290
Count R2:                      0.800     Adj Count R2:                  0.029
AIC:                           0.921     AIC*n:                       312.981
BIC:                       -1642.058     BIC':                        -11.791

.
. title4 "Simultaneous trimming"
-------------
Simultaneous trimming
-------------

. forvalues j=2/2 {
  2.                 logistic HP2work age bf8 illw`j' shhlw`j'  ///
>                 avgcumdosew`j' if gender==1, coef nolog
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      26.93
                                                  Prob > chi2     =     0.0001
Log likelihood = -159.40747                       Pseudo R2       =     0.0779

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0348108    .0120851      2.88    0.004      .0111245     .0584972
         bf8 |   -.0000289    .0000207     -1.40    0.163     -.0000694     .0000117
       illw2 |    .4876542    .2119789      2.30    0.021      .0721831     .9031252
      shhlw2 |    .0088288    .0036112      2.44    0.014      .0017511     .0159066
avgcumdosew2 |    .0118366    .0475514      0.25    0.803     -.0813624     .1050355
       _cons |   -3.658274    .6492228     -5.63    0.000     -4.930727    -2.385821
-------------+----------------------------------------------------------------

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         6             5  |         11
     -     |        64           265  |        329
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    8.57%
Specificity                     Pr( -|~D)   98.15%
Positive predictive value       Pr( D| +)   54.55%
Negative predictive value       Pr(~D| -)   80.55%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.85%
False - rate for true D         Pr( -| D)   91.43%
False + rate for classified +   Pr(~D| +)   45.45%
False - rate for classified -   Pr( D| -)   19.45%
--------------------------------------------------
Correctly classified                        79.71%
--------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       311
            Pearson chi2(305) =       333.90
                  Prob > chi2 =         0.1226

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -159.407
D(334):                      318.815     LR(5):                        26.931
                                         Prob > LR:                     0.000
McFadden's R2:                 0.078     McFadden's Adj R2:             0.043
Maximum Likelihood R2:         0.076     Cragg & Uhler's R2:            0.119
McKelvey and Zavoina's R2:     0.136     Efron's R2:                    0.088
Variance of y*:                3.807     Variance of error:             3.290
Count R2:                      0.797     Adj Count R2:                  0.014
AIC:                           0.973     AIC*n:                       330.815
BIC:                       -1628.053     BIC':                          2.214

. // HP2work for men washes out   no dose impact
.
. scalar SigDoseWkFw2 = "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, illw2 shjobw2
. * male main effects model avgcumdosew2 was not signif.
. * male hp2wk w2  mediators: age illw2 ageXillw2 bf8
. * female signif main effects in main effects model
. * female hp2wk w2 mediators: radhlw2 age bf1 bf4 bf4m
. *  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 HP2wkMw2 = J(1,8, 0)

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

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

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

.     matrix rownames HP2wkMw2 = workM

.     matrix rownames HP2wkFw2 = workF

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

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

.
.         matrix define H1pt2w2 = (HP2wkMw2 \ HP2wkFw2)

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

.     matrix rownames H1pt2w2 = HP2wkMw2 WHP2wkFw2

.     matlist H1pt2w2

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

.
. scalar SigDoseWKMw2 = "no"

. scalar MainEffwkMw2 = "workM: age  bf8  illw2  shjobw2"

.
. scalar list `MainEffwkMw2'
  wkMedMw2 = bf8 age illw2
VactnMedFw2 = age illw2 radhlw2
VactnMedMw2 = age illw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 deaw2
SigDoseVactnFw2 = no
vactnModMw2 = none
MainEffVactnMw2 = age bf7m radhlw2
SigDoseVactnMw2 = no
sxLifeMedFw2 = age bf4 bf4m
sxLifeMedMw2 = age illw2
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
  InthbMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
sxlifeMedMw2 = age illw2
sxlifeModFw2 = none
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m shrelaw2 shfamw2
SigDoseSxlifeFw2 = no
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
MainEffsxlifeMw2 = age bf4 illw2 radhlw2
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf1 bf4 dvcew2 bf7m
ProbsocMedFw2 = age radhlw2
ProbsocMedMw2 = age
ProbsocModFw2 = none
MainEffProbSocFw2 = age radhlw2 illw2 Shrelaw2 avgcumodsew2
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
MainEffPrbsocMw2 = age radhlw2 shjobw2
hmcareMedFw2 = age illw2
hmcareMedMw2 = age illw2
hmcareModFw2 = none
SigDoseWKFw2 =          0
SigdoseHmcareFw2 = no
hmcareModMw2 = none
MainEffhmcareMw2 = none
SigDoseHmcareMw2 = no
  wkMedFw2 = radhlw2 age bf40 bf4m bf1
  wkModFw2 = none
  wkModMw2 = none
MainEffwkFw2 = age
MainEffwkMw2 = workM: age  bf8  illw2  shjobw2
SigDoseWKMw2 = no
SigDoseWkFw2 = no
hmcrMedFw1 = age icdxcnt shjobw1 bf4 BSIsoma WHPpain WHPsleep WHPel
hmcrMedMw1 = age
MainEffhmcrFw1 = illw1 age
SigDosehmcrFw1 = no
hmcrModMw1 = none
MainEffhmcrMw1 = age shjobw1
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
MainEffwkFw1 = age
MainEffwkMw1 = age
  wkMedMw1 = bf40
  WkMedMw1 = none
  WkModFw1 = none
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
 medsigFw1 =          1
prbsocnumMAsig =          8

.
. * moderator construction
. * none ussed because basic dose work relationship washes out
.
. sem(avgcumdosew2->bf4)(bf4->hp2work) ///
>   (avgcumdosew2->bf4m)(bf4m->hp2work)(avgcumdosew2->hp2work) if gender==2, nocapslatent

Endogenous variables


Observed:  bf4 hp2work bf4m


Exogenous variables


Observed:  avgcumdosew2


Fitting target model:

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

Structural equation model                       Number of obs      =       363
 Estimation method = ml
 Log likelihood    = -3065.5103

-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
 Structural       |
   bf4 <-         |
    avgcumdosew2 |    -.595012    .1955294     -3.04    0.002     -.9782426    -.2117813
           _cons |    11.02048     .321487     34.28    0.000      10.39037     11.65058
  ---------------+----------------------------------------------------------------
   hp2work <-     |
             bf4 |   -.1104133    .0240718     -4.59    0.000     -.1575931    -.0632334
            bf4m |    .0772012    .0220571      3.50    0.000        .03397     .1204324
    avgcumdosew2 |    .0267414    .0155054      1.72    0.085     -.0036486     .0571315
           _cons |    -.022371    .1624855     -0.14    0.890     -.3408367     .2960947
  ---------------+----------------------------------------------------------------
   bf4m <-        |
    avgcumdosew2 |    -.599311    .2133886     -2.81    0.005     -1.017545    -.1810771
           _cons |    18.83424    .3508508     53.68    0.000      18.14659      19.5219
-----------------+----------------------------------------------------------------
 Variance         |
           e.bf4 |    26.38663    1.958599                    22.81402     30.51869
       e.hp2work |    .1612644    .0119702                      .13943     .1865179
          e.bf4m |    31.42693    2.332725                    27.17189     36.34829
-----------------+----------------------------------------------------------------
LR test of model vs. saturated: chi2(1)   =   1284.49, Prob > chi2 = 0.0000

. estat teffects, standardize


Direct effects
-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|             Std. Coef.
-----------------+----------------------------------------------------------------
 Structural       |
   bf4 <-         |
    avgcumdosew2 |    -.595012    .1955294     -3.04    0.002            -.1577212
  ---------------+----------------------------------------------------------------
   hp2work <-     |
             bf4 |   -.1104133    .0240718     -4.59    0.000            -.6994476
            bf4m |    .0772012    .0220571      3.50    0.000             .5327398
    avgcumdosew2 |    .0267414    .0155054      1.72    0.085             .0449038
  ---------------+----------------------------------------------------------------
   bf4m <-        |
    avgcumdosew2 |    -.599311    .2133886     -2.81    0.005            -.1458343
-----------------+----------------------------------------------------------------


Indirect effects
-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|             Std. Coef.
-----------------+----------------------------------------------------------------
 Structural       |
   bf4 <-         |
    avgcumdosew2 |           0   (no path)                                       0
  ---------------+----------------------------------------------------------------
   hp2work <-     |
             bf4 |           0   (no path)                                       0
            bf4m |           0   (no path)                                       0
    avgcumdosew2 |    .0194297    .0272807      0.71    0.476              .032626
  ---------------+----------------------------------------------------------------
   bf4m <-        |
    avgcumdosew2 |           0   (no path)                                       0
-----------------+----------------------------------------------------------------


Total effects
-----------------+----------------------------------------------------------------
                 |                 OIM
                 |      Coef.    Std. Err.       z    P>|z|             Std. Coef.
-----------------+----------------------------------------------------------------
 Structural       |
   bf4 <-         |
    avgcumdosew2 |    -.595012    .1955294     -3.04    0.002            -.1577212
  ---------------+----------------------------------------------------------------
   hp2work <-     |
             bf4 |   -.1104133    .0240718     -4.59    0.000            -.6994476
            bf4m |    .0772012    .0220571      3.50    0.000             .5327398
    avgcumdosew2 |    .0461711     .031163      1.48    0.138             .0775298
  ---------------+----------------------------------------------------------------
   bf4m <-        |
    avgcumdosew2 |    -.599311    .2133886     -2.81    0.005            -.1458343
-----------------+----------------------------------------------------------------

.
.
.
. title4 "testing female hp2work main effects for hypothesis 1 pt 2 wave 2"
-------------
testing female hp2work main effects for hypothesis 1 pt 2 wave 2
-------------

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

. set more off

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

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==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: marrw24 != 0 predicts success perfectly
      marrw24 dropped and 1 obs not used


Logistic regression                               Number of obs   =        362
                                                  LR chi2(10)     =      48.81
                                                  Prob > chi2     =     0.0000
Log likelihood = -180.79074                       Pseudo R2       =     0.1189

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     marrw23 |    .3465168    .4485933      0.77    0.440       -.53271     1.225743
     marrw24 |           0   (omitted)
     marrw25 |    .1476199    .8212357      0.18    0.857     -1.461973     1.757212
     marrw26 |    1.010731    .7069238      1.43    0.153     -.3748139     2.396276
         age |    .0569149    .0131729      4.32    0.000      .0310966     .0827332
    havmilsq |   -8.40e-07    1.31e-06     -0.64    0.520     -3.40e-06     1.72e-06
avgcumdosew2 |     .112931    .0849282      1.33    0.184     -.0535252     .2793872
         bf8 |   -8.51e-07    .0000122     -0.07    0.944     -.0000247      .000023
       illw2 |    .2083243    .1431057      1.46    0.145     -.0721576     .4888063
     shjobw2 |   -.0000502    .0033727     -0.01    0.988     -.0066606     .0065603
     suprtw2 |    .0007776    .0033741      0.23    0.818     -.0058355     .0073907
       _cons |   -4.607688    .7503726     -6.14    0.000     -6.078391    -3.136985
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       360
            Pearson chi2(349) =       381.32
                  Prob > chi2 =         0.1127

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        21             7  |         28
     -     |        71           263  |        334
-----------+--------------------------+-----------
   Total   |        92           270  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   22.83%
Specificity                     Pr( -|~D)   97.41%
Positive predictive value       Pr( D| +)   75.00%
Negative predictive value       Pr(~D| -)   78.74%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.59%
False - rate for true D         Pr( -| D)   77.17%
False + rate for classified +   Pr(~D| +)   25.00%
False - rate for classified -   Pr( D| -)   21.26%
--------------------------------------------------
Correctly classified                        78.45%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -205.197     Log-Lik Full Model:         -180.791
D(350):                      361.581     LR(10):                       48.812
                                         Prob > LR:                     0.000
McFadden's R2:                 0.119     McFadden's Adj R2:             0.060
Maximum Likelihood R2:         0.126     Cragg & Uhler's R2:            0.186
McKelvey and Zavoina's R2:     0.242     Efron's R2:                    0.149
Variance of y*:                4.341     Variance of error:             3.290
Count R2:                      0.785     Adj Count R2:                  0.152
AIC:                           1.065     AIC*n:                       385.581
BIC:                       -1700.494     BIC':                         10.104

.
.
. // female wave 2 homcare washes out
.
.
.
. scalar MainEffwkFw2 = "age"

. scalar SigDoseWKFw2 = 0

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

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==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: marrw24 != 0 predicts failure perfectly
      marrw24 dropped and 3 obs not used


Logistic regression                               Number of obs   =        337
                                                  LR chi2(10)     =      28.86
                                                  Prob > chi2     =     0.0013
Log likelihood = -157.74569                       Pseudo R2       =     0.0838

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     marrw23 |   -.4766426    .3747451     -1.27    0.203      -1.21113     .2578444
     marrw24 |           0   (omitted)
     marrw25 |    .4073573     .955349      0.43    0.670     -1.465092     2.279807
     marrw26 |   -.9721074    1.293416     -0.75    0.452     -3.507156     1.562941
         age |    .0477474    .0139539      3.42    0.001      .0203982     .0750965
    havmilsq |   -2.10e-07    1.49e-06     -0.14    0.888     -3.12e-06     2.70e-06
avgcumdosew2 |    .0155478     .048524      0.32    0.749     -.0795575     .1106532
         bf8 |   -.0000302    .0000209     -1.45    0.148     -.0000712     .0000107
       illw2 |    .5115257    .2184297      2.34    0.019      .0834114     .9396399
     shjobw2 |    .0088647    .0037067      2.39    0.017      .0015997     .0161296
     suprtw2 |   -.0044167    .0036236     -1.22    0.223     -.0115188     .0026855
       _cons |   -3.748494    .6958591     -5.39    0.000     -5.112352    -2.384635
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       337
 number of covariate patterns =       332
            Pearson chi2(321) =       336.79
                  Prob > chi2 =         0.2612

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         6             3  |          9
     -     |        64           264  |        328
-----------+--------------------------+-----------
   Total   |        70           267  |        337

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    8.57%
Specificity                     Pr( -|~D)   98.88%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   80.49%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.12%
False - rate for true D         Pr( -| D)   91.43%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)   19.51%
--------------------------------------------------
Correctly classified                        80.12%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -172.178     Log-Lik Full Model:         -157.746
D(325):                      315.491     LR(10):                       28.864
                                         Prob > LR:                     0.001
McFadden's R2:                 0.084     McFadden's Adj R2:             0.014
Maximum Likelihood R2:         0.082     Cragg & Uhler's R2:            0.128
McKelvey and Zavoina's R2:     0.142     Efron's R2:                    0.099
Variance of y*:                3.835     Variance of error:             3.290
Count R2:                      0.801     Adj Count R2:                  0.043
AIC:                           1.007     AIC*n:                       339.491
BIC:                       -1576.036     BIC':                         29.336

. forvalues j=2/2 {
  2. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. set more off
  4. di as input "For females trimmed HP2work on wave 2 with dose ns"
  5.         des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' bf8 ///
>            marrw`j'1-marrw`j'6  `w2bf'
  6.         logistic HP2work  age  ///
>                 avgcumdosew2 bf8 illw`j' shjobw`j' radhlw`j' if gender==1, coef nolog
  7.         estat gof
  8.         estat class
  9.         fitstat
 10.         }
For females trimmed HP2work on wave 2 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==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)


Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      34.24
                                                  Prob > chi2     =     0.0000
Log likelihood = -155.75258                       Pseudo R2       =     0.0990

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0279967    .0125982      2.22    0.026      .0033047     .0526886
avgcumdosew2 |    .0093245    .0489486      0.19    0.849     -.0866129     .1052619
         bf8 |   -.0000433    .0000214     -2.03    0.043     -.0000852    -1.44e-06
       illw2 |     .503088    .2180574      2.31    0.021      .0757033     .9304727
     shjobw2 |    .0054505    .0037374      1.46    0.145     -.0018746     .0127756
     radhlw2 |    .0133173    .0044637      2.98    0.003      .0045685      .022066
       _cons |    -3.81568    .6836898     -5.58    0.000     -5.155688    -2.475673
-------------+----------------------------------------------------------------


Logistic model for HP2work, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       332
            Pearson chi2(325) =       343.93
                  Prob > chi2 =         0.2252

Logistic model for HP2work

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         6             5  |         11
     -     |        64           265  |        329
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2work != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    8.57%
Specificity                     Pr( -|~D)   98.15%
Positive predictive value       Pr( D| +)   54.55%
Negative predictive value       Pr(~D| -)   80.55%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.85%
False - rate for true D         Pr( -| D)   91.43%
False + rate for classified +   Pr(~D| +)   45.45%
False - rate for classified -   Pr( D| -)   19.45%
--------------------------------------------------
Correctly classified                        79.71%
--------------------------------------------------

Measures of Fit for logistic of HP2work

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -155.753
D(333):                      311.505     LR(6):                        34.241
                                         Prob > LR:                     0.000
McFadden's R2:                 0.099     McFadden's Adj R2:             0.059
Maximum Likelihood R2:         0.096     Cragg & Uhler's R2:            0.150
McKelvey and Zavoina's R2:     0.170     Efron's R2:                    0.114
Variance of y*:                3.963     Variance of error:             3.290
Count R2:                      0.797     Adj Count R2:                  0.014
AIC:                           0.957     AIC*n:                       325.505
BIC:                       -1629.534     BIC':                          0.733

.
. //  female trimmed dose work washes out with does not signif.
.
.
.
.
. forvalues j=2/2 {
  2. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. set more off
  4. di as input "Full females HPprobsoc on wave 2 with dose ns"
  5.         des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' bf8 ///
>            marrw`j'1-marrw`j'6 radhlw`j' `w2bf'
  6.         logistic HP2probsoc marrw`j'3-marrw`j'6 age  havmilsq  radhlw2 ///
>                 avgcumdosew2 bf8 illw`j' shjobw`j' suprtw`j' if gender==1, coef nolog
  7.         estat gof
  8.         estat class
  9.         fitstat
 10.         }
Full females HPprobsoc on wave 2 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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: marrw24 != 0 predicts failure perfectly
      marrw24 dropped and 3 obs not used

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


Logistic regression                               Number of obs   =        333
                                                  LR chi2(10)     =      62.55
                                                  Prob > chi2     =     0.0000
Log likelihood = -92.970187                       Pseudo R2       =     0.2517

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     marrw23 |   -.3736488    .5239634     -0.71    0.476     -1.400598     .6533007
     marrw24 |           0   (omitted)
     marrw25 |    .3178572    1.386011      0.23    0.819     -2.398675     3.034389
     marrw26 |           0   (omitted)
         age |     .068219    .0199083      3.43    0.001      .0291995     .1072385
    havmilsq |   -1.61e-06    5.43e-06     -0.30    0.767     -.0000122     9.03e-06
     radhlw2 |    .0237245    .0062836      3.78    0.000      .0114089     .0360402
avgcumdosew2 |    .0249392    .0537004      0.46    0.642     -.0803117     .1301901
         bf8 |   -.0000369    .0000244     -1.51    0.130     -.0000846     .0000109
       illw2 |    .4654847    .2879266      1.62    0.106      -.098841      1.02981
     shjobw2 |     .013417    .0052952      2.53    0.011      .0030386     .0237954
     suprtw2 |    .0027116    .0050363      0.54    0.590     -.0071593     .0125825
       _cons |   -7.790191    1.174345     -6.63    0.000     -10.09186    -5.488517
-------------+----------------------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       333
 number of covariate patterns =       331
            Pearson chi2(320) =       376.50
                  Prob > chi2 =         0.0162

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        11             4  |         15
     -     |        30           288  |        318
-----------+--------------------------+-----------
   Total   |        41           292  |        333

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   26.83%
Specificity                     Pr( -|~D)   98.63%
Positive predictive value       Pr( D| +)   73.33%
Negative predictive value       Pr(~D| -)   90.57%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.37%
False - rate for true D         Pr( -| D)   73.17%
False + rate for classified +   Pr(~D| +)   26.67%
False - rate for classified -   Pr( D| -)    9.43%
--------------------------------------------------
Correctly classified                        89.79%
--------------------------------------------------

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -124.243     Log-Lik Full Model:          -92.970
D(320):                      185.940     LR(10):                       62.545
                                         Prob > LR:                     0.000
McFadden's R2:                 0.252     McFadden's Adj R2:             0.147
Maximum Likelihood R2:         0.171     Cragg & Uhler's R2:            0.326
McKelvey and Zavoina's R2:     0.420     Efron's R2:                    0.243
Variance of y*:                5.673     Variance of error:             3.290
Count R2:                      0.898     Adj Count R2:                  0.171
AIC:                           0.636     AIC*n:                       211.940
BIC:                       -1672.665     BIC':                         -4.464

.
. forvalues j=2/2 {
  2. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. set more off
  4. di as input "females trimmed HP2probsoc on wave 2 with dose ns"
  5.         des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' bf8 ///
>            marrw`j'1-marrw`j'6  `w2bf'
  6.         logistic HP2probsoc  age  ///
>                 avgcumdosew2 bf8 illw`j' shjobw`j' radhlw`j' if gender==1, coef nolog
  7.         estat gof
  8.         estat class
  9.         fitstat
 10.         }
females trimmed HP2probsoc on wave 2 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==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)


Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      60.41
                                                  Prob > chi2     =     0.0000
Log likelihood = -94.948223                       Pseudo R2       =     0.2413

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0592362    .0176148      3.36    0.001      .0247118     .0937607
avgcumdosew2 |    .0315514    .0525591      0.60    0.548     -.0714626     .1345653
         bf8 |   -.0000332    .0000239     -1.39    0.165     -.0000801     .0000136
       illw2 |    .5251102    .2757549      1.90    0.057     -.0153594      1.06558
     shjobw2 |    .0135312    .0051744      2.62    0.009      .0033897     .0236728
     radhlw2 |    .0242757     .006237      3.89    0.000      .0120514        .0365
       _cons |   -7.543673    1.131417     -6.67    0.000      -9.76121    -5.326137
-------------+----------------------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       332
            Pearson chi2(325) =       382.40
                  Prob > chi2 =         0.0155

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        12             3  |         15
     -     |        29           296  |        325
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   29.27%
Specificity                     Pr( -|~D)   99.00%
Positive predictive value       Pr( D| +)   80.00%
Negative predictive value       Pr(~D| -)   91.08%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.00%
False - rate for true D         Pr( -| D)   70.73%
False + rate for classified +   Pr(~D| +)   20.00%
False - rate for classified -   Pr( D| -)    8.92%
--------------------------------------------------
Correctly classified                        90.59%
--------------------------------------------------

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -94.948
D(333):                      189.896     LR(6):                        60.408
                                         Prob > LR:                     0.000
McFadden's R2:                 0.241     McFadden's Adj R2:             0.185
Maximum Likelihood R2:         0.163     Cragg & Uhler's R2:            0.312
McKelvey and Zavoina's R2:     0.420     Efron's R2:                    0.235
Variance of y*:                5.669     Variance of error:             3.290
Count R2:                      0.906     Adj Count R2:                  0.220
AIC:                           0.600     AIC*n:                       203.896
BIC:                       -1751.142     BIC':                        -25.435

.
. //  female trimmed dose work washes out with does not signif.
.
.
.
.
.
.
. 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 w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40

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

Iteration 0:   log likelihood = -1551.9176

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

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

                                                   AIC             =  9.140692
Log likelihood   = -1551.917557                    BIC             =  181534.5

-------------+----------------------------------------------------------------
             |                 OIM
          bf1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0294245    .5053831     -0.06    0.954     -1.019957     .9611082
       _cons |    32.06654    1.353933     23.68    0.000      29.41288      34.7202
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  327.3468
Iteration 2:   deviance =  326.8667
Iteration 3:   deviance =  326.8661
Iteration 4:   deviance =  326.8661

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  326.8660563                    (1/df) Deviance =  .9728156
Pearson          =  340.1753181                    (1/df) Pearson  =  1.012427

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

                                                   BIC             =  -1631.66

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf1 |    .0109044    .0035032      3.11    0.002      .0040382     .0177705
       illw2 |    .2657677    .1244152      2.14    0.033      .0219184      .509617
avgcumdosew2 |    .0146157    .0285488      0.51    0.609      -.041339     .0705704
       _cons |   -1.302985    .1496632     -8.71    0.000      -1.59632    -1.009651
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1027.1225

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

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

                                                   AIC             =  6.053662
Log likelihood   = -1027.122509                    BIC             =  6404.476

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0331637    .1079644     -0.31    0.759     -.2447701     .1784427
       _cons |    12.52896    .2892393     43.32    0.000      11.96206     13.09586
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  300.9022
Iteration 2:   deviance =  299.8184
Iteration 3:   deviance =  299.8108
Iteration 4:   deviance =  299.8108
Iteration 5:   deviance =  299.8108

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  299.8108296                    (1/df) Deviance =  .8922941
Pearson          =  319.1468848                    (1/df) Pearson  =  .9498419

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

                                                   BIC             = -1658.715

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0960279    .0152223     -6.31    0.000      -.125863    -.0661928
       illw2 |    .1615525    .1227138      1.32    0.188     -.0789623     .4020672
avgcumdosew2 |    .0143706    .0276919      0.52    0.604     -.0399044     .0686457
       _cons |    .2173252     .204472      1.06    0.288     -.1834325     .6180829
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3110.6399

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

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

                                                   AIC             =  18.30965
Log likelihood   = -3110.639872                    BIC             =  1.76e+09

-------------+----------------------------------------------------------------
             |                 OIM
          bf2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -36.03645    49.50328     -0.73    0.467     -133.0611      60.9882
       _cons |    1976.708    132.6205     14.91    0.000      1716.777      2236.64
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  326.2564
Iteration 2:   deviance =  326.0185
Iteration 3:   deviance =  326.0184
Iteration 4:   deviance =  326.0184

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  326.0184207                    (1/df) Deviance =  .9702929
Pearson          =  340.5103126                    (1/df) Pearson  =  1.013424

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

                                                   BIC             = -1632.507

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf2 |    .0001126    .0000342      3.29    0.001      .0000456     .0001797
       illw2 |    .2301304    .1264315      1.82    0.069     -.0176708     .4779317
avgcumdosew2 |    .0207807    .0278478      0.75    0.456        -.0338     .0753614
       _cons |   -1.166294    .1149488    -10.15    0.000     -1.391589    -.9409983
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1060.7791

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

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

                                                   AIC             =  6.251642
Log likelihood   = -1060.779096                    BIC             =  8238.006

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0266037    .1191987     -0.22    0.823     -.2602289     .2070215
       _cons |    20.34324    .3193362     63.70    0.000      19.71735     20.96913
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  303.3546
Iteration 2:   deviance =  302.5908
Iteration 3:   deviance =   302.587
Iteration 4:   deviance =   302.587
Iteration 5:   deviance =   302.587

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  302.5870341                    (1/df) Deviance =  .9005566
Pearson          =  319.7148309                    (1/df) Pearson  =  .9515322

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

                                                   BIC             = -1655.939

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.0822373    .0137721     -5.97    0.000     -.1092302    -.0552444
       illw2 |    .1770621    .1226767      1.44    0.149     -.0633798     .4175039
avgcumdosew2 |    .0150542    .0276105      0.55    0.586     -.0390613     .0691697
       _cons |     .694465    .2897107      2.40    0.017      .1266424     1.262288
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2273.2523

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

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

                                                   AIC             =  13.38384
Log likelihood   = -2273.252279                    BIC             =  1.28e+07

-------------+----------------------------------------------------------------
             |                 OIM
         bf5m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    9.243905    4.217043      2.19    0.028      .9786526     17.50916
       _cons |    104.6228    11.29756      9.26    0.000      82.47996     126.7656
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  336.3745
Iteration 2:   deviance =  336.2755
Iteration 3:   deviance =  336.2754
Iteration 4:   deviance =  336.2754

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  336.2754021                    (1/df) Deviance =   1.00082
Pearson          =  339.5058665                    (1/df) Pearson  =  1.010434

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

                                                   BIC             =  -1622.25

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf5m |   -.0001044     .000414     -0.25    0.801     -.0009159      .000707
       illw2 |    .3706764    .1252132      2.96    0.003      .1252631     .6160898
avgcumdosew2 |    .0147823    .0283632      0.52    0.602     -.0408084     .0703731
       _cons |   -.9460378    .0985679     -9.60    0.000     -1.139227    -.7528483
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2733.8869

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

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

                                                   AIC             =  16.09345
Log likelihood   = -2733.886934                    BIC             =  1.92e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf7m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    9.152801    16.34533      0.56    0.576     -22.88345     41.18905
       _cons |    1025.425    43.78952     23.42    0.000      939.5992     1111.251
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  336.2763
Iteration 2:   deviance =  336.1772
Iteration 3:   deviance =  336.1772
Iteration 4:   deviance =  336.1772

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   336.177176                    (1/df) Deviance =  1.000527
Pearson          =  339.9627414                    (1/df) Pearson  =  1.011794

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

                                                   BIC             = -1622.349

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf7m |   -.0000423     .000105     -0.40    0.687     -.0002481     .0001634
       illw2 |    .3607427    .1214759      2.97    0.003      .1226542     .5988312
avgcumdosew2 |     .014265    .0281752      0.51    0.613     -.0409575     .0694874
       _cons |    -.910979    .1415067     -6.44    0.000     -1.188327     -.633631
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3529.9433

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

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

                                                   AIC             =  20.77614
Log likelihood   = -3529.943345                    BIC             =  2.07e+10

-------------+----------------------------------------------------------------
             |                 OIM
          bf8 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    357.2422    169.9126      2.10    0.036       24.2195     690.2648
       _cons |    2822.831       455.2      6.20    0.000      1930.655     3715.006
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  335.4034
Iteration 2:   deviance =  335.2271
Iteration 3:   deviance =  335.2265
Iteration 4:   deviance =  335.2265
Iteration 5:   deviance =  335.2265

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  335.2264779                    (1/df) Deviance =  .9976979
Pearson          =   338.675469                    (1/df) Pearson  =  1.007963

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

                                                   BIC             = -1623.299

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf8 |   -.0000115    .0000109     -1.05    0.292     -.0000329     9.89e-06
       illw2 |    .3835488    .1226954      3.13    0.002      .1430703     .6240273
avgcumdosew2 |    .0178965    .0281831      0.64    0.525     -.0373414     .0731343
       _cons |   -.9311558    .0948074     -9.82    0.000     -1.116975    -.7453367
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2696.8707

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

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

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

-------------+----------------------------------------------------------------
             |                 OIM
        bf15m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -3.877137    14.65924     -0.26    0.791     -32.60872     24.85444
       _cons |    115.2001    39.27245      2.93    0.003      38.22751     192.1727
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  336.3366
Iteration 2:   deviance =  336.2425
Iteration 3:   deviance =  336.2425
Iteration 4:   deviance =  336.2425

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  336.2424662                    (1/df) Deviance =  1.000722
Pearson          =  339.8130547                    (1/df) Pearson  =  1.011348

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

                                                   BIC             = -1622.283

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       bf15m |    .0000349    .0001107      0.32    0.752      -.000182     .0002518
       illw2 |    .3640012    .1216115      2.99    0.003      .1256471     .6023553
avgcumdosew2 |    .0139566    .0282099      0.49    0.621     -.0413337     .0692469
       _cons |   -.9590254    .0937715    -10.23    0.000     -1.142814    -.7752366
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3469.0038

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

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

                                                   AIC             =  20.41767
Log likelihood   = -3469.003753                    BIC             =  1.45e+10

-------------+----------------------------------------------------------------
             |                 OIM
         bf17 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -16.67211    142.0317     -0.12    0.907     -295.0491     261.7049
       _cons |    429.2726    380.5063      1.13    0.259     -316.5061     1175.051
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  336.1233
Iteration 2:   deviance =   335.855
Iteration 3:   deviance =  335.7482
Iteration 4:   deviance =  335.4893
Iteration 5:   deviance =   335.046
Iteration 6:   deviance =  334.8623
Iteration 7:   deviance =  334.7646
Iteration 8:   deviance =  334.7046
Iteration 9:   deviance =  334.6492
Iteration 10:  deviance =  334.5367
Iteration 11:  deviance =   334.466
Iteration 12:  deviance =  334.4424
Iteration 13:  deviance =  334.4338
Iteration 14:  deviance =  334.4305
Iteration 15:  deviance =   334.429
Iteration 16:  deviance =  334.4282
Iteration 17:  deviance =  334.4278
Iteration 18:  deviance =  334.4276
Iteration 19:  deviance =  334.4274
Iteration 20:  deviance =  334.4273
Iteration 21:  deviance =  334.4272
Iteration 22:  deviance =  334.4271
Iteration 23:  deviance =  334.4271
Iteration 24:  deviance =  334.4271
Iteration 25:  deviance =   334.427
Iteration 26:  deviance =   334.427
Iteration 27:  deviance =   334.427
Iteration 28:  deviance =  334.4269
Iteration 29:  deviance =  334.4269
Iteration 30:  deviance =  334.4269
Iteration 31:  deviance =  334.4269
Iteration 32:  deviance =  334.4269
Iteration 33:  deviance =  334.4269
Iteration 34:  deviance =  334.4269
Iteration 35:  deviance =  334.4269
Iteration 36:  deviance =  334.4269
Iteration 37:  deviance =  334.4269
Iteration 38:  deviance =  334.4268
Iteration 39:  deviance =  334.4268
Iteration 40:  deviance =  334.4268
Iteration 41:  deviance =  334.4268
Iteration 42:  deviance =  334.4268
Iteration 43:  deviance =  334.4268
Iteration 44:  deviance =  334.4268
Iteration 45:  deviance =  334.4268
Iteration 46:  deviance =  334.4268
Iteration 47:  deviance =  334.4268
Iteration 48:  deviance =  334.4268
Iteration 49:  deviance =  334.4268
Iteration 50:  deviance =  334.4268
Iteration 51:  deviance =  334.4268
Iteration 52:  deviance =  334.4268
Iteration 53:  deviance =  334.4268
Iteration 54:  deviance =  334.4268
Iteration 55:  deviance =  334.4268
Iteration 56:  deviance =  334.4268
Iteration 57:  deviance =  334.4268
Iteration 58:  deviance =  334.4268
Iteration 59:  deviance =  334.4268
Iteration 60:  deviance =  334.4268
Iteration 61:  deviance =  334.4268
Iteration 62:  deviance =  334.4268
Iteration 63:  deviance =  334.4268
Iteration 64:  deviance =  334.4268
Iteration 65:  deviance =  334.4268
Iteration 66:  deviance =  334.4268
Iteration 67:  deviance =  334.4268
Iteration 68:  deviance =  334.4268

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   334.426778                    (1/df) Deviance =  .9953178
Pearson          =  334.5406031                    (1/df) Pearson  =  .9956566

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

                                                   BIC             = -1624.099

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf17 |   -.0063351    .0141649     -0.45    0.655     -.0340978     .0214276
       illw2 |    .3553446    .1212371      2.93    0.003      .1177242     .5929649
avgcumdosew2 |    .0135183      .02812      0.48    0.631     -.0415959     .0686325
       _cons |   -.9421698    .0926941    -10.16    0.000     -1.123847    -.7604927
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1596.6381

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

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

                                                   AIC             =  9.403754
Log likelihood   = -1596.638134                    BIC             =  236752.4

-------------+----------------------------------------------------------------
             |                 OIM
         bf20 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.1996497    .5764265     -0.35    0.729     -1.329425     .9301255
       _cons |    70.37734     1.54426     45.57    0.000      67.35065     73.40404
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  326.4244
Iteration 2:   deviance =  325.6691
Iteration 3:   deviance =  325.6663
Iteration 4:   deviance =  325.6663
Iteration 5:   deviance =  325.6663

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  325.6663467                    (1/df) Deviance =  .9692451
Pearson          =  338.4324666                    (1/df) Pearson  =  1.007239

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

                                                   BIC             = -1632.859

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf20 |    .0104867    .0032097      3.27    0.001      .0041958     .0167776
       illw2 |    .2668849    .1239534      2.15    0.031      .0239406     .5098291
avgcumdosew2 |    .0159959    .0289453      0.55    0.581     -.0407358     .0727275
       _cons |   -1.696899    .2514028     -6.75    0.000     -2.189639    -1.204158
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3143.8431

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

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

                                                   AIC             =  18.50496
Log likelihood   =  -3143.84315                    BIC             =  2.14e+09

-------------+----------------------------------------------------------------
             |                 OIM
         bf22 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    69.44601    54.58153      1.27    0.203     -37.53183     176.4239
       _cons |    2129.507    146.2252     14.56    0.000      1842.911     2416.103
-------------+----------------------------------------------------------------

Iteration 1:   deviance =   329.663
Iteration 2:   deviance =  329.5329
Iteration 3:   deviance =  329.5327
Iteration 4:   deviance =  329.5327

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  329.5326856                    (1/df) Deviance =   .980752
Pearson          =  336.2324364                    (1/df) Pearson  =  1.000692

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

                                                   BIC             = -1628.993

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf22 |    .0000783    .0000296      2.64    0.008      .0000202     .0001364
       illw2 |    .3005113    .1241463      2.42    0.015      .0571889     .5438337
avgcumdosew2 |    .0091767    .0283699      0.32    0.746     -.0464273     .0647808
       _cons |   -1.120001    .1128358     -9.93    0.000     -1.341155    -.8988465
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3683.6132

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

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

                                                   AIC             =  21.68008
Log likelihood   = -3683.613157                    BIC             =  5.12e+10

-------------+----------------------------------------------------------------
             |                 OIM
         bf29 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    82.80099    267.0015      0.31    0.756     -440.5124     606.1144
       _cons |    1325.352    715.3035      1.85    0.064     -76.61736     2727.321
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  336.3754
Iteration 2:   deviance =  336.2738
Iteration 3:   deviance =  336.2737
Iteration 4:   deviance =  336.2737

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   336.273687                    (1/df) Deviance =  1.000815
Pearson          =   339.164143                    (1/df) Pearson  =  1.009417

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

                                                   BIC             = -1622.252

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf29 |    1.48e-06    5.82e-06      0.25    0.799     -9.92e-06     .0000129
       illw2 |    .3622929    .1215962      2.98    0.003      .1239688      .600617
avgcumdosew2 |    .0137461     .028224      0.49    0.626     -.0415719     .0690641
       _cons |   -.9567327     .092818    -10.31    0.000     -1.138653    -.7748128
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2661.1745

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

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

                                                   AIC             =  15.66573
Log likelihood   = -2661.174486                    BIC             =  1.25e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf30 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -9.387797    13.19822     -0.71    0.477     -35.25583     16.48024
       _cons |    497.7068    35.35834     14.08    0.000      428.4057     567.0079
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  331.3314
Iteration 2:   deviance =  331.1891
Iteration 3:   deviance =  331.1888
Iteration 4:   deviance =  331.1888

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  331.1888247                    (1/df) Deviance =   .985681
Pearson          =  342.2972093                    (1/df) Pearson  =  1.018742

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

                                                   BIC             = -1627.337

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf30 |    .0002835    .0001242      2.28    0.022      .0000401     .0005269
       illw2 |    .3537185    .1220211      2.90    0.004      .1145615     .5928754
avgcumdosew2 |    .0172486    .0281673      0.61    0.540     -.0379583     .0724554
       _cons |   -1.105489    .1160104     -9.53    0.000     -1.332866    -.8781133
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -659.07396

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

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

                                                   AIC             =   3.88867
Log likelihood   = -659.0739647                    BIC             = -1009.184

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .0482004    .0365729      1.32    0.188     -.0234811     .1198818
       _cons |    2.097753    .0979795     21.41    0.000      1.905716     2.289789
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  315.0711
Iteration 2:   deviance =   314.451
Iteration 3:   deviance =  314.4494
Iteration 4:   deviance =  314.4494

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  314.4493978                    (1/df) Deviance =  .9358613
Pearson          =  332.2461013                    (1/df) Pearson  =  .9888277

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

                                                   BIC             = -1644.076

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .2308417    .0484278      4.77    0.000      .1359249     .3257585
       illw2 |    .1331906    .1291807      1.03    0.303     -.1199989     .3863801
avgcumdosew2 |    .0062786    .0280086      0.22    0.823     -.0486172     .0611743
       _cons |   -1.427269    .1387712    -10.29    0.000     -1.699256    -1.155283
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. **** male mediators of dose paid employment: bf8, age, illw2 ageXillw2
. scalar wkMedMw2 = "bf8 age illw2 "

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

. glm radhlw2 avgcumdosew2 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1791.2233

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

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

                                                   AIC             =  9.880018
Log likelihood   = -1791.223306                    BIC             =  408533.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    3.302288    1.283833      2.57    0.010      .7860214     5.818555
       _cons |    56.95167    2.110863     26.98    0.000      52.81445     61.08888
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  395.8837
Iteration 2:   deviance =  395.5308
Iteration 3:   deviance =  395.5307
Iteration 4:   deviance =  395.5307

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  395.5307336                    (1/df) Deviance =  1.095653
Pearson          =  363.4160364                    (1/df) Pearson  =  1.006693

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

                                                   BIC             = -1732.349

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0090691    .0023064      3.93    0.000      .0045487     .0135895
       _cons |   -1.229859    .1685308     -7.30    0.000     -1.560173    -.8995443
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

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

Iteration 0:   log likelihood = -1406.9403

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

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

                                                   AIC             =  7.762756
Log likelihood   = -1406.940271                    BIC             =  47299.65

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.502324    .4454009      3.37    0.001      .6293547     2.375294
       _cons |    48.86944    .7323225     66.73    0.000      47.43412     50.30477
-------------+----------------------------------------------------------------

. 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 illw2 avgcumdosew2 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -463.51524

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

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

                                                   AIC             =  2.564822
Log likelihood   = -463.5152411                    BIC             = -1854.645

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1249912    .0331157      3.77    0.000      .0600856     .1898968
       _cons |     .301285    .0544484      5.53    0.000       .194568     .4080019
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  405.7435
Iteration 2:   deviance =  405.3085
Iteration 3:   deviance =  405.3081
Iteration 4:   deviance =  405.3081
Iteration 5:   deviance =  405.3081

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  405.3080692                    (1/df) Deviance =  1.122737
Pearson          =  363.1923247                    (1/df) Pearson  =  1.006073

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

                                                   BIC             = -1722.571

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .2093544    .0854065      2.45    0.014      .0419606     .3767481
       _cons |   -.7522712    .0853534     -8.81    0.000     -.9195607    -.5849817
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. cap gen illw2Xd2=illw2*avgcumdosew2

.
. * interaction of illw2Xd is not a mediator
. glm illw2 avgcumdosew2 if gender==2, fam(gaussian) link(identity) nolog

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

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

                                                   AIC             =  2.564822
Log likelihood   = -463.5152411                    BIC             = -1854.645

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1249912    .0331157      3.77    0.000      .0600856     .1898968
       _cons |     .301285    .0544484      5.53    0.000       .194568     .4080019
-------------+----------------------------------------------------------------

. glm hp2work illw2Xd2 illw2 avgcumdosew2 if gender==2, fam(binomial) ///
>    nolog irls scale(dev) link(probit)

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.8217749                    (1/df) Deviance =  1.116495
Pearson          =  360.6634088                    (1/df) Pearson  =  1.004633

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

                                                   BIC             = -1715.269

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    illw2Xd2 |   -.0002555    .0352447     -0.01    0.994     -.0693338     .0688228
       illw2 |    .1843288    .1001774      1.84    0.066     -.0120152     .3806729
avgcumdosew2 |    .1074757    .0718444      1.50    0.135     -.0333367     .2482882
       _cons |   -.8405461    .1053904     -7.98    0.000     -1.047107    -.6339848
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
. **** Basis function mediators of paid employment
. ** female b4 b4m b40
.
. title4 "bf8 is a male mediator of paid employment"
-------------
bf8 is a male mediator of paid employment
-------------

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

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

Iteration 0:   log likelihood = -1648.0584

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

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

                                                   AIC             =  9.091231
Log likelihood   =  -1648.05836                    BIC             =  184474.8

-------------+----------------------------------------------------------------
             |                 OIM
          bf1 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.592699    .8654173      1.84    0.066     -.1034879     3.288886
       _cons |    37.79953    1.422908     26.56    0.000      35.01068     40.58837
-------------+----------------------------------------------------------------

Iteration 1:   deviance =    400.85
Iteration 2:   deviance =  400.4115
Iteration 3:   deviance =  400.4114
Iteration 4:   deviance =  400.4114

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.4114259                    (1/df) Deviance =  1.112254
Pearson          =  362.4247002                    (1/df) Pearson  =  1.006735

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

                                                   BIC             = -1721.574

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf1 |    .0079775    .0034614      2.30    0.021      .0011932     .0147618
avgcumdosew2 |    .1139711    .0531295      2.15    0.032      .0098392     .2181029
       _cons |    -1.08756    .1662101     -6.54    0.000     -1.413326    -.7617939
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1109.0983

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

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

                                                   AIC             =  6.121754
Log likelihood   = -1109.098281                    BIC             =  7450.466

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.595012    .1960703     -3.03    0.002     -.9793027    -.2107212
       _cons |    11.02048    .3223763     34.19    0.000      10.38863     11.65232
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  368.2526
Iteration 2:   deviance =  367.9545
Iteration 3:   deviance =  367.9542
Iteration 4:   deviance =  367.9542

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  367.9541653                    (1/df) Deviance =  1.022095
Pearson          =   355.981786                    (1/df) Pearson  =  .9888383

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

                                                   BIC             = -1754.031

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.0878252    .0146171     -6.01    0.000     -.1164742    -.0591762
avgcumdosew2 |    .0839548     .051694      1.62    0.104     -.0173635     .1852731
       _cons |    .1183858    .1696362      0.70    0.485     -.2140951     .4508667
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3335.9882

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

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

                                                   AIC             =  18.39112
Log likelihood   = -3335.988235                    BIC             =  2.04e+09

-------------+----------------------------------------------------------------
             |                 OIM
          bf2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -6.46457    90.50464     -0.07    0.943     -183.8504     170.9213
       _cons |    2475.004    148.8066     16.63    0.000      2183.349      2766.66
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  400.9948
Iteration 2:   deviance =   400.598
Iteration 3:   deviance =   400.598
Iteration 4:   deviance =   400.598

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.5979742                    (1/df) Deviance =  1.112772
Pearson          =  362.9767308                    (1/df) Pearson  =  1.008269

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

                                                   BIC             = -1721.387

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf2 |    .0000727    .0000317      2.29    0.022      .0000106     .0001349
avgcumdosew2 |    .1275153    .0528818      2.41    0.016      .0238688     .2311617
       _cons |   -.9638935    .1245337     -7.74    0.000     -1.207975     -.719812
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1140.8259

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

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

                                                   AIC             =  6.296561
Log likelihood   = -1140.825904                    BIC             =  9280.095

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.599311    .2139789     -2.80    0.005     -1.018702    -.1799202
       _cons |    18.83424    .3518214     53.53    0.000      18.14469      19.5238
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  376.0339
Iteration 2:   deviance =  375.8988
Iteration 3:   deviance =  375.8985
Iteration 4:   deviance =  375.8985

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  375.8985331                    (1/df) Deviance =  1.044163
Pearson          =  352.5709603                    (1/df) Pearson  =  .9793638

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

                                                   BIC             = -1746.086

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.0703561     .013277     -5.30    0.000     -.0963785    -.0443336
avgcumdosew2 |    .0920064    .0520406      1.77    0.077     -.0099913     .1940041
       _cons |     .491873    .2531477      1.94    0.052     -.0042874     .9880333
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2474.5823

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

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

                                                   AIC             =  13.64508
Log likelihood   = -2474.582345                    BIC             =  1.77e+07

-------------+----------------------------------------------------------------
             |                 OIM
         bf5m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    13.38431    8.434936      1.59    0.113     -3.147864     29.91648
       _cons |    147.9804    13.86862     10.67    0.000      120.7984     175.1624
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  406.9626
Iteration 2:   deviance =  406.4247
Iteration 3:   deviance =  406.4246
Iteration 4:   deviance =  406.4246

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  406.4245618                    (1/df) Deviance =  1.128957
Pearson          =  362.4207333                    (1/df) Pearson  =  1.006724

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

                                                   BIC             =  -1715.56

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf5m |    .0000409    .0003437      0.12    0.905     -.0006328     .0007146
avgcumdosew2 |    .1250263    .0533787      2.34    0.019       .020406     .2296465
       _cons |   -.7796998    .1041776     -7.48    0.000     -.9838841    -.5755154
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2919.8439

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

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

                                                   AIC             =  16.09831
Log likelihood   = -2919.843936                    BIC             =  2.06e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf7m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -14.75682    28.76036     -0.51    0.608     -71.12609     41.61245
       _cons |    1193.681    47.28742     25.24    0.000          1101     1286.363
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  406.5017
Iteration 2:   deviance =  405.9725
Iteration 3:   deviance =  405.9723
Iteration 4:   deviance =  405.9723

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  405.9722985                    (1/df) Deviance =  1.127701
Pearson          =  362.2389826                    (1/df) Pearson  =  1.006219

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

                                                   BIC             = -1716.013

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf7m |   -.0000668    .0001013     -0.66    0.509     -.0002652     .0001317
avgcumdosew2 |    .1244811    .0531995      2.34    0.019       .020212     .2287502
       _cons |   -.6947121    .1494363     -4.65    0.000     -.9876019    -.4018223
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3888.9836

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

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

                                                   AIC             =  21.43793
Log likelihood   = -3888.983569                    BIC             =  4.30e+10

-------------+----------------------------------------------------------------
             |                 OIM
          bf8 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    560.4936    415.2182      1.35    0.177     -253.3192     1374.306
       _cons |     5567.66    682.6966      8.16    0.000      4229.599      6905.72
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  406.9011
Iteration 2:   deviance =  406.3651
Iteration 3:   deviance =  406.3649
Iteration 4:   deviance =  406.3649

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  406.3649265                    (1/df) Deviance =  1.128791
Pearson          =  362.4412012                    (1/df) Pearson  =  1.006781

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

                                                   BIC             =  -1715.62

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf8 |    1.81e-06    6.92e-06      0.26    0.793     -.0000118     .0000154
avgcumdosew2 |    .1246875    .0532751      2.34    0.019      .0202703     .2291048
       _cons |   -.7839399    .0989719     -7.92    0.000     -.9779212    -.5899586
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2865.4285

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

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

                                                   AIC             =   15.7985
Log likelihood   = -2865.428505                    BIC             =  1.53e+08

-------------+----------------------------------------------------------------
             |                 OIM
        bf15m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -20.7721    24.75663     -0.84    0.401     -69.29421        27.75
       _cons |     118.713    40.70454      2.92    0.004      38.93359     198.4925
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  403.5605
Iteration 2:   deviance =  401.8807
Iteration 3:   deviance =  401.3347
Iteration 4:   deviance =  400.9492
Iteration 5:   deviance =  400.5446
Iteration 6:   deviance =  400.2059
Iteration 7:   deviance =  400.0413
Iteration 8:   deviance =  399.9425
Iteration 9:   deviance =  399.8645
Iteration 10:  deviance =  399.8166
Iteration 11:  deviance =     399.8
Iteration 12:  deviance =  399.7944
Iteration 13:  deviance =  399.7924
Iteration 14:  deviance =  399.7917
Iteration 15:  deviance =  399.7914
Iteration 16:  deviance =  399.7913
Iteration 17:  deviance =  399.7912
Iteration 18:  deviance =  399.7912
Iteration 19:  deviance =  399.7912
Iteration 20:  deviance =  399.7912
Iteration 21:  deviance =  399.7912
Iteration 22:  deviance =  399.7912
Iteration 23:  deviance =  399.7912
Iteration 24:  deviance =  399.7912
Iteration 25:  deviance =  399.7912
Iteration 26:  deviance =  399.7912
Iteration 27:  deviance =  399.7912
Iteration 28:  deviance =  399.7912
Iteration 29:  deviance =  399.7912

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  399.7911696                    (1/df) Deviance =  1.110531
Pearson          =  350.5970313                    (1/df) Pearson  =  .9738806

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

                                                   BIC             = -1722.194

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       bf15m |   -.0186941    .1404434     -0.13    0.894      -.293958     .2565699
avgcumdosew2 |    .1198992    .0526195      2.28    0.023      .0167668     .2230316
       _cons |   -.7426095    .0909405     -8.17    0.000     -.9208497    -.5643693
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3826.3245

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

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

                                                   AIC             =   21.0927
Log likelihood   = -3826.324541                    BIC             =  3.04e+10

-------------+----------------------------------------------------------------
             |                 OIM
         bf17 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -273.4502    349.3904     -0.78    0.434     -958.2427     411.3423
       _cons |    1275.196    574.4633      2.22    0.026       149.269     2401.124
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  405.2053
Iteration 2:   deviance =  404.0203
Iteration 3:   deviance =  403.6855
Iteration 4:   deviance =  403.4175
Iteration 5:   deviance =  403.1159
Iteration 6:   deviance =  402.9417
Iteration 7:   deviance =  402.8368
Iteration 8:   deviance =  402.7416
Iteration 9:   deviance =  402.6786
Iteration 10:  deviance =  402.6575
Iteration 11:  deviance =  402.6503
Iteration 12:  deviance =  402.6478
Iteration 13:  deviance =   402.647
Iteration 14:  deviance =  402.6466
Iteration 15:  deviance =  402.6465
Iteration 16:  deviance =  402.6465
Iteration 17:  deviance =  402.6465
Iteration 18:  deviance =  402.6464
Iteration 19:  deviance =  402.6464
Iteration 20:  deviance =  402.6464
Iteration 21:  deviance =  402.6464
Iteration 22:  deviance =  402.6464
Iteration 23:  deviance =  402.6464
Iteration 24:  deviance =  402.6464
Iteration 25:  deviance =  402.6464

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  402.6464206                    (1/df) Deviance =  1.118462
Pearson          =  355.5597944                    (1/df) Pearson  =  .9876661

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

                                                   BIC             = -1719.339

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf17 |   -.0009496    .0098579     -0.10    0.923     -.0202707     .0183715
avgcumdosew2 |    .1218174    .0528492      2.30    0.021      .0182348     .2253999
       _cons |    -.755413    .0909044     -8.31    0.000     -.9335823    -.5772436
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -1709.1559

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

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

                                                   AIC             =  9.427856
Log likelihood   = -1709.155932                    BIC             =    259156

-------------+----------------------------------------------------------------
             |                 OIM
         bf20 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.580896    1.024054      1.54    0.123     -.4262136     3.588005
       _cons |     75.9561    1.683737     45.11    0.000      72.65604     79.25616
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  400.9593
Iteration 2:   deviance =  400.4773
Iteration 3:   deviance =  400.4772
Iteration 4:   deviance =  400.4772

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.4771542                    (1/df) Deviance =  1.112437
Pearson          =  362.8420021                    (1/df) Pearson  =  1.007894

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

                                                   BIC             = -1721.508

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf20 |    .0068438    .0030242      2.26    0.024      .0009166      .012771
avgcumdosew2 |    .1159481    .0531408      2.18    0.029       .011794     .2201022
       _cons |   -1.306413    .2554428     -5.11    0.000     -1.807072    -.8057543
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood =  -3441.897

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

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

                                                   AIC             =  18.97464
Log likelihood   = -3441.896981                    BIC             =  3.66e+09

-------------+----------------------------------------------------------------
             |                 OIM
         bf22 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    220.8529    121.1659      1.82    0.068     -16.62788     458.3337
       _cons |    3140.533    199.2195     15.76    0.000       2750.07     3530.996
-------------+----------------------------------------------------------------

Iteration 1:   deviance =   405.124
Iteration 2:   deviance =  404.6331
Iteration 3:   deviance =  404.6329
Iteration 4:   deviance =  404.6329

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  404.6329168                    (1/df) Deviance =   1.12398
Pearson          =  360.9276967                    (1/df) Pearson  =  1.002577

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

                                                   BIC             = -1717.352

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf22 |    .0000304    .0000232      1.31    0.191     -.0000151     .0000759
avgcumdosew2 |    .1199526    .0533515      2.25    0.025      .0153855     .2245196
       _cons |   -.8734808    .1187957     -7.35    0.000     -1.106316    -.6406455
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -3484.9777

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

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

                                                   AIC             =    19.212
Log likelihood   = -3484.977739                    BIC             =  4.64e+09

-------------+----------------------------------------------------------------
             |                 OIM
         bf29 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    52.50345    136.4339      0.38    0.700     -214.9022      319.909
       _cons |    267.0292     224.323      1.19    0.234     -172.6358     706.6941
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  406.0224
Iteration 2:   deviance =  405.5022
Iteration 3:   deviance =  405.5021
Iteration 4:   deviance =  405.5021

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  405.5020775                    (1/df) Deviance =  1.126395
Pearson          =   362.236176                    (1/df) Pearson  =  1.006212

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

                                                   BIC             = -1716.483

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf29 |    .0000177    .0000198      0.89    0.371     -.0000211     .0000564
avgcumdosew2 |    .1248052    .0530425      2.35    0.019      .0208439     .2287666
       _cons |   -.7795525    .0909171     -8.57    0.000     -.9577467    -.6013582
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -2855.8596

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

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

                                                   AIC             =  15.74578
Log likelihood   = -2855.859629                    BIC             =  1.45e+08

-------------+----------------------------------------------------------------
             |                 OIM
         bf30 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |     58.2065    24.11256      2.41    0.016      10.94675     105.4662
       _cons |    476.5581    39.64556     12.02    0.000      398.8542     554.2619
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  404.5558
Iteration 2:   deviance =  404.0864
Iteration 3:   deviance =  404.0863
Iteration 4:   deviance =  404.0863

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  404.0863003                    (1/df) Deviance =  1.122462
Pearson          =  361.7532879                    (1/df) Pearson  =   1.00487

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

                                                   BIC             = -1717.899

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf30 |    .0001722    .0001187      1.45    0.147     -.0000605     .0004048
avgcumdosew2 |     .116572    .0537488      2.17    0.030      .0112264     .2219177
       _cons |   -.8607769    .1094838     -7.86    0.000     -1.075361    -.6461925
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

Iteration 0:   log likelihood = -818.51169

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

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

                                                   AIC             =  4.520726
Log likelihood   = -818.5116931                    BIC             = -196.0319

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1794903    .0880548      2.04    0.042      .0069061     .3520745
       _cons |    3.004543    .1447786     20.75    0.000      2.720783     3.288304
-------------+----------------------------------------------------------------

Iteration 1:   deviance =  400.9844
Iteration 2:   deviance =  400.6024
Iteration 3:   deviance =  400.6022
Iteration 4:   deviance =  400.6022

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  400.6022459                    (1/df) Deviance =  1.112784
Pearson          =  359.7424008                    (1/df) Pearson  =  .9992844

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

                                                   BIC             = -1721.383

-------------+----------------------------------------------------------------
             |                 EIM
      hp2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf40 |    .0741875    .0318129      2.33    0.020      .0118353     .1365397
avgcumdosew2 |    .1139391    .0533719      2.13    0.033       .009332     .2185461
       _cons |   -1.008205    .1365187     -7.39    0.000     -1.275776     -.740633
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

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

. scalar list
  wkMedMw2 = bf8 age illw2
VactnMedFw2 = age illw2 radhlw2
VactnMedMw2 = age illw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 deaw2
SigDoseVactnFw2 = no
vactnModMw2 = none
MainEffVactnMw2 = age bf7m radhlw2
SigDoseVactnMw2 = no
sxLifeMedFw2 = age bf4 bf4m
sxLifeMedMw2 = age illw2
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
  InthbMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
sxlifeMedMw2 = age illw2
sxlifeModFw2 = none
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m shrelaw2 shfamw2
SigDoseSxlifeFw2 = no
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
MainEffsxlifeMw2 = age bf4 illw2 radhlw2
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf1 bf4 dvcew2 bf7m
ProbsocMedFw2 = age radhlw2
ProbsocMedMw2 = age
ProbsocModFw2 = none
MainEffProbSocFw2 = age radhlw2 illw2 Shrelaw2 avgcumodsew2
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
MainEffPrbsocMw2 = age radhlw2 shjobw2
hmcareMedFw2 = age illw2
hmcareMedMw2 = age illw2
hmcareModFw2 = none
SigDoseWKFw2 =          0
SigdoseHmcareFw2 = no
hmcareModMw2 = none
MainEffhmcareMw2 = none
SigDoseHmcareMw2 = no
  wkMedFw2 = radhlw2 age bf40 bf4m bf1
  wkModFw2 = none
  wkModMw2 = none
MainEffwkFw2 = age
MainEffwkMw2 = workM: age  bf8  illw2  shjobw2
SigDoseWKMw2 = no
SigDoseWkFw2 = no
hmcrMedFw1 = age icdxcnt shjobw1 bf4 BSIsoma WHPpain WHPsleep WHPel
hmcrMedMw1 = age
MainEffhmcrFw1 = illw1 age
SigDosehmcrFw1 = no
hmcrModMw1 = none
MainEffhmcrMw1 = age shjobw1
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
MainEffwkFw1 = age
MainEffwkMw1 = age
  wkMedMw1 = bf40
  WkMedMw1 = none
  WkModFw1 = none
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
 medsigFw1 =          1
prbsocnumMAsig =          8

.
. set linesize 100

.
. ********************************************************************************
. ******* We summarize the main effects models that were supposed to be significant
. ********************************************************************************
. set linesize 100

. est clear

.
.
.    * work
. forvalues j=2/2 {
  2. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. set more off
  4. di as input "For females trimmed HP2work on wave 2 with dose ns"
  5.         des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' bf8 ///
>            marrw`j'1-marrw`j'6  `w2bf'
  6.         logistic HP2work  age  ///
>                 avgcumdosew2 bf8 illw`j' shjobw`j' radhlw`j' if gender==1, coef nolog
  7.
. eststo paidwk
  8.         }
For females trimmed HP2work on wave 2 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==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)


Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      34.24
                                                  Prob > chi2     =     0.0000
Log likelihood = -155.75258                       Pseudo R2       =     0.0990

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0279967    .0125982      2.22    0.026      .0033047     .0526886
avgcumdosew2 |    .0093245    .0489486      0.19    0.849     -.0866129     .1052619
         bf8 |   -.0000433    .0000214     -2.03    0.043     -.0000852    -1.44e-06
       illw2 |     .503088    .2180574      2.31    0.021      .0757033     .9304727
     shjobw2 |    .0054505    .0037374      1.46    0.145     -.0018746     .0127756
     radhlw2 |    .0133173    .0044637      2.98    0.003      .0045685      .022066
       _cons |    -3.81568    .6836898     -5.58    0.000     -5.155688    -2.475673
-------------+----------------------------------------------------------------

.
.
. *  social life
. forvalues j=2/2 {
  2. set more off
  3. di as input "females trimmed HP2probsoc on wave 2 with dose ns"
  4.         des  age occ1w`j'-occ8w`j' inc1w`j'-inc4w`j' avgcumdosew`j' bf8 ///
>            marrw`j'1-marrw`j'6  `w2bf'
  5.         logistic HP2probsoc  age  ///
>                 avgcumdosew2 bf8 illw`j' shjobw`j' radhlw`j' if gender==1, coef nolog
  6. eststo socprobs
  7.         }
females trimmed HP2probsoc on wave 2 with dose ns

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==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)


Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      60.41
                                                  Prob > chi2     =     0.0000
Log likelihood = -94.948223                       Pseudo R2       =     0.2413

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0592362    .0176148      3.36    0.001      .0247118     .0937607
avgcumdosew2 |    .0315514    .0525591      0.60    0.548     -.0714626     .1345653
         bf8 |   -.0000332    .0000239     -1.39    0.165     -.0000801     .0000136
       illw2 |    .5251102    .2757549      1.90    0.057     -.0153594      1.06558
     shjobw2 |    .0135312    .0051744      2.62    0.009      .0033897     .0236728
     radhlw2 |    .0242757     .006237      3.89    0.000      .0120514        .0365
       _cons |   -7.543673    1.131417     -6.67    0.000      -9.76121    -5.326137
-------------+----------------------------------------------------------------

.
. * sex life
. title "Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 2"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 2*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:04  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=2/2 {
  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 2 male dose avgcumdosew`j' main effect not signif"
  5.         logit HP2sxlife age  bf4  illw`j' ///
>           avgcumdosew`j' radhlw`j' if gender==1
  6.
.         eststo sexlife
  7. }
trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
wave 2 male dose avgcumdosew2 main effect not signif

Iteration 0:   log likelihood = -171.51396
Iteration 1:   log likelihood = -121.56573
Iteration 2:   log likelihood = -115.51071
Iteration 3:   log likelihood = -115.37175
Iteration 4:   log likelihood =  -115.3714
Iteration 5:   log likelihood =  -115.3714

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =     112.29
                                                  Prob > chi2     =     0.0000
Log likelihood =  -115.3714                       Pseudo R2       =     0.3273

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0668709    .0154805      4.32    0.000      .0365295     .0972122
         bf4 |   -.1650598    .0368511     -4.48    0.000     -.2372867    -.0928329
       illw2 |    .3077459    .2454954      1.25    0.210     -.1734162      .788908
avgcumdosew2 |    .0621309    .0473611      1.31    0.190     -.0306951     .1549569
     radhlw2 |     .010562    .0054615      1.93    0.053     -.0001422     .0212663
       _cons |   -3.881348    1.050876     -3.69    0.000     -5.941027     -1.82167
-------------+----------------------------------------------------------------

.
.
.
.
.
. * inthob
.
. forvalues j=2/2 {
  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=2/2 {
  6. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  7.
. di as input "trimmed 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.      logit `var' age   ///
>                  avgcumdosew`j' bf4 bf30  ///
>                  shrelaw`j' suprtw`j'  ///
>                 radhlw2 if gender==2,  difficult iterate(50)  nolog
 15.
.                 eststo inthobbies
 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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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)


trimmed main model for HP2inthob for wave= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:05  *****
*******************************************************************************
*******************************************************************************


Model for gender==2 and wave == 2


Logistic regression                               Number of obs   =        363
                                                  LR chi2(7)      =     101.28
                                                  Prob > chi2     =     0.0000
Log likelihood = -121.47255                       Pseudo R2       =     0.2942

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0729699     .016233      4.50    0.000      .0411537      .104786
avgcumdosew2 |    .0713471    .0870475      0.82    0.412     -.0992629     .2419571
         bf4 |     -.12277    .0348875     -3.52    0.000     -.1911482    -.0543918
        bf30 |    .0005237    .0002568      2.04    0.041      .0000204      .001027
    shrelaw2 |   -.0121549    .0056037     -2.17    0.030     -.0231379     -.001172
     suprtw2 |   -.0103307    .0040941     -2.52    0.012      -.018355    -.0023065
     radhlw2 |    .0119091    .0056652      2.10    0.036      .0008055     .0230128
       _cons |   -4.716583    1.190104     -3.96    0.000     -7.049144    -2.384021
-------------+----------------------------------------------------------------

.
.
.
. * vacation plans
.
. di _skip(1)


. di as input "For females trimmed vacation plans model on wave2 and d2 is not signif "
For females trimmed vacation plans model on wave2 and d2 is not signif

. di _skip(1)


.   logistic hp2vacatn age  deaw2 shjobw2 bf7m havmil  ///
>   radhlw2 avgcumdosew2 if ///
>    gender==2, coef nolog

Logistic regression                               Number of obs   =        363
                                                  LR chi2(7)      =      76.69
                                                  Prob > chi2     =     0.0000
Log likelihood = -129.17206                       Pseudo R2       =     0.2289

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .079348    .0155749      5.09    0.000      .0488217     .1098742
       deaw2 |    .1646231    .1715933      0.96    0.337     -.1716935     .5009397
     shjobw2 |   -.0056137    .0041432     -1.35    0.175     -.0137341     .0025068
        bf7m |   -.0006133      .00025     -2.45    0.014     -.0011032    -.0001234
      havmil |   -.0001958    .0011139     -0.18    0.860     -.0023791     .0019875
     radhlw2 |    .0233367     .005861      3.98    0.000      .0118494      .034824
avgcumdosew2 |    .0651649    .0909818      0.72    0.474     -.1131561      .243486
       _cons |   -6.606305    1.018983     -6.48    0.000     -8.603475    -4.609135
-------------+----------------------------------------------------------------

.    eststo vacatn

.
.
. estout  *,      cells(b(star fmt(%9.3f)) se(par) t p)                ///
>                 stats(r2_p bic N, fmt(%9.3f %9.0g) )    ///
>                 legend collabels(none) varlabels(_cons Constant)  ///
>                 mlabels(workw2  socprobsw2 sexlifew2 inthobw2 vactnw2) ///
>                                 title("main effects regression coefficients" ///
>                  "of reconstructed dose for females in wave 2")

main effects regression coefficients of reconstructed dose for females in wave 2
--------------------------------------------------------------------------------------------
                   workw2      socprobsw2       sexlifew2        inthobw2         vactnw2
--------------------------------------------------------------------------------------------
main
age                 0.028*          0.059***        0.067***        0.073***        0.079***
                  (0.013)         (0.018)         (0.015)         (0.016)         (0.016)
                    2.222           3.363           4.320           4.495           5.095
                    0.026           0.001           0.000           0.000           0.000
avgcumdosew2        0.009           0.032           0.062           0.071           0.065
                  (0.049)         (0.053)         (0.047)         (0.087)         (0.091)
                    0.190           0.600           1.312           0.820           0.716
                    0.849           0.548           0.190           0.412           0.474
bf8                -0.000*         -0.000
                  (0.000)         (0.000)
                   -2.028          -1.389
                    0.043           0.165
illw2               0.503*          0.525           0.308
                  (0.218)         (0.276)         (0.245)
                    2.307           1.904           1.254
                    0.021           0.057           0.210
shjobw2             0.005           0.014**                                        -0.006
                  (0.004)         (0.005)                                         (0.004)
                    1.458           2.615                                          -1.355
                    0.145           0.009                                           0.175
radhlw2             0.013**         0.024***        0.011           0.012*          0.023***
                  (0.004)         (0.006)         (0.005)         (0.006)         (0.006)
                    2.983           3.892           1.934           2.102           3.982
                    0.003           0.000           0.053           0.036           0.000
bf4                                                -0.165***       -0.123***
                                                  (0.037)         (0.035)
                                                   -4.479          -3.519
                                                    0.000           0.000
bf30                                                                0.001*
                                                                  (0.000)
                                                                    2.039
                                                                    0.041
shrelaw2                                                           -0.012*
                                                                  (0.006)
                                                                   -2.169
                                                                    0.030
suprtw2                                                            -0.010*
                                                                  (0.004)
                                                                   -2.523
                                                                    0.012
deaw2                                                                               0.165
                                                                                  (0.172)
                                                                                    0.959
                                                                                    0.337
bf7m                                                                               -0.001*
                                                                                  (0.000)
                                                                                   -2.454
                                                                                    0.014
havmil                                                                             -0.000
                                                                                  (0.001)
                                                                                   -0.176
                                                                                    0.860
Constant           -3.816***       -7.544***       -3.881***       -4.717***       -6.606***
                  (0.684)         (1.131)         (1.051)         (1.190)         (1.019)
                   -5.581          -6.667          -3.693          -3.963          -6.483
                    0.000           0.000           0.000           0.000           0.000
--------------------------------------------------------------------------------------------
r2_p                0.099           0.241           0.327           0.294           0.229
bic              352.3078        230.6991        265.7165        290.1003        305.4993
N                     340             340             340             363             363
--------------------------------------------------------------------------------------------
* p<0.05, ** p<0.01, *** p<0.001

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****         2.  wave 2 part2  H1: dose home care relationship           *****
*****       wave 2 Dose -  HP2home care Main effects identification       *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:08  *****
*******************************************************************************
*******************************************************************************


.
. *  review of general model for men and women
.
. forvalues j=2/2 {
  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 w2bf 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' ///
>                 illw2 shfamw`j' shhlw`j' shjobw`j' shrelaw`j' suprtw`j' suchrw`j' ///
>                  havmilsq if gender==`k', coef nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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 =  2 for hp2vacatn     *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:08  *****
*******************************************************************************
*******************************************************************************


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

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

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

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

note: _Ieduc_7 omitted because of collinearity

Logistic regression                               Number of obs   =        270
                                                  LR chi2(49)     =     112.39
                                                  Prob > chi2     =     0.0000
Log likelihood = -98.319474                       Pseudo R2       =     0.3637

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0339056    .0231493      1.46    0.143     -.0114661     .0792774
    _Ieduc_2 |   -4.046801     2.06481     -1.96    0.050     -8.093754     .0001521
    _Ieduc_3 |   -2.332961    1.654719     -1.41    0.159     -5.576151     .9102284
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -2.109138    1.662617     -1.27    0.205     -5.367807     1.149531
    _Ieduc_6 |   -2.575578    1.598895     -1.61    0.107     -5.709355     .5581988
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |    .2791915    3.076664      0.09    0.928     -5.750959     6.309342
      occ2w2 |   -.2043325    3.082144     -0.07    0.947     -6.245223     5.836559
      occ3w2 |    .5280791    3.097215      0.17    0.865     -5.542352      6.59851
      occ4w2 |    .3530379    3.103258      0.11    0.909     -5.729235     6.435311
      occ5w2 |    1.030726    3.128223      0.33    0.742     -5.100479     7.161931
      occ6w2 |    1.834194    3.454783      0.53    0.595     -4.937056     8.605444
      occ7w2 |    .6310877    3.205439      0.20    0.844     -5.651457     6.913633
      occ8w2 |           0   (omitted)
     marrw21 |   -1.774375    1.681557     -1.06    0.291     -5.070167     1.521417
     marrw22 |   -3.603201    2.051956     -1.76    0.079     -7.624961     .4185589
     marrw23 |   -3.822298    1.717545     -2.23    0.026     -7.188624    -.4559723
     marrw25 |   -.1941937    2.536946     -0.08    0.939     -5.166517      4.77813
     marrw26 |   -3.213845    2.602626     -1.23    0.217     -8.314899     1.887208
      inc1w2 |    2.821191    3.187221      0.89    0.376     -3.425647     9.068029
      inc2w2 |    2.680447    3.109489      0.86    0.389      -3.41404     8.774935
      inc3w2 |      2.9859    3.107015      0.96    0.337     -3.103737     9.075536
      inc4w2 |    1.060877    3.414563      0.31    0.756     -5.631544     7.753298
     radhlw2 |    .0009802    .0078741      0.12    0.901     -.0144527     .0164132
      havmil |    .0033106     .008219      0.40    0.687     -.0127982     .0194195
avgcumdosew2 |   -.0408898    .0892564     -0.46    0.647     -.2158292     .1340496
         bf1 |   -.0224294    .0411105     -0.55    0.585     -.1030045     .0581457
         bf4 |   -.1579765    .2337949     -0.68    0.499      -.616206      .300253
         bf2 |    .0000992    .0001626      0.61    0.542     -.0002196      .000418
        bf4m |   -.1739281    .2154639     -0.81    0.420     -.5962296     .2483734
        bf5m |    .0006314    .0017487      0.36    0.718      -.002796     .0040589
        bf7m |    .0005115     .000594      0.86    0.389     -.0006527     .0016757
         bf8 |   -.0000403    .0000473     -0.85    0.394     -.0001331     .0000525
       bf15m |   -.0001301    .0003714     -0.35    0.726      -.000858     .0005979
        bf17 |           0   (omitted)
        bf20 |    .0027387    .0345917      0.08    0.937     -.0650597     .0705372
        bf22 |   -.0000529    .0001896     -0.28    0.780     -.0004245     .0003187
        bf29 |    2.63e-06    .0000221      0.12    0.905     -.0000407     .0000459
        bf30 |   -.0002608    .0004218     -0.62    0.536     -.0010875     .0005659
        bf40 |    .3296594    .2457937      1.34    0.180     -.1520874     .8114062
       deaw2 |    .0069355    .3395872      0.02    0.984     -.6586432     .6725142
      dvcew2 |   -.8346564    3.597118     -0.23    0.817     -7.884878     6.215565
      sepaw2 |           0   (omitted)
      accdw2 |    .1481124    .4606844      0.32    0.748     -.7548124     1.051037
      movew2 |    .2192344    .5237343      0.42    0.676      -.807266     1.245735
       illw2 |   -.2794365    .3922624     -0.71    0.476     -1.048257     .4893838
     shfamw2 |   -.0130582    .0087013     -1.50    0.133     -.0301125     .0039961
      shhlw2 |   -.0041104    .0095817     -0.43    0.668     -.0228901     .0146694
     shjobw2 |    .0000993     .009716      0.01    0.992     -.0189438     .0191423
    shrelaw2 |    .0041598    .0074695      0.56    0.578     -.0104802     .0187997
     suprtw2 |    .0129457    .0070817      1.83    0.068     -.0009342     .0268256
     suchrw2 |   -.0024472    .0063512     -0.39    0.700     -.0148953      .010001
    havmilsq |   -8.45e-06     .000015     -0.56    0.573     -.0000379      .000021
       _cons |    3.897935    3.960914      0.98    0.325     -3.865314     11.66118
-------------+----------------------------------------------------------------

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        41            17  |         58
     -     |        29           183  |        212
-----------+--------------------------+-----------
   Total   |        70           200  |        270

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   58.57%
Specificity                     Pr( -|~D)   91.50%
Positive predictive value       Pr( D| +)   70.69%
Negative predictive value       Pr(~D| -)   86.32%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.50%
False - rate for true D         Pr( -| D)   41.43%
False + rate for classified +   Pr(~D| +)   29.31%
False - rate for classified -   Pr( D| -)   13.68%
--------------------------------------------------
Correctly classified                        82.96%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       270
 number of covariate patterns =       270
            Pearson chi2(220) =       227.64
                  Prob > chi2 =         0.3476

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -154.516     Log-Lik Full Model:          -98.319
D(214):                      196.639     LR(49):                      112.393
                                         Prob > LR:                     0.000
McFadden's R2:                 0.364     McFadden's Adj R2:             0.001
Maximum Likelihood R2:         0.340     Cragg & Uhler's R2:            0.500
McKelvey and Zavoina's R2:     0.594     Efron's R2:                    0.390
Variance of y*:                8.112     Variance of error:             3.290
Count R2:                      0.830     Adj Count R2:                  0.343
AIC:                           1.143     AIC*n:                       308.639
BIC:                       -1001.423     BIC':                        161.930


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  chunk 3 H1 test pt 2 :Gender= 2  model Wave =  2 for HP2hmcare     *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:10  *****
*******************************************************************************
*******************************************************************************


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

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

Logistic regression                               Number of obs   =        358
                                                  LR chi2(51)     =     177.21
                                                  Prob > chi2     =     0.0000
Log likelihood = -139.72732                       Pseudo R2       =     0.3881

-------------+----------------------------------------------------------------
    HP2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0689184    .0184884      3.73    0.000      .0326818      .105155
    _Ieduc_2 |   -17.33023    2.370203     -7.31    0.000     -21.97575    -12.68472
    _Ieduc_3 |   -17.85228    2.271622     -7.86    0.000     -22.30458    -13.39998
    _Ieduc_4 |   -16.22367    2.322199     -6.99    0.000      -20.7751    -11.67225
    _Ieduc_5 |   -17.51753    2.330541     -7.52    0.000      -22.0853    -12.94975
    _Ieduc_6 |   -18.46499    2.320848     -7.96    0.000     -23.01377    -13.91621
    _Ieduc_7 |   -17.72595    3.034199     -5.84    0.000     -23.67287    -11.77903
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -2.066459     1.51974     -1.36    0.174     -5.045095     .9121779
      occ2w2 |   -2.243078    1.553998     -1.44    0.149     -5.288858     .8027026
      occ3w2 |    -1.29392    1.568233     -0.83    0.409     -4.367601      1.77976
      occ4w2 |   -3.169244    1.685231     -1.88    0.060     -6.472236     .1337472
      occ5w2 |   -4.174961    1.966604     -2.12    0.034     -8.029433    -.3204881
      occ6w2 |   -5.016961    2.033875     -2.47    0.014     -9.003283    -1.030639
      occ7w2 |   -1.338521    1.557092     -0.86    0.390     -4.390365     1.713323
      occ8w2 |    .0102882    1.823109      0.01    0.995      -3.56294     3.583517
     marrw21 |   -.4364242    1.195764     -0.36    0.715     -2.780078     1.907229
     marrw22 |    .2779117    1.516808      0.18    0.855     -2.694977       3.2508
     marrw23 |    1.982364    .8407589      2.36    0.018      .3345069     3.630221
     marrw25 |    .7265557    1.247315      0.58    0.560     -1.718137     3.171248
     marrw26 |           0   (omitted)
      inc1w2 |      2.1918    1.615301      1.36    0.175     -.9741308     5.357731
      inc2w2 |    3.722591    1.551917      2.40    0.016      .6808895     6.764292
      inc3w2 |    3.205652    1.561296      2.05    0.040      .1455678     6.265737
      inc4w2 |    3.577016    1.917029      1.87    0.062     -.1802924     7.334325
     radhlw2 |   -.0017814    .0069396     -0.26    0.797     -.0153829       .01182
      havmil |    .0004744    .0029523      0.16    0.872      -.005312     .0062609
avgcumdosew2 |    -.232422    .1275125     -1.82    0.068     -.4823419      .017498
         bf1 |   -.0155252    .0283044     -0.55    0.583     -.0710008     .0399503
         bf4 |   -.6331543    .2104116     -3.01    0.003     -1.045553    -.2207551
         bf2 |    .0002047    .0001148      1.78    0.075     -.0000203     .0004296
        bf4m |     .369727    .1901433      1.94    0.052     -.0029469      .742401
        bf5m |   -.0009929     .001436     -0.69    0.489     -.0038073     .0018215
        bf7m |    .0003779    .0005084      0.74    0.457     -.0006186     .0013744
         bf8 |   -5.36e-07    .0000355     -0.02    0.988     -.0000702     .0000691
       bf15m |   -.0123361     .496536     -0.02    0.980     -.9855287     .9608566
        bf17 |    .0006265    .0248268      0.03    0.980     -.0480332     .0492861
        bf20 |   -.0134138    .0231788     -0.58    0.563     -.0588434     .0320158
        bf22 |   -.0000815    .0001207     -0.67    0.500      -.000318     .0001551
        bf29 |           0   (omitted)
        bf30 |   -.0000914    .0002999     -0.30    0.760     -.0006791     .0004963
        bf40 |    .1554702    .1284498      1.21    0.226     -.0962868     .4072271
       deaw2 |    .7476902    .2584678      2.89    0.004      .2411026     1.254278
      dvcew2 |    1.232183    1.276036      0.97    0.334     -1.268802     3.733168
      sepaw2 |    -1.82805    1.829743     -1.00    0.318      -5.41428      1.75818
      accdw2 |   -.7440138    .5452818     -1.36    0.172     -1.812746     .3247189
      movew2 |   -.5229006    .4948092     -1.06    0.291     -1.492709     .4469077
       illw2 |   -.1315546    .1759029     -0.75    0.455     -.4763179     .2132087
     shfamw2 |   -.0038201    .0062872     -0.61    0.543     -.0161429     .0085027
      shhlw2 |   -.0093005    .0066582     -1.40    0.162     -.0223502     .0037493
     shjobw2 |    .0003285     .005919      0.06    0.956     -.0112724     .0119295
    shrelaw2 |   -.0125743    .0072115     -1.74    0.081     -.0267086       .00156
     suprtw2 |   -.0093988    .0049637     -1.89    0.058     -.0191275     .0003299
     suchrw2 |    .0039959    .0055359      0.72    0.470     -.0068542     .0148461
    havmilsq |   -6.92e-07    2.48e-06     -0.28    0.780     -5.56e-06     4.18e-06
       _cons |    12.62346           .         .        .             .            .
-------------+----------------------------------------------------------------


Note: 4 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        86            29  |        115
     -     |        34           209  |        243
-----------+--------------------------+-----------
   Total   |       120           238  |        358

Classified + if predicted Pr(D) >= .5
True D defined as HP2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   71.67%
Specificity                     Pr( -|~D)   87.82%
Positive predictive value       Pr( D| +)   74.78%
Negative predictive value       Pr(~D| -)   86.01%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   12.18%
False - rate for true D         Pr( -| D)   28.33%
False + rate for classified +   Pr(~D| +)   25.22%
False - rate for classified -   Pr( D| -)   13.99%
--------------------------------------------------
Correctly classified                        82.40%
--------------------------------------------------


Logistic model for HP2hmcare, goodness-of-fit test


       number of observations =       358
 number of covariate patterns =       358
            Pearson chi2(305) =       382.80
                  Prob > chi2 =         0.0016

Measures of Fit for logistic of HP2hmcare

Log-Lik Intercept Only:     -228.331     Log-Lik Full Model:         -139.727
D(302):                      279.455     LR(51):                      177.208
                                         Prob > LR:                     0.000
McFadden's R2:                 0.388     McFadden's Adj R2:             0.143
Maximum Likelihood R2:         0.390     Cragg & Uhler's R2:            0.542
McKelvey and Zavoina's R2:     0.930     Efron's R2:                    0.437
Variance of y*:               47.071     Variance of error:             3.290
Count R2:                      0.824     Adj Count R2:                  0.475
AIC:                           1.093     AIC*n:                       391.455
BIC:                       -1496.466     BIC':                        122.699

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

.   logit hp2hmcare age radhlw2 avgcumdosew2 bf4 bf4m bf40 if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -133.32556
Iteration 2:   log likelihood = -130.68368
Iteration 3:   log likelihood = -130.58803
Iteration 4:   log likelihood = -130.58773
Iteration 5:   log likelihood = -130.58773

Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      84.57
                                                  Prob > chi2     =     0.0000
Log likelihood = -130.58773                       Pseudo R2       =     0.2446

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0212175    .0144823      1.47    0.143     -.0071673     .0496022
     radhlw2 |    .0004287    .0051507      0.08    0.934     -.0096666     .0105239
avgcumdosew2 |    .0002129    .0577761      0.00    0.997     -.1130262      .113452
         bf4 |   -.0235753    .2097912     -0.11    0.911     -.4347586     .3876079
        bf4m |   -.1707442    .1936458     -0.88    0.378     -.5502831     .2087946
        bf40 |     .141308    .0923159      1.53    0.126     -.0396278     .3222439
       _cons |    .6763131    1.703403      0.40    0.691     -2.662295     4.014921
-------------+----------------------------------------------------------------

.
.
.   // male main effects dose-work model washes out
.
. 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 SigDoseHmcareMw2 = "no"

. scalar MainEffhmcareMw2= "none"

. scalar list
  wkMedMw2 = bf8 age illw2
VactnMedFw2 = age illw2 radhlw2
VactnMedMw2 = age illw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 deaw2
SigDoseVactnFw2 = no
vactnModMw2 = none
MainEffVactnMw2 = age bf7m radhlw2
SigDoseVactnMw2 = no
sxLifeMedFw2 = age bf4 bf4m
sxLifeMedMw2 = age illw2
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
  InthbMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
sxlifeMedMw2 = age illw2
sxlifeModFw2 = none
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m shrelaw2 shfamw2
SigDoseSxlifeFw2 = no
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
MainEffsxlifeMw2 = age bf4 illw2 radhlw2
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf1 bf4 dvcew2 bf7m
ProbsocMedFw2 = age radhlw2
ProbsocMedMw2 = age
ProbsocModFw2 = none
MainEffProbSocFw2 = age radhlw2 illw2 Shrelaw2 avgcumodsew2
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
MainEffPrbsocMw2 = age radhlw2 shjobw2
hmcareMedFw2 = age illw2
hmcareMedMw2 = age illw2
hmcareModFw2 = none
SigDoseWKFw2 =          0
SigdoseHmcareFw2 = no
hmcareModMw2 = none
MainEffhmcareMw2 = none
SigDoseHmcareMw2 = no
  wkMedFw2 = radhlw2 age bf40 bf4m bf1
  wkModFw2 = none
  wkModMw2 = none
MainEffwkFw2 = age
MainEffwkMw2 = workM: age  bf8  illw2  shjobw2
SigDoseWKMw2 = no
SigDoseWkFw2 = no
hmcrMedFw1 = age icdxcnt shjobw1 bf4 BSIsoma WHPpain WHPsleep WHPel
hmcrMedMw1 = age
MainEffhmcrFw1 = illw1 age
SigDosehmcrFw1 = no
hmcrModMw1 = none
MainEffhmcrMw1 = age shjobw1
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
MainEffwkFw1 = age
MainEffwkMw1 = age
  wkMedMw1 = bf40
  WkMedMw1 = none
  WkModFw1 = none
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
 medsigFw1 =          1
prbsocnumMAsig =          8

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

. logit hp2hmcare age radhlw2 avgcumdosew2 ageXd3 illw2 if gender==1

Iteration 0:   log likelihood = -172.87291
Iteration 1:   log likelihood = -151.63199
Iteration 2:   log likelihood = -150.23873
Iteration 3:   log likelihood = -150.14009
Iteration 4:   log likelihood = -150.13472
Iteration 5:   log likelihood = -150.13471

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      45.48
                                                  Prob > chi2     =     0.0000
Log likelihood = -150.13471                       Pseudo R2       =     0.1315

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0283791    .0164052      1.73    0.084     -.0037745     .0605327
     radhlw2 |    .0154894    .0043054      3.60    0.000       .007051     .0239279
avgcumdosew2 |   -1.218369    1.156272     -1.05    0.292      -3.48462     1.047882
      ageXd3 |    .0170005    .0151684      1.12    0.262      -.012729     .0467301
       illw2 |    .3201382    .2199825      1.46    0.146     -.1110197      .751296
       _cons |   -3.730027    .9027785     -4.13    0.000      -5.49944    -1.960613
-------------+----------------------------------------------------------------

. cap gen radhlw2Xillw2 = radhlw2*illw2

. cap drop radhlw2Xd1

. cap gen radhlw2Xd3 = radhlw2*avgcumdosew2

. cap drop illw2Xd1

. cap gen illw2Xd3 = illw2*avgcumdosew2

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

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   Dose-home care impact relationship reveals no male moderators     *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:15  *****
*******************************************************************************
*******************************************************************************


. logit hp2hmcare radhlw2 avgcumdosew2 illw2 radhlw2Xillw2 radhlw2Xd3 illw2Xd3 ///
>    if gender==1, nolog

Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =      34.02
                                                  Prob > chi2     =     0.0000
Log likelihood =  -155.8647                       Pseudo R2       =     0.0984

--------------+----------------------------------------------------------------
     hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
--------------+----------------------------------------------------------------
      radhlw2 |    .0124854     .006471      1.93    0.054     -.0001976     .0251683
 avgcumdosew2 |   -.6591079     .694783     -0.95    0.343     -2.020858     .7026418
        illw2 |   -.0271833    .4678058     -0.06    0.954     -.9440659     .8896993
radhlw2Xillw2 |    .0076663    .0070763      1.08    0.279      -.006203     .0215357
   radhlw2Xd3 |    .0069713    .0070473      0.99    0.323     -.0068412     .0207839
     illw2Xd3 |    .0895034    .2486877      0.36    0.719     -.3979155     .5769223
        _cons |   -2.001833     .530832     -3.77    0.000     -3.042245    -.9614216
--------------+----------------------------------------------------------------

.
. fitstat

Measures of Fit for logit of hp2hmcare

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -155.865
D(333):                      311.729     LR(6):                        34.016
                                         Prob > LR:                     0.000
McFadden's R2:                 0.098     McFadden's Adj R2:             0.058
Maximum Likelihood R2:         0.095     Cragg & Uhler's R2:            0.149
McKelvey and Zavoina's R2:     0.259     Efron's R2:                    0.109
Variance of y*:                4.438     Variance of error:             3.290
Count R2:                      0.806     Adj Count R2:                  0.057
AIC:                           0.958     AIC*n:                       325.729
BIC:                       -1629.309     BIC':                          0.957

.
.
. title "testing female moderators for hp2hmcare"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              testing female moderators for hp2hmcare                *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:16  *****
*******************************************************************************
*******************************************************************************


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

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

. forvalues j=2/2 {
  2. di _skip(4)
  3. di as input "For females hp2hmcare on wave 1 with dose ns"
  4. des  age   avgcumdosew`j' `w2bf'
  5. logistic HP2work  age havmilsq  radhlw2 ///
>    avgcumdosew2 shhlw`j' shjobw`j' shrelaw`j' suprtw`j' if gender==2, coef nolog
  6.
. }

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


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


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)


Logistic regression                               Number of obs   =        363
                                                  LR chi2(8)      =      60.77
                                                  Prob > chi2     =     0.0000
Log likelihood = -176.17616                       Pseudo R2       =     0.1471

-------------+----------------------------------------------------------------
      HP2work |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0605771     .012257      4.94    0.000      .0365537     .0846004
    havmilsq |   -6.47e-07    1.17e-06     -0.55    0.579     -2.93e-06     1.64e-06
     radhlw2 |    .0108128    .0042449      2.55    0.011      .0024929     .0191327
avgcumdosew2 |    .1024263     .084282      1.22    0.224     -.0627633     .2676159
      shhlw2 |    .0099394    .0048118      2.07    0.039      .0005085     .0193703
     shjobw2 |     -.00289    .0045988     -0.63    0.530     -.0119035     .0061234
    shrelaw2 |   -.0105367    .0047951     -2.20    0.028      -.019935    -.0011384
     suprtw2 |    .0029696    .0033321      0.89    0.373     -.0035611     .0095003
       _cons |   -5.319428    .7716311     -6.89    0.000     -6.831797    -3.807059
-------------+----------------------------------------------------------------

.
. scalar SigdoseHmcareFw2="no"

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

. di "`cn4'"
age havmilsq radhlw2 avgcumdosew2 shhlw2 shjobw2 shrelaw2 suprtw2 _cons

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

. di `leng4'
71

. local leng4b `leng4'-6

. di `leng3b'


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

. di "`nuvlist4'"
havmilsq radhlw2 avgcumdosew2 shhlw2 shjobw2 shrelaw2 suprtw2 _c

. local rhsvars4 = "`nuvlist4'"

. local nuvlist4= "`nuvlist4'"

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

. di "`nuvlist4'"
age havmilsq radhlw2 avgcumdosew2 shhlw2 shjobw2 shrelaw2 suprtw2

.
. cap gen shhlw2Xd3 = shhlw2*avgcumdosew2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   No sig female moderators for dose-hmcare impact are found here    *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:18  *****
*******************************************************************************
*******************************************************************************


. logit hp2hmcare age shhlw2  avgcumdosew2 ageXd3 shhlw2Xd3 if gender==2

Iteration 0:   log likelihood = -233.72859
Iteration 1:   log likelihood = -195.05719
Iteration 2:   log likelihood = -194.19863
Iteration 3:   log likelihood = -194.19128
Iteration 4:   log likelihood = -194.19128

Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =      79.07
                                                  Prob > chi2     =     0.0000
Log likelihood = -194.19128                       Pseudo R2       =     0.1692

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .084796    .0149038      5.69    0.000      .0555851     .1140068
      shhlw2 |    -.000082     .004448     -0.02    0.985     -.0087999     .0086358
avgcumdosew2 |   -.7437036    .8125992     -0.92    0.360     -2.336369     .8489616
      ageXd3 |    .0110146    .0113714      0.97    0.333     -.0112729      .033302
   shhlw2Xd3 |   -.0030423    .0040693     -0.75    0.455      -.011018     .0049333
       _cons |   -4.921691    .7788456     -6.32    0.000     -6.448201    -3.395182
-------------+----------------------------------------------------------------

.
. 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     *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:01:19  *****
*******************************************************************************
*******************************************************************************


. forvalues k=1/2 {
  2. forvalues j=2/2 {
  3. local w2bf 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' `w2bf'
  7. sw, pr(.1): logistic hp2hmcare  age  havmilsq ///
>    avgcumdosew2  ageXd3 illw`j' shjobw`j' suprtw`j' if gender==`k', coef nolog
  8. estat gof
  9. estat class
 10. fitstat
 11. }
 12. }

Trimmed gender=1 hp2hmcare impact of dose in wave 2

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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.4827 >= 0.1000  removing havmilsq


p = 0.4147 >= 0.1000  removing suprtw2


p = 0.2849 >= 0.1000  removing shjobw2


p = 0.2522 >= 0.1000  removing avgcumdosew2


p = 0.9715 >= 0.1000  removing ageXd3


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      28.54
                                                  Prob > chi2     =     0.0000
Log likelihood = -158.60117                       Pseudo R2       =     0.0826

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0538093    .0119121      4.52    0.000       .030462     .0771566
       illw2 |     .347449    .2097345      1.66    0.098      -.063623     .7585211
       _cons |   -4.244759    .6492495     -6.54    0.000     -5.517264    -2.972253
-------------+----------------------------------------------------------------


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =        91
             Pearson chi2(88) =        90.18
                  Prob > chi2 =         0.4155

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         3             2  |          5
     -     |        67           268  |        335
-----------+--------------------------+-----------
   Total   |        70           270  |        340

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)    4.29%
Specificity                     Pr( -|~D)   99.26%
Positive predictive value       Pr( D| +)   60.00%
Negative predictive value       Pr(~D| -)   80.00%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.74%
False - rate for true D         Pr( -| D)   95.71%
False + rate for classified +   Pr(~D| +)   40.00%
False - rate for classified -   Pr( D| -)   20.00%
--------------------------------------------------
Correctly classified                        79.71%
--------------------------------------------------

Measures of Fit for logistic of hp2hmcare

Log-Lik Intercept Only:     -172.873     Log-Lik Full Model:         -158.601
D(337):                      317.202     LR(2):                        28.543
                                         Prob > LR:                     0.000
McFadden's R2:                 0.083     McFadden's Adj R2:             0.065
Maximum Likelihood R2:         0.081     Cragg & Uhler's R2:            0.126
McKelvey and Zavoina's R2:     0.140     Efron's R2:                    0.094
Variance of y*:                3.826     Variance of error:             3.290
Count R2:                      0.797     Adj Count R2:                  0.014
AIC:                           0.951     AIC*n:                       323.202
BIC:                       -1647.152     BIC':                        -16.886

Trimmed gender=2 hp2hmcare impact of dose in wave 2

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


age               double   %8.0g                    *   Respondent's age


occ1w2            double   %15.0g        LABJ           profess executive administration in 1996


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


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


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


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


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


occ7w2            double   %15.0g        LABJ           homemaking caregiving in 1996


occ8w2            double   %15.0g        LABJ           student in 1996


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


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


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


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


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


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.7388 >= 0.1000  removing suprtw2


p = 0.7127 >= 0.1000  removing illw2


p = 0.7000 >= 0.1000  removing shjobw2


p = 0.4326 >= 0.1000  removing havmilsq


p = 0.4184 >= 0.1000  removing ageXd3


p = 0.1321 >= 0.1000  removing avgcumdosew2


Logistic regression                               Number of obs   =        363
                                                  LR chi2(1)      =      74.63
                                                  Prob > chi2     =     0.0000
Log likelihood = -196.41342                       Pseudo R2       =     0.1597

-------------+----------------------------------------------------------------
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0907219    .0119185      7.61    0.000      .0673621     .1140817
       _cons |   -5.350036    .6457493     -8.29    0.000     -6.615682    -4.084391
-------------+----------------------------------------------------------------


Logistic model for hp2hmcare, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =        49
             Pearson chi2(47) =        39.93
                  Prob > chi2 =         0.7580

Logistic model for hp2hmcare

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        62            33  |         95
     -     |        63           205  |        268
-----------+--------------------------+-----------
   Total   |       125           238  |        363

Classified + if predicted Pr(D) >= .5
True D defined as hp2hmcare != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   49.60%
Specificity                     Pr( -|~D)   86.13%
Positive predictive value       Pr( D| +)   65.26%
Negative predictive value       Pr(~D| -)   76.49%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)   13.87%
False - rate for true D         Pr( -| D)   50.40%
False + rate for classified +   Pr(~D| +)   34.74%
False - rate for classified -   Pr( D| -)   23.51%
--------------------------------------------------
Correctly classified                        73.55%
--------------------------------------------------

Measures of Fit for logistic of hp2hmcare

Log-Lik Intercept Only:     -233.729     Log-Lik Full Model:         -196.413
D(361):                      392.827     LR(1):                        74.630
                                         Prob > LR:                     0.000
McFadden's R2:                 0.160     McFadden's Adj R2:             0.151
Maximum Likelihood R2:         0.186     Cragg & Uhler's R2:            0.257
McKelvey and Zavoina's R2:     0.261     Efron's R2:                    0.204
Variance of y*:                4.449     Variance of error:             3.290
Count R2:                      0.736     Adj Count R2:                  0.232
AIC:                           1.093     AIC*n:                       396.827
BIC:                       -1735.053     BIC':                        -68.736

.
. scalar hmcareModFw2 = "none"

.
.
.
. * age and illw2 are a female mediators of dose - home care impact
.
. * age is a male and female mediator with impact on home care
. glm age avgcumdosew2 if gender==1,  fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1330.6004

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

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

                                                   AIC             =  7.838826
Log likelihood   =   -1330.6004                    BIC             =  47947.46

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5832314    .2635871      2.21    0.027      .0666101     1.099853
       _cons |    48.62133    .7061562     68.85    0.000      47.23729     50.00537
-------------+----------------------------------------------------------------

. 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 avgcumdosew2 if gender==2,  fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1406.9403

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

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

                                                   AIC             =  7.762756
Log likelihood   = -1406.940271                    BIC             =  47299.65

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.502324    .4454009      3.37    0.001      .6293547     2.375294
       _cons |    48.86944    .7323225     66.73    0.000      47.43412     50.30477
-------------+----------------------------------------------------------------

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

.
.
. * illw2 is a male mediator wrt dose home care impact
. glm illw2 avgcumdosew2 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -303.59609

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

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

                                                   AIC             =  1.797624
Log likelihood   = -303.5960853                    BIC             = -1851.445

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .0085423    .0128556      0.66    0.506     -.0166543     .0337389
       _cons |    .2741359    .0344406      7.96    0.000      .2066336     .3416382
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =   338.889
Iteration 2:   deviance =  338.7479
Iteration 3:   deviance =  338.7478
Iteration 4:   deviance =  338.7478

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  338.7478085                    (1/df) Deviance =  1.002212
Pearson          =  338.1071125                    (1/df) Pearson  =  1.000317

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

                                                   BIC             = -1631.436

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .3223509    .1214283      2.65    0.008      .0843558      .560346
       _cons |    -.926217    .0878912    -10.54    0.000     -1.098481    -.7539535
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm illw2 avgcumdosew2 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -463.51524

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

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

                                                   AIC             =  2.564822
Log likelihood   = -463.5152411                    BIC             = -1854.645

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1249912    .0331157      3.77    0.000      .0600856     .1898968
       _cons |     .301285    .0544484      5.53    0.000       .194568     .4080019
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  466.1156
Iteration 2:   deviance =  465.4957
Iteration 3:   deviance =  465.4956
Iteration 4:   deviance =  465.4956

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  465.4955997                    (1/df) Deviance =  1.289461
Pearson          =   362.823507                    (1/df) Pearson  =  1.005051

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

                                                   BIC             = -1662.384

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .1070451    .0863777      1.24    0.215     -.0622522     .2763423
       _cons |   -.4461214    .0854256     -5.22    0.000     -.6135525    -.2786904
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
.
. scalar hmcareMedMw2 = "age illw2"

. scalar hmcareMedFw2 = "age illw2"

. scalar list
  wkMedMw2 = bf8 age illw2
VactnMedFw2 = age illw2 radhlw2
VactnMedMw2 = age illw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 deaw2
SigDoseVactnFw2 = no
vactnModMw2 = none
MainEffVactnMw2 = age bf7m radhlw2
SigDoseVactnMw2 = no
sxLifeMedFw2 = age bf4 bf4m
sxLifeMedMw2 = age illw2
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
  InthbMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
sxlifeMedMw2 = age illw2
sxlifeModFw2 = none
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m shrelaw2 shfamw2
SigDoseSxlifeFw2 = no
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
MainEffsxlifeMw2 = age bf4 illw2 radhlw2
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf1 bf4 dvcew2 bf7m
ProbsocMedFw2 = age radhlw2
ProbsocMedMw2 = age
ProbsocModFw2 = none
MainEffProbSocFw2 = age radhlw2 illw2 Shrelaw2 avgcumodsew2
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
MainEffPrbsocMw2 = age radhlw2 shjobw2
hmcareMedFw2 = age illw2
hmcareMedMw2 = age illw2
hmcareModFw2 = none
SigDoseWKFw2 =          0
SigdoseHmcareFw2 = no
hmcareModMw2 = none
MainEffhmcareMw2 = none
SigDoseHmcareMw2 = no
  wkMedFw2 = radhlw2 age bf40 bf4m bf1
  wkModFw2 = none
  wkModMw2 = none
MainEffwkFw2 = age
MainEffwkMw2 = workM: age  bf8  illw2  shjobw2
SigDoseWKMw2 = no
SigDoseWkFw2 = no
hmcrMedFw1 = age icdxcnt shjobw1 bf4 BSIsoma WHPpain WHPsleep WHPel
hmcrMedMw1 = age
MainEffhmcrFw1 = illw1 age
SigDosehmcrFw1 = no
hmcrModMw1 = none
MainEffhmcrMw1 = age shjobw1
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
MainEffwkFw1 = age
MainEffwkMw1 = age
  wkMedMw1 = bf40
  WkMedMw1 = none
  WkModFw1 = none
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
 medsigFw1 =          1
prbsocnumMAsig =          8

.
. * conclusion "age & illw2 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 illw2Xd3 illw2 avgcumdosew2 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -561.33689

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

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

                                                   AIC             =  3.319629
Log likelihood   = -561.3368924                    BIC             = -1423.554

-------------+----------------------------------------------------------------
             |                 OIM
     illw2Xd3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .6995256    .1162537      6.02    0.000      .4716726     .9273787
avgcumdosew2 |    .5560421    .0274943     20.22    0.000      .5021543     .6099299
       _cons |   -.4073759    .0802126     -5.08    0.000     -.5645897    -.2501622
-------------+----------------------------------------------------------------

. glm hp2hmcare illw2Xd3 illw2 avgcumdosew2 if gender==1, fam(binomial) ///
>   irls scale(dev) link(probit)

Iteration 1:   deviance =  338.5042
Iteration 2:   deviance =  338.3318
Iteration 3:   deviance =  338.3296
Iteration 4:   deviance =  338.3295
Iteration 5:   deviance =  338.3295
Iteration 6:   deviance =  338.3295

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  338.3295375                    (1/df) Deviance =  1.006933
Pearson          =  337.9090682                    (1/df) Pearson  =  1.005682

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

                                                   BIC             = -1620.196

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    illw2Xd3 |     .043344    .0744303      0.58    0.560     -.1025368     .1892247
       illw2 |    .2934865    .1303698      2.25    0.024      .0379663     .5490066
avgcumdosew2 |     -.02475    .0655641     -0.38    0.706     -.1532532     .1037532
       _cons |   -.9097069    .1011012     -9.00    0.000     -1.107862    -.7115522
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. glm illw2Xd3 illw2 avgcumdosew2 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -802.15873

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       360
                                                   Scale parameter =  4.903891
Deviance         =  1765.400887                    (1/df) Deviance =  4.903891
Pearson          =  1765.400887                    (1/df) Pearson  =  4.903891

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

                                                   AIC             =  4.436136
Log likelihood   = -802.1587263                    BIC             = -356.5841

-------------+----------------------------------------------------------------
             |                 OIM
     illw2Xd3 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    1.477942    .1339686     11.03    0.000      1.215369     1.740516
avgcumdosew2 |     1.48752    .0859399     17.31    0.000      1.319081     1.655959
       _cons |   -1.335179    .1443511     -9.25    0.000     -1.618101    -1.052256
-------------+----------------------------------------------------------------

. glm hp2hmcare illw2Xd3 illw2 avgcumdosew2 if gender==2, fam(binomial) ///
>    irls scale(dev) link(probit)

Iteration 1:   deviance =  463.5448
Iteration 2:   deviance =  462.9346
Iteration 3:   deviance =   462.934
Iteration 4:   deviance =   462.934
Iteration 5:   deviance =   462.934

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       359
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =    462.93402                    (1/df) Deviance =   1.28951
Pearson          =  361.7870308                    (1/df) Pearson  =  1.007763

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

                                                   BIC             = -1653.157

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    illw2Xd3 |   -.0539164    .0417648     -1.29    0.197     -.1357739     .0279411
       illw2 |    .1869825    .1045198      1.79    0.074     -.0178725     .3918376
avgcumdosew2 |    .0522197    .0762058      0.69    0.493      -.097141     .2015804
       _cons |   -.4961458     .106924     -4.64    0.000     -.7057129    -.2865786
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. glm havmilsq avgcumdosew2 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -4357.4808

Generalized linear models                          No. of obs      =       340
Optimization     : ML                              Residual df     =       338
                                                   Scale parameter =  7.98e+09
Deviance         =  2.69740e+12                    (1/df) Deviance =  7.98e+09
Pearson          =  2.69740e+12                    (1/df) Pearson  =  7.98e+09

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

                                                   AIC             =    25.644
Log likelihood   = -4357.480823                    BIC             =  2.70e+12

-------------+----------------------------------------------------------------
             |                 OIM
     havmilsq |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -1562.571    1937.625     -0.81    0.420     -5360.246     2235.104
       _cons |    18476.58    5190.943      3.56    0.000      8302.515     28650.64
-------------+----------------------------------------------------------------

. 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 avgcumdosew2 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -5315.5316

Generalized linear models                          No. of obs      =       363
Optimization     : ML                              Residual df     =       361
                                                   Scale parameter =  3.08e+11
Deviance         =  1.11295e+14                    (1/df) Deviance =  3.08e+11
Pearson          =  1.11295e+14                    (1/df) Pearson  =  3.08e+11

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

                                                   AIC             =  29.29769
Log likelihood   =  -5315.53158                    BIC             =  1.11e+14

-------------+----------------------------------------------------------------
             |                 OIM
     havmilsq |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -2103.378    21135.06     -0.10    0.921     -43527.34     39320.58
       _cons |    62705.69       34750      1.80    0.071     -5403.056     130814.4
-------------+----------------------------------------------------------------

. 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 radhlw2 avgcumdosew2 if gender==1, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1693.4076

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

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

                                                   AIC             =  9.972986
Log likelihood   = -1693.407647                    BIC             =  419831.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.220373     .766216      1.59    0.111     -.2813831     2.722128
       _cons |    45.63198    2.052711     22.23    0.000      41.60874     49.65522
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  320.2142
Iteration 2:   deviance =  319.4143
Iteration 3:   deviance =  319.4134
Iteration 4:   deviance =  319.4134

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  319.4134212                    (1/df) Deviance =  .9450101
Pearson          =  343.7631942                    (1/df) Pearson  =  1.017051

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

                                                   BIC             =  -1650.77

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0113273    .0022041      5.14    0.000      .0070074     .0156472
       _cons |   -1.415444    .1449647     -9.76    0.000      -1.69957    -1.131318
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

. glm radhlw2 avgcumdosew2 if gender==2, fam(gaussian) link(identity)

Iteration 0:   log likelihood = -1791.2233

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

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

                                                   AIC             =  9.880018
Log likelihood   = -1791.223306                    BIC             =  408533.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    3.302288    1.283833      2.57    0.010      .7860214     5.818555
       _cons |    56.95167    2.110863     26.98    0.000      52.81445     61.08888
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  465.9397
Iteration 2:   deviance =   465.344
Iteration 3:   deviance =  465.3439
Iteration 4:   deviance =  465.3439

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  465.3438602                    (1/df) Deviance =  1.289041
Pearson          =  362.9626143                    (1/df) Pearson  =  1.005437

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

                                                   BIC             = -1662.536

-------------+----------------------------------------------------------------
             |                 EIM
    hp2hmcare |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0029148    .0022776      1.28    0.201     -.0015493     .0073789
       _cons |   -.5772317    .1586961     -3.64    0.000     -.8882703     -.266193
-------------+----------------------------------------------------------------
(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 HP2hmcrMw2 = J(1,8, 0)

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

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

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

.     matrix rownames HP2hmcrMw2 = hmcareM

.     matrix rownames HP2hmcrFw2 = hmcareF

.     matrix define HP2hmcrFw2= (1, 2, 3, 2, 0 ,2,  0  , 2 )

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

.         matrix define H1pt2w2 = (HP2wkMw2 \ HP2wkFw2 \ HP2hmcrMw2 \HP2hmcrFw2)

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

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

.     matrix rownames H1pt2w2 = HP2wkMw2 WHP2wkFw2 HP2hmcrMw2 HP2hmcrFw2

.         matlist H1pt2w2

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig
-------------+-----------------------------------------------------------------------------
HP2wkMw2   |         1            2            3            1            0            4            0
WHP2wkFw2   |         1            2            3            2            0            1            0
HP2hmcrMw2   |         1            2            3            1            0            4            0
HP2hmcrFw2   |         1            2            3            2            0            2            0

   | numMed
-------------+-----------
HP2wkMw2   |         4
WHP2wkFw2   |         6
HP2hmcrMw2   |         2
HP2hmcrFw2   |         2

.
. * see scalar list for names of variables
.
.
. * 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 2 part2   H1: Test of hypothesis 1 Part 2 "


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****         3. wave 2 part2   H1: Test of hypothesis 1 Part 2           *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:07  *****
*******************************************************************************
*******************************************************************************


. title " wave 2 Dose - HP2probsoc Main effects identification"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        wave 2 Dose - HP2probsoc Main effects identification         *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:07  *****
*******************************************************************************
*******************************************************************************


. forvalues j=2/2 {
  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 nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:07  *****
*******************************************************************************
*******************************************************************************


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

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

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

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

note: occ7w2 != 0 predicts failure perfectly
      occ7w2 dropped and 14 obs not used

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

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

note: inc4w2 != 0 predicts failure perfectly
      inc4w2 dropped and 10 obs not used

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

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

note: marrw25 != 0 predicts success perfectly
      marrw25 dropped and 1 obs not used

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

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

Logistic regression                               Number of obs   =        217
                                                  LR chi2(40)     =     113.21
                                                  Prob > chi2     =     0.0000
Log likelihood = -47.096671                       Pseudo R2       =     0.5459

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1159429    .0419803      2.76    0.006      .0336631     .1982228
    _Ieduc_2 |   -.0479004    1.407174     -0.03    0.973      -2.80591     2.710109
    _Ieduc_3 |   -.8284731    .7880615     -1.05    0.293     -2.373045      .716099
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |    .2454375    1.100079      0.22    0.823     -1.910677     2.401552
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |     -1.3725    16.54078     -0.08    0.934     -33.79183     31.04683
      occ2w2 |   -1.244674    16.53791     -0.08    0.940     -33.65838     31.16903
      occ3w2 |   -.7835828    16.55903     -0.05    0.962     -33.23868     31.67152
      occ4w2 |   -3.862736    16.57719     -0.23    0.816     -36.35344     28.62797
      occ5w2 |   -2.775301    16.58962     -0.17    0.867     -35.29036     29.73976
      occ6w2 |           0   (omitted)
      occ7w2 |           0   (omitted)
      occ8w2 |           0   (omitted)
     marrw21 |    12.58162    1075.856      0.01    0.991     -2096.057      2121.22
     marrw22 |           0   (omitted)
     marrw23 |    10.03646    1075.856      0.01    0.993     -2098.602     2118.675
     marrw25 |           0   (omitted)
     marrw26 |           0   (omitted)
      inc1w2 |    .0757099    16.62358      0.00    0.996     -32.50591     32.65733
      inc2w2 |    2.619578    16.55703      0.16    0.874     -29.83159     35.07075
      inc3w2 |     4.14916      16.572      0.25    0.802     -28.33137     36.62969
      inc4w2 |           0   (omitted)
     radhlw2 |    .0130005    .0142344      0.91    0.361     -.0148985     .0408995
      havmil |    -.002818    .0090337     -0.31    0.755     -.0205238     .0148877
avgcumdosew2 |    .0114306    .0823526      0.14    0.890     -.1499776     .1728387
         bf1 |    .0037783    .0642153      0.06    0.953     -.1220814      .129638
         bf4 |     .016836    .3033169      0.06    0.956     -.5776542     .6113261
         bf2 |    .0006302    .0003126      2.02    0.044      .0000175     .0012428
        bf4m |   -.5319968    .2823116     -1.88    0.060     -1.085317     .0213237
        bf5m |    .0058806    .0028091      2.09    0.036      .0003749     .0113862
        bf7m |    .0013216    .0011466      1.15    0.249     -.0009257     .0035688
         bf8 |   -.0001829    .0000911     -2.01    0.045     -.0003616    -4.31e-06
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0241214    .0536769     -0.45    0.653     -.1293262     .0810833
        bf22 |    .0004188    .0002855      1.47    0.142     -.0001407     .0009783
        bf29 |    -.000073    .0001017     -0.72    0.473     -.0002723     .0001263
        bf30 |   -.0016782    .0007996     -2.10    0.036     -.0032455     -.000111
        bf40 |   -.1773534    .3453449     -0.51    0.608      -.854217     .4995102
       deaw2 |   -.7039739    .7523846     -0.94    0.349     -2.178621     .7706728
      dvcew2 |           0   (omitted)
      sepaw2 |           0   (omitted)
      accdw2 |   -.0469037    .8655378     -0.05    0.957     -1.743327     1.649519
      movew2 |    1.585081    .8835966      1.79    0.073     -.1467362     3.316899
       illw2 |   -.6496621    .6161215     -1.05    0.292     -1.857238     .5579138
     shfamw2 |   -.0160373    .0116025     -1.38    0.167     -.0387778     .0067033
      shhlw2 |   -.0105176    .0138341     -0.76    0.447     -.0376321     .0165968
     shjobw2 |    .0250231    .0129193      1.94    0.053     -.0002983     .0503445
    shrelaw2 |   -.0217826    .0114409     -1.90    0.057     -.0442063     .0006412
     suprtw2 |    .0083099    .0108445      0.77    0.444      -.012945     .0295648
     suchrw2 |    .0212997    .0111718      1.91    0.057     -.0005966     .0431959
    havmilsq |    6.25e-06    .0000101      0.62    0.537     -.0000136     .0000261
       _cons |   -13.61182    1075.864     -0.01    0.990     -2122.266     2095.042
-------------+----------------------------------------------------------------


Note: 2 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        26             4  |         30
     -     |        14           173  |        187
-----------+--------------------------+-----------
   Total   |        40           177  |        217

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   65.00%
Specificity                     Pr( -|~D)   97.74%
Positive predictive value       Pr( D| +)   86.67%
Negative predictive value       Pr(~D| -)   92.51%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.26%
False - rate for true D         Pr( -| D)   35.00%
False + rate for classified +   Pr(~D| +)   13.33%
False - rate for classified -   Pr( D| -)    7.49%
--------------------------------------------------
Correctly classified                        91.71%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       217
 number of covariate patterns =       217
            Pearson chi2(176) =       158.28
                  Prob > chi2 =         0.8270

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -103.704     Log-Lik Full Model:          -47.097
D(161):                       94.193     LR(40):                      113.215
                                         Prob > LR:                     0.000
McFadden's R2:                 0.546     McFadden's Adj R2:             0.006
Maximum Likelihood R2:         0.407     Cragg & Uhler's R2:            0.660
McKelvey and Zavoina's R2:     0.840     Efron's R2:                    0.562
Variance of y*:               20.586     Variance of error:             3.290
Count R2:                      0.917     Adj Count R2:                  0.550
AIC:                           0.950     AIC*n:                       206.193
BIC:                        -771.970     BIC':                        101.981
Full main model for HP2probsoc for wave= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:08  *****
*******************************************************************************
*******************************************************************************


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

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

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

Logistic regression                               Number of obs   =        341
                                                  LR chi2(50)     =     174.30
                                                  Prob > chi2     =     0.0000
Log likelihood = -89.934458                       Pseudo R2       =     0.4921

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1034919    .0270041      3.83    0.000      .0505648     .1564191
    _Ieduc_2 |   -13.17654    1236.407     -0.01    0.991      -2436.49     2410.137
    _Ieduc_3 |   -13.38577    1236.407     -0.01    0.991     -2436.699     2409.928
    _Ieduc_4 |   -12.54323    1236.407     -0.01    0.992     -2435.857     2410.771
    _Ieduc_5 |   -12.47221    1236.407     -0.01    0.992     -2435.786     2410.842
    _Ieduc_6 |   -13.80248    1236.407     -0.01    0.991     -2437.116     2409.511
    _Ieduc_7 |   -15.17121    1236.497     -0.01    0.990     -2438.662     2408.319
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.147886    3.571925     -0.32    0.748      -8.14873     5.852957
      occ2w2 |   -1.271517    3.611241     -0.35    0.725     -8.349419     5.806385
      occ3w2 |    .2117582    3.586153      0.06    0.953     -6.816973      7.24049
      occ4w2 |   -1.534382    3.689834     -0.42    0.678     -8.766324      5.69756
      occ5w2 |   -2.414751      3.8284     -0.63    0.528     -9.918277     5.088775
      occ6w2 |           0   (omitted)
      occ7w2 |   -.6787306    3.585162     -0.19    0.850      -7.70552     6.348058
      occ8w2 |    2.909649    3.844529      0.76    0.449     -4.625489     10.44479
     marrw21 |   -1.181403    1.729099     -0.68    0.494     -4.570375     2.207569
     marrw22 |    1.066113    1.762045      0.61    0.545     -2.387432     4.519658
     marrw23 |    .6150888    .9283649      0.66    0.508     -1.204473     2.434651
     marrw25 |    .4424041    1.311023      0.34    0.736     -2.127154     3.011962
     marrw26 |           0   (omitted)
      inc1w2 |     .302891    3.591795      0.08    0.933     -6.736898      7.34268
      inc2w2 |    1.142371    3.560505      0.32    0.748     -5.836091     8.120833
      inc3w2 |    .8314334    3.569583      0.23    0.816     -6.164821     7.827688
      inc4w2 |    .0290561    3.848853      0.01    0.994     -7.514557      7.57267
     radhlw2 |    .0111407    .0096438      1.16    0.248     -.0077607     .0300422
      havmil |    .0005515    .0077361      0.07    0.943     -.0146109     .0157139
avgcumdosew2 |     .546822      .23001      2.38    0.017      .0960107     .9976333
         bf1 |    .0275412    .0390831      0.70    0.481     -.0490602     .1041427
         bf4 |   -.4078914    .2433269     -1.68    0.094     -.8848033     .0690205
         bf2 |    .0001427    .0001416      1.01    0.314     -.0001349     .0004204
        bf4m |    .1372093    .2260724      0.61    0.544     -.3058844     .5803031
        bf5m |   -.0016005    .0026021     -0.62    0.538     -.0067005     .0034995
        bf7m |    .0002743    .0007319      0.37    0.708     -.0011601     .0017087
         bf8 |    .0000233    .0000548      0.42    0.671     -.0000841     .0001306
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |     -.04615    .0319322     -1.45    0.148     -.1087361      .016436
        bf22 |    9.68e-06    .0001672      0.06    0.954      -.000318     .0003374
        bf29 |   -.0000266    .0000488     -0.54    0.586     -.0001221      .000069
        bf30 |    .0001087    .0003798      0.29    0.775     -.0006357     .0008531
        bf40 |   -.0077229    .1716746     -0.04    0.964      -.344199     .3287532
       deaw2 |   -.0328171    .2515674     -0.13    0.896     -.5258803      .460246
      dvcew2 |    1.645199    1.729548      0.95    0.341     -1.744652      5.03505
      sepaw2 |    -.787699    2.185185     -0.36    0.718     -5.070584     3.495186
      accdw2 |   -.7482691    .7741464     -0.97    0.334     -2.265568     .7690299
      movew2 |   -.1983887    .9882329     -0.20    0.841      -2.13529     1.738512
       illw2 |     .037099    .2627647      0.14    0.888     -.4779104     .5521084
     shfamw2 |   -.0189411    .0086476     -2.19    0.028       -.03589    -.0019922
      shhlw2 |    .0013266    .0086367      0.15    0.878     -.0156011     .0182542
     shjobw2 |   -.0022444    .0078272     -0.29    0.774     -.0175855     .0130966
    shrelaw2 |   -.0057107    .0089259     -0.64    0.522     -.0232051     .0117837
     suprtw2 |    .0019185    .0068705      0.28    0.780     -.0115475     .0153845
     suchrw2 |   -.0030114    .0077253     -0.39    0.697     -.0181526     .0121298
    havmilsq |   -5.64e-06    .0000161     -0.35    0.725     -.0000371     .0000258
       _cons |    8.438379    1236.411      0.01    0.995     -2414.883      2431.76
-------------+----------------------------------------------------------------


Note: 2 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        52            13  |         65
     -     |        21           255  |        276
-----------+--------------------------+-----------
   Total   |        73           268  |        341

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   71.23%
Specificity                     Pr( -|~D)   95.15%
Positive predictive value       Pr( D| +)   80.00%
Negative predictive value       Pr(~D| -)   92.39%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.85%
False - rate for true D         Pr( -| D)   28.77%
False + rate for classified +   Pr(~D| +)   20.00%
False - rate for classified -   Pr( D| -)    7.61%
--------------------------------------------------
Correctly classified                        90.03%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       341
 number of covariate patterns =       341
            Pearson chi2(290) =       351.64
                  Prob > chi2 =         0.0077

Measures of Fit for logistic of HP2probsoc

Log-Lik Intercept Only:     -177.084     Log-Lik Full Model:          -89.934
D(285):                      179.869     LR(50):                      174.299
                                         Prob > LR:                     0.000
McFadden's R2:                 0.492     McFadden's Adj R2:             0.176
Maximum Likelihood R2:         0.400     Cragg & Uhler's R2:            0.619
McKelvey and Zavoina's R2:     0.858     Efron's R2:                    0.531
Variance of y*:               23.160     Variance of error:             3.290
Count R2:                      0.900     Adj Count R2:                  0.534
AIC:                           0.856     AIC*n:                       291.869
BIC:                       -1482.218     BIC':                        117.295

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

. * male models
. set more off

.         forvalues j=2/2 {
  2. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. title3 "trimmed HP2probsoc main effects models wave 2 for H1 part 2 with dose ns"
  4. title "wave 2 dose HP2probsoc relationship but avgcumdosew`j': Dose not signif"
  5. xi:logit HP2probsoc age i.educ radhlw2 accdw`j' bf8  shjobw`j' suchrw2 havmilsq ///
>     avgcumdosew`j' if gender==1
  6.                         estat class
  7.                         estat gof
  8.                         fitstat
  9. }
-------------
title3 : trimmed HP2probsoc main effects models wave 2 for H1 part 2 with dose ns
 1 Jul 2012
15:02:10
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
Data file  chwide1jul2012.dta  currrently has  2395  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 2 dose HP2probsoc relationship but avgcumdosew2: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:10  *****
*******************************************************************************
*******************************************************************************


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 = -97.278367
Iteration 2:   log likelihood = -91.419426
Iteration 3:   log likelihood = -91.263695
Iteration 4:   log likelihood = -91.263586
Iteration 5:   log likelihood = -91.263586

Logistic regression                               Number of obs   =        320
                                                  LR chi2(11)     =      62.47
                                                  Prob > chi2     =     0.0000
Log likelihood = -91.263586                       Pseudo R2       =     0.2550

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0708065    .0177532      3.99    0.000      .0360108     .1056021
    _Ieduc_2 |    .0385275    .9109987      0.04    0.966     -1.746997     1.824052
    _Ieduc_3 |   -.5726249     .461212     -1.24    0.214     -1.476584     .3313341
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.2324702    .5513297     -0.42    0.673     -1.313057     .8481161
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
     radhlw2 |    .0254018     .006594      3.85    0.000      .0124778     .0383257
      accdw2 |   -.5083029    .6480971     -0.78    0.433      -1.77855     .7619441
         bf8 |   -.0000267    .0000244     -1.09    0.274     -.0000745     .0000212
     shjobw2 |    .0157373    .0055054      2.86    0.004      .0049469     .0265278
     suchrw2 |      .00109    .0046549      0.23    0.815     -.0080334     .0102134
    havmilsq |   -1.25e-06    5.36e-06     -0.23    0.815     -.0000118     9.25e-06
avgcumdosew2 |    .0268182    .0517674      0.52    0.604     -.0746441     .1282805
       _cons |   -7.869049    1.225988     -6.42    0.000     -10.27194    -5.466157
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        12             2  |         14
     -     |        29           277  |        306
-----------+--------------------------+-----------
   Total   |        41           279  |        320

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   29.27%
Specificity                     Pr( -|~D)   99.28%
Positive predictive value       Pr( D| +)   85.71%
Negative predictive value       Pr(~D| -)   90.52%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.72%
False - rate for true D         Pr( -| D)   70.73%
False + rate for classified +   Pr(~D| +)   14.29%
False - rate for classified -   Pr( D| -)    9.48%
--------------------------------------------------
Correctly classified                        90.31%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       320
 number of covariate patterns =       317
            Pearson chi2(305) =       353.85
                  Prob > chi2 =         0.0282

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -122.498     Log-Lik Full Model:          -91.264
D(304):                      182.527     LR(11):                       62.469
                                         Prob > LR:                     0.000
McFadden's R2:                 0.255     McFadden's Adj R2:             0.124
Maximum Likelihood R2:         0.177     Cragg & Uhler's R2:            0.332
McKelvey and Zavoina's R2:     0.447     Efron's R2:                    0.255
Variance of y*:                5.948     Variance of error:             3.290
Count R2:                      0.903     Adj Count R2:                  0.244
AIC:                           0.670     AIC*n:                       214.527
BIC:                       -1571.042     BIC':                          0.982

.
.
. forvalues j=2/2 {
  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 2             *****
*****                     for H1 part 2 with dose ns                      *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:12  *****
*******************************************************************************
*******************************************************************************


-------------
title2: Wave `j dose HP2work relationship but avgcumdosew2: Dose not signif
                                       Date and time:   1 Jul 2012    15:02:12
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
                                       Stata data file:  chwide1jul2012.dta  has  2395  variables and  703  observations

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

.
. foreach var in suchrw2 radhlw2 shjobw2 {
  2.  cap gen `var'Xd3= `var'*avgcumdosew2
  3.  }

.
. forvalues j=2/2 {
  2.   title "Main effects Dose ProbSoc model for males"
  3.   logit HP2probsoc age avgcumdosew2 radhlw2 shjobw`j' if gender==1
  4.                         estat class
  5.                         estat gof
  6.                         fitstat
  7. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****             Main effects Dose ProbSoc model for males               *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:12  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -102.49803
Iteration 2:   log likelihood = -97.612007
Iteration 3:   log likelihood = -97.514638
Iteration 4:   log likelihood = -97.514623
Iteration 5:   log likelihood = -97.514623

Logistic regression                               Number of obs   =        340
                                                  LR chi2(4)      =      55.28
                                                  Prob > chi2     =     0.0000
Log likelihood = -97.514623                       Pseudo R2       =     0.2208

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0650468    .0171243      3.80    0.000      .0314838     .0986098
avgcumdosew2 |    .0250528    .0516618      0.48    0.628     -.0762025     .1263081
     radhlw2 |    .0217043    .0059664      3.64    0.000      .0100104     .0333982
     shjobw2 |    .0153749    .0050929      3.02    0.003      .0053929     .0253569
       _cons |   -7.726421     1.13381     -6.81    0.000     -9.948647    -5.504194
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         9             1  |         10
     -     |        32           298  |        330
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.95%
Specificity                     Pr( -|~D)   99.67%
Positive predictive value       Pr( D| +)   90.00%
Negative predictive value       Pr(~D| -)   90.30%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.33%
False - rate for true D         Pr( -| D)   78.05%
False + rate for classified +   Pr(~D| +)   10.00%
False - rate for classified -   Pr( D| -)    9.70%
--------------------------------------------------
Correctly classified                        90.29%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       327
            Pearson chi2(322) =       384.78
                  Prob > chi2 =         0.0093

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -97.515
D(335):                      195.029     LR(4):                        55.276
                                         Prob > LR:                     0.000
McFadden's R2:                 0.221     McFadden's Adj R2:             0.181
Maximum Likelihood R2:         0.150     Cragg & Uhler's R2:            0.288
McKelvey and Zavoina's R2:     0.411     Efron's R2:                    0.210
Variance of y*:                5.584     Variance of error:             3.290
Count R2:                      0.903     Adj Count R2:                  0.195
AIC:                           0.603     AIC*n:                       205.029
BIC:                       -1757.668     BIC':                        -31.960

.
. scalar MainEffPrbsocMw2 = "age radhlw2 shjobw2"

.
.
. forvalues j=2/2 {
  2.   logit HP2probsoc age  radhlw2 shjobw`j'  ///
>       avgcumdosew`j' ///
>        shjobw2Xd3 if gender==1
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -102.40367
Iteration 2:   log likelihood = -97.802085
Iteration 3:   log likelihood = -96.367187
Iteration 4:   log likelihood = -96.245667
Iteration 5:   log likelihood = -96.239265
Iteration 6:   log likelihood = -96.239247
Iteration 7:   log likelihood = -96.239247

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =      57.83
                                                  Prob > chi2     =     0.0000
Log likelihood = -96.239247                       Pseudo R2       =     0.2310

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0645913    .0169521      3.81    0.000      .0313658     .0978168
     radhlw2 |    .0222475    .0060296      3.69    0.000      .0104297     .0340653
     shjobw2 |    .0092759    .0068028      1.36    0.173     -.0040574     .0226091
avgcumdosew2 |   -.7357041    .6602672     -1.11    0.265     -2.029804     .5583958
  shjobw2Xd3 |    .0081692    .0068728      1.19    0.235     -.0053013     .0216397
       _cons |   -7.172995    1.201125     -5.97    0.000     -9.527157    -4.818833
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        10             2  |         12
     -     |        31           297  |        328
-----------+--------------------------+-----------
   Total   |        41           299  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   24.39%
Specificity                     Pr( -|~D)   99.33%
Positive predictive value       Pr( D| +)   83.33%
Negative predictive value       Pr(~D| -)   90.55%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    0.67%
False - rate for true D         Pr( -| D)   75.61%
False + rate for classified +   Pr(~D| +)   16.67%
False - rate for classified -   Pr( D| -)    9.45%
--------------------------------------------------
Correctly classified                        90.29%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       327
            Pearson chi2(321) =       353.15
                  Prob > chi2 =         0.1047

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -125.152     Log-Lik Full Model:          -96.239
D(334):                      192.478     LR(5):                        57.826
                                         Prob > LR:                     0.000
McFadden's R2:                 0.231     McFadden's Adj R2:             0.183
Maximum Likelihood R2:         0.156     Cragg & Uhler's R2:            0.300
McKelvey and Zavoina's R2:     0.495     Efron's R2:                    0.219
Variance of y*:                6.518     Variance of error:             3.290
Count R2:                      0.903     Adj Count R2:                  0.195
AIC:                           0.601     AIC*n:                       204.478
BIC:                       -1754.389     BIC':                        -28.682

. scalar SigDoseProbsocMw2 = "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 ProbSocModMw2 = "none"

.
.
. ********************************************************************************
. * female dose social problems wave 2 models
.
. forvalues j=2/2 {
  2. set more off
  3. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  4. title3 "partly trimmed HP2probsoc main effects models wave 2 for H1 part 2 with dose ns"
  5. title "wave 2 dose HP2probsoc relationship but avgcumdosew`j': Dose signif here"
  6.  logit HP2probsoc age radhlw2 accdw`j' sepaw`j' illw`j' shjobw`j' ////
>   shrelaw`j' suchrw2 havmilsq avgcumdosew`j' if gender==2, nolog
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }
-------------
title3 : partly trimmed HP2probsoc main effects models wave 2 for H1 part 2 with dose ns
 1 Jul 2012
15:02:14
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
Data file  chwide1jul2012.dta  currrently has  2397  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 2 dose HP2probsoc relationship but avgcumdosew2: Dose signif here*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:14  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        363
                                                  LR chi2(10)     =     125.06
                                                  Prob > chi2     =     0.0000
Log likelihood = -121.03832                       Pseudo R2       =     0.3406

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1153677    .0182285      6.33    0.000      .0796406     .1510948
     radhlw2 |    .0186525    .0056295      3.31    0.001      .0076189     .0296861
      accdw2 |   -.4572324    .6196198     -0.74    0.461     -1.671665        .7572
      sepaw2 |   -.2264106    1.149974     -0.20    0.844     -2.480318     2.027497
       illw2 |    .2070637    .1818612      1.14    0.255     -.1493778     .5635051
     shjobw2 |   -.0011404    .0044896     -0.25    0.799     -.0099399      .007659
    shrelaw2 |   -.0074957    .0057617     -1.30    0.193     -.0187885      .003797
     suchrw2 |    .0002657    .0041153      0.06    0.949     -.0078001     .0083315
    havmilsq |   -6.22e-06    6.94e-06     -0.90    0.370     -.0000198     7.38e-06
avgcumdosew2 |    .4048448    .1418923      2.85    0.004      .1267411     .6829486
       _cons |   -9.109529    1.208597     -7.54    0.000     -11.47834    -6.740722
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        37            11  |         48
     -     |        37           278  |        315
-----------+--------------------------+-----------
   Total   |        74           289  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   50.00%
Specificity                     Pr( -|~D)   96.19%
Positive predictive value       Pr( D| +)   77.08%
Negative predictive value       Pr(~D| -)   88.25%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.81%
False - rate for true D         Pr( -| D)   50.00%
False + rate for classified +   Pr(~D| +)   22.92%
False - rate for classified -   Pr( D| -)   11.75%
--------------------------------------------------
Correctly classified                        86.78%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       362
            Pearson chi2(351) =       479.72
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -183.570     Log-Lik Full Model:         -121.038
D(352):                      242.077     LR(10):                      125.064
                                         Prob > LR:                     0.000
McFadden's R2:                 0.341     McFadden's Adj R2:             0.281
Maximum Likelihood R2:         0.291     Cragg & Uhler's R2:            0.458
McKelvey and Zavoina's R2:     0.831     Efron's R2:                    0.386
Variance of y*:               19.413     Variance of error:             3.290
Count R2:                      0.868     Adj Count R2:                  0.351
AIC:                           0.727     AIC*n:                       264.077
BIC:                       -1832.753     BIC':                        -66.120

.
. scalar SigDoseProbsocFw2 = "yes"

. scalar MainEffProbSocFw2 = "age radhlw2 illw2 Shrelaw2 avgcumodsew2"

.
. * trimmed female model with basis functions
. forvalues j=2/2 {
  2. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  3. title "trimmed HP2probsoc main effects models wave 2 for H1 part 2 " "Dose is signif Females"
  4. title "wave 2 dose HP2probsoc relationship but avgcumdosew`j':"
  5. title "Dose is signif but this trimming is too path dependent"
  6. sw, pr(.1): logit HP2probsoc age radhlw2  illw`j' `w2bf' ////
>   shrelaw`j' avgcumdosew`j' if gender==2
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****    trimmed HP2probsoc main effects models wave 2 for H1 part 2      *****
*****                       Dose is signif Females                        *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:16  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       wave 2 dose HP2probsoc relationship but avgcumdosew2:         *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:16  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       Dose is signif but this trimming is too path dependent        *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:16  *****
*******************************************************************************
*******************************************************************************


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.9612 >= 0.1000  removing bf40


p = 0.9509 >= 0.1000  removing bf29


p = 0.7921 >= 0.1000  removing illw2


p = 0.7993 >= 0.1000  removing bf8


p = 0.6044 >= 0.1000  removing bf22


p = 0.5736 >= 0.1000  removing bf2


p = 0.5392 >= 0.1000  removing bf30


p = 0.3501 >= 0.1000  removing bf7m


p = 0.2282 >= 0.1000  removing bf5m


p = 0.2737 >= 0.1000  removing bf1


p = 0.2645 >= 0.1000  removing bf20


p = 0.2181 >= 0.1000  removing bf4m


Logistic regression                               Number of obs   =        351
                                                  LR chi2(5)      =     143.75
                                                  Prob > chi2     =     0.0000
Log likelihood = -108.90897                       Pseudo R2       =     0.3976

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0962607    .0184725      5.21    0.000      .0600553     .1324662
     radhlw2 |    .0145499     .005748      2.53    0.011       .003284     .0258158
avgcumdosew2 |    .4041686    .1517163      2.66    0.008      .1068102     .7015271
    shrelaw2 |   -.0146954    .0058729     -2.50    0.012     -.0262061    -.0031847
         bf4 |   -.1767354    .0368357     -4.80    0.000     -.2489321    -.1045388
       _cons |   -6.140261    1.256194     -4.89    0.000     -8.602356    -3.678166
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        45            10  |         55
     -     |        29           267  |        296
-----------+--------------------------+-----------
   Total   |        74           277  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   60.81%
Specificity                     Pr( -|~D)   96.39%
Positive predictive value       Pr( D| +)   81.82%
Negative predictive value       Pr(~D| -)   90.20%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.61%
False - rate for true D         Pr( -| D)   39.19%
False + rate for classified +   Pr(~D| +)   18.18%
False - rate for classified -   Pr( D| -)    9.80%
--------------------------------------------------
Correctly classified                        88.89%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       350
            Pearson chi2(344) =       405.23
                  Prob > chi2 =         0.0127

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -180.782     Log-Lik Full Model:         -108.909
D(345):                      217.818     LR(5):                       143.747
                                         Prob > LR:                     0.000
McFadden's R2:                 0.398     McFadden's Adj R2:             0.364
Maximum Likelihood R2:         0.336     Cragg & Uhler's R2:            0.523
McKelvey and Zavoina's R2:     0.578     Efron's R2:                    0.445
Variance of y*:                7.801     Variance of error:             3.290
Count R2:                      0.889     Adj Count R2:                  0.473
AIC:                           0.655     AIC*n:                       229.818
BIC:                       -1804.153     BIC':                       -114.443

.
.
. * trimmed female model with basis functions
. forvalues j=2/2 {
  2. set more off
  3. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  4. title "partly trimmed HP2probsoc main effects models wave 2 for H1 part 2 " "Dose is signif Females"
  5. title "wave 2 dose HP2probsoc relationship but avgcumdosew`j':"
  6. title "Dose is not signif when fully trimmed "
  7. title "Dose significance is too path dependent to be stable"
  8. logit HP2probsoc age radhlw2  illw`j' `w2bf' ////
>   shrelaw`j' avgcumdosew`j' if gender==2, nolog
  9.                         estat class
 10.                         estat gof
 11.                         fitstat
 12. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****partly trimmed HP2probsoc main effects models wave 2 for H1 part 2   *****
*****                       Dose is signif Females                        *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:35  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       wave 2 dose HP2probsoc relationship but avgcumdosew2:         *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:35  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****               Dose is not signif when fully trimmed                 *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:35  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        Dose significance is too path dependent to be stable         *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:35  *****
*******************************************************************************
*******************************************************************************


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

note: bf17 omitted because of collinearity

Logistic regression                               Number of obs   =        351
                                                  LR chi2(17)     =     151.27
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.14863                       Pseudo R2       =     0.4184

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0968128    .0198903      4.87    0.000      .0578286     .1357971
     radhlw2 |    .0131268    .0081938      1.60    0.109     -.0029327     .0291864
       illw2 |    .0512501    .1902124      0.27    0.788     -.3215593     .4240595
         bf1 |    .0297711    .0318436      0.93    0.350     -.0326412     .0921834
         bf4 |   -.3702467    .1933363     -1.92    0.055     -.7491789     .0086855
         bf2 |    .0000552    .0001012      0.54    0.586     -.0001433     .0002536
        bf4m |    .1574353    .1794504      0.88    0.380      -.194281     .5091516
        bf5m |   -.0017729    .0021884     -0.81    0.418      -.006062     .0025162
        bf7m |    .0004786    .0006133      0.78    0.435     -.0007234     .0016805
         bf8 |     .000013    .0000438      0.30    0.767     -.0000729     .0000989
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0360318    .0249913     -1.44    0.149     -.0850139     .0129503
        bf22 |   -.0000485    .0001411     -0.34    0.731     -.0003252     .0002281
        bf29 |   -2.02e-06    .0000345     -0.06    0.953     -.0000697     .0000656
        bf30 |    .0001996    .0003187      0.63    0.531     -.0004251     .0008243
        bf40 |    .0074913    .1539797      0.05    0.961     -.2943034      .309286
    shrelaw2 |   -.0131188    .0063308     -2.07    0.038      -.025527    -.0007106
avgcumdosew2 |    .4534463    .1712457      2.65    0.008      .1178109     .7890817
       _cons |   -5.944128    2.135376     -2.78    0.005     -10.12939    -1.758869
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        47            12  |         59
     -     |        27           265  |        292
-----------+--------------------------+-----------
   Total   |        74           277  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   63.51%
Specificity                     Pr( -|~D)   95.67%
Positive predictive value       Pr( D| +)   79.66%
Negative predictive value       Pr(~D| -)   90.75%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.33%
False - rate for true D         Pr( -| D)   36.49%
False + rate for classified +   Pr(~D| +)   20.34%
False - rate for classified -   Pr( D| -)    9.25%
--------------------------------------------------
Correctly classified                        88.89%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       351
            Pearson chi2(333) =       432.31
                  Prob > chi2 =         0.0002

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -180.782     Log-Lik Full Model:         -105.149
D(331):                      210.297     LR(17):                      151.267
                                         Prob > LR:                     0.000
McFadden's R2:                 0.418     McFadden's Adj R2:             0.308
Maximum Likelihood R2:         0.350     Cragg & Uhler's R2:            0.544
McKelvey and Zavoina's R2:     0.610     Efron's R2:                    0.465
Variance of y*:                8.437     Variance of error:             3.290
Count R2:                      0.889     Adj Count R2:                  0.473
AIC:                           0.713     AIC*n:                       250.297
BIC:                       -1729.623     BIC':                        -51.634

.
.
. * trimmed female model with basis functions
. forvalues j=2/2 {
  2. set more off
  3. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  4. title "fully trimmed HP2probsoc main effects models wave 2 for H1 part 2 " "Dose is not signif for Females"
  5. title "wave 2 dose HP2probsoc relationship but avgcumdosew`j':"
  6. title "Dose is not signif "
  7. logit HP2probsoc age radhlw2   b4 ////
>   shrelaw`j' avgcumdosew`j' if gender==2, nolog
  8.                         estat class
  9.                         estat gof
 10.                         fitstat
 11. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
***** fully trimmed HP2probsoc main effects models wave 2 for H1 part 2   *****
*****                   Dose is not signif for Females                    *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:36  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       wave 2 dose HP2probsoc relationship but avgcumdosew2:         *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:36  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                        Dose is not signif                           *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:36  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =     121.71
                                                  Prob > chi2     =     0.0000
Log likelihood = -122.71719                       Pseudo R2       =     0.3315

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .111496    .0203766      5.47    0.000      .0715586     .1514333
     radhlw2 |    .0196292    .0053673      3.66    0.000      .0091095      .030149
       b4Xd3 |    .0068784    .0106999      0.64    0.520     -.0140931     .0278498
    shrelaw2 |   -.0088391    .0053365     -1.66    0.098     -.0192985     .0016202
avgcumdosew2 |   -.0685999    .7594291     -0.09    0.928     -1.557053     1.419854
       _cons |   -9.015948    1.232733     -7.31    0.000     -11.43206    -6.599837
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        38            10  |         48
     -     |        36           279  |        315
-----------+--------------------------+-----------
   Total   |        74           289  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   51.35%
Specificity                     Pr( -|~D)   96.54%
Positive predictive value       Pr( D| +)   79.17%
Negative predictive value       Pr(~D| -)   88.57%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.46%
False - rate for true D         Pr( -| D)   48.65%
False + rate for classified +   Pr(~D| +)   20.83%
False - rate for classified -   Pr( D| -)   11.43%
--------------------------------------------------
Correctly classified                        87.33%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       357
            Pearson chi2(351) =       464.33
                  Prob > chi2 =         0.0000

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -183.570     Log-Lik Full Model:         -122.717
D(357):                      245.434     LR(5):                       121.706
                                         Prob > LR:                     0.000
McFadden's R2:                 0.331     McFadden's Adj R2:             0.299
Maximum Likelihood R2:         0.285     Cragg & Uhler's R2:            0.448
McKelvey and Zavoina's R2:     0.521     Efron's R2:                    0.377
Variance of y*:                6.863     Variance of error:             3.290
Count R2:                      0.873     Adj Count R2:                  0.378
AIC:                           0.709     AIC*n:                       257.434
BIC:                       -1858.867     BIC':                        -92.234

.
.
.
.
.
.
. foreach var in b4 shrelaw2  {
  2.  cap   gen `var'Xd3 = age*avgcumdosew2
  3. }

.
. * testing the female moderator model with basis functions
. forvalues j=2/2 {
  2. local w2bf 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 2 dose HP2socprob relationship but avgcumdosew`j'" " Dose is signif for females"
  5. title "problem is that stepwise backward is too path dependent" "and should be checked by simultaneous trim"
  6. sw, pr(.1): logit HP2probsoc age radhlw2  illw`j' `w2bf' ////
>   shrelaw`j' avgcumdosew`j' b4Xd3 ///
>     if gender==2
  7.                         estat class
  8.                         estat gof
  9.                         fitstat
 10. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        trimmed HP2socprob main effects  wv 3 for Hyp1 pt 2          *****
*****                     dose is signif for females                      *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:38  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        wave 2 dose HP2socprob relationship but avgcumdosew2         *****
*****                     Dose is signif for females                      *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:38  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****      problem is that stepwise backward is too path dependent        *****
*****             and should be checked by simultaneous trim              *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:02:38  *****
*******************************************************************************
*******************************************************************************


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.9383 >= 0.1000  removing bf29


p = 0.9284 >= 0.1000  removing bf40


p = 0.7417 >= 0.1000  removing illw2


p = 0.7055 >= 0.1000  removing bf8


p = 0.6496 >= 0.1000  removing avgcumdosew2


p = 0.5938 >= 0.1000  removing bf2


p = 0.5881 >= 0.1000  removing bf22


p = 0.5207 >= 0.1000  removing bf30


p = 0.3390 >= 0.1000  removing bf7m


p = 0.2342 >= 0.1000  removing bf1


p = 0.2810 >= 0.1000  removing bf20


p = 0.2334 >= 0.1000  removing bf5m


p = 0.2198 >= 0.1000  removing bf4m


Logistic regression                               Number of obs   =        351
                                                  LR chi2(5)      =     144.26
                                                  Prob > chi2     =     0.0000
Log likelihood = -108.65463                       Pseudo R2       =     0.3990

-------------+----------------------------------------------------------------
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0909062     .018443      4.93    0.000      .0547586     .1270537
     radhlw2 |    .0146177    .0057691      2.53    0.011      .0033105      .025925
    shrelaw2 |   -.0146099    .0058727     -2.49    0.013     -.0261202    -.0030996
       b4Xd3 |     .005736    .0020674      2.77    0.006      .0016839      .009788
         bf4 |   -.1769505    .0368092     -4.81    0.000     -.2490952    -.1048059
       _cons |   -5.869429    1.246027     -4.71    0.000     -8.311597    -3.427261
-------------+----------------------------------------------------------------

Logistic model for HP2probsoc

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        45             9  |         54
     -     |        29           268  |        297
-----------+--------------------------+-----------
   Total   |        74           277  |        351

Classified + if predicted Pr(D) >= .5
True D defined as HP2probsoc != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   60.81%
Specificity                     Pr( -|~D)   96.75%
Positive predictive value       Pr( D| +)   83.33%
Negative predictive value       Pr(~D| -)   90.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.25%
False - rate for true D         Pr( -| D)   39.19%
False + rate for classified +   Pr(~D| +)   16.67%
False - rate for classified -   Pr( D| -)    9.76%
--------------------------------------------------
Correctly classified                        89.17%
--------------------------------------------------


Logistic model for HP2probsoc, goodness-of-fit test


       number of observations =       351
 number of covariate patterns =       350
            Pearson chi2(344) =       405.40
                  Prob > chi2 =         0.0126

Measures of Fit for logit of HP2probsoc

Log-Lik Intercept Only:     -180.782     Log-Lik Full Model:         -108.655
D(345):                      217.309     LR(5):                       144.255
                                         Prob > LR:                     0.000
McFadden's R2:                 0.399     McFadden's Adj R2:             0.366
Maximum Likelihood R2:         0.337     Cragg & Uhler's R2:            0.524
McKelvey and Zavoina's R2:     0.579     Efron's R2:                    0.447
Variance of y*:                7.808     Variance of error:             3.290
Count R2:                      0.892     Adj Count R2:                  0.486
AIC:                           0.653     AIC*n:                       229.309
BIC:                       -1804.662     BIC':                       -114.951

.
. scalar ProbsocModFw2 = "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 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6004

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

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

                                                   AIC             =  7.838826
Log likelihood   =   -1330.6004                    BIC             =  47947.46

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5832314    .2635871      2.21    0.027      .0666101     1.099853
       _cons |    48.62133    .7061562     68.85    0.000      47.23729     50.00537
-------------+----------------------------------------------------------------

. 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 radhlw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1693.4076

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

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

                                                   AIC             =  9.972986
Log likelihood   = -1693.407647                    BIC             =  419831.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.220373     .766216      1.59    0.111     -.2813831     2.722128
       _cons |    45.63198    2.052711     22.23    0.000      41.60874     49.65522
-------------+----------------------------------------------------------------

. glm HP2probsoc radhlw2 if gender==1,fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  226.5911
Iteration 2:   deviance =  218.8478
Iteration 3:   deviance =  218.3822
Iteration 4:   deviance =  218.3787
Iteration 5:   deviance =  218.3787

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   218.378733                    (1/df) Deviance =  .6460909
Pearson          =  326.2667817                    (1/df) Pearson  =  .9652863

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

                                                   BIC             = -1751.805

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0149459    .0022581      6.62    0.000      .0105201     .0193717
       _cons |   -2.034921    .1640547    -12.40    0.000     -2.356462     -1.71338
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm shjobw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1730.3274

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

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

                                                   AIC             =  10.19016
Log likelihood   = -1730.327396                    BIC             =  522144.1

-------------+----------------------------------------------------------------
             |                 OIM
      shjobw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .7146559    .8541028      0.84    0.403     -.9593549     2.388667
       _cons |    49.09491    2.288162     21.46    0.000      44.61019     53.57962
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw2 if gender==1,fam(bin) irls link(probit) scale(dev)

Iteration 1:   deviance =  241.5668
Iteration 2:   deviance =  238.4954
Iteration 3:   deviance =   238.438
Iteration 4:   deviance =   238.438
Iteration 5:   deviance =   238.438

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  238.4379517                    (1/df) Deviance =  .7054377
Pearson          =  344.7520389                    (1/df) Pearson  =  1.019976

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

                                                   BIC             = -1731.746

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw2 |    .0079142    .0019981      3.96    0.000       .003998     .0118303
       _cons |   -1.622345    .1436613    -11.29    0.000     -1.903915    -1.340774
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. // shjobw2Xd3 is almost significant but not quite
. glm radhlw2 shjobw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1684.8126

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

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

                                                   AIC             =   9.92831
Log likelihood   = -1684.812637                    BIC             =  399041.4

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw2 |    .1991928    .0476483      4.18    0.000      .1058038     .2925817
avgcumdosew2 |    1.078018    .7489714      1.44    0.150     -.3899386     2.545975
       _cons |    35.85263    3.080591     11.64    0.000      29.81478     41.89047
-------------+----------------------------------------------------------------

. glm HP2probsoc shjobw2 avgcumdosew2 shjobw2Xd3  if gender==1,fam(bin) ///
>   irls scale(dev) link(probit)

Iteration 1:   deviance =  238.9844
Iteration 2:   deviance =  235.7842
Iteration 3:   deviance =  235.5578
Iteration 4:   deviance =  235.4233
Iteration 5:   deviance =  235.4108
Iteration 6:   deviance =  235.4106
Iteration 7:   deviance =  235.4106
Iteration 8:   deviance =  235.4106

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       336
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  235.4106098                    (1/df) Deviance =  .7006268
Pearson          =  342.9227819                    (1/df) Pearson  =  1.020604

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

                                                   BIC             = -1723.115

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shjobw2 |     .005567    .0027192      2.05    0.041      .0002374     .0108965
avgcumdosew2 |   -.2189419    .2705013     -0.81    0.418     -.7491148      .311231
  shjobw2Xd3 |     .002944    .0028701      1.03    0.305     -.0026813     .0085693
       _cons |   -1.466051    .2263255     -6.48    0.000     -1.909641    -1.022461
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. scalar ProbsocMedMw2 = "age"

.
. * female mediator tests
.
. // age is a female mediator
. glm age avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1406.9403

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

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

                                                   AIC             =  7.762756
Log likelihood   = -1406.940271                    BIC             =  47299.65

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.502324    .4454009      3.37    0.001      .6293547     2.375294
       _cons |    48.86944    .7323225     66.73    0.000      47.43412     50.30477
-------------+----------------------------------------------------------------

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

.
. // radhlw2 is a female mediator
. glm radhlw2 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1791.2233

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

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

                                                   AIC             =  9.880018
Log likelihood   = -1791.223306                    BIC             =  408533.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    3.302288    1.283833      2.57    0.010      .7860214     5.818555
       _cons |    56.95167    2.110863     26.98    0.000      52.81445     61.08888
-------------+----------------------------------------------------------------

. glm HP2probsoc radhlw2 if gender==2,fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =   335.706
Iteration 2:   deviance =  333.7569
Iteration 3:   deviance =  333.7467
Iteration 4:   deviance =  333.7467
Iteration 5:   deviance =  333.7467

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  333.7467432                    (1/df) Deviance =  .9245062
Pearson          =  373.5069806                    (1/df) Pearson  =  1.034645

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

                                                   BIC             = -1794.133

-------------+----------------------------------------------------------------
             |                 EIM
   HP2probsoc |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0135849     .002393      5.68    0.000      .0088947     .0182751
       _cons |   -1.729418    .1840212     -9.40    0.000     -2.090093    -1.368743
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. glm bf4 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1225

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

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

                                                   AIC             =  6.053662
Log likelihood   = -1027.122509                    BIC             =  6404.476

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0331637    .1079644     -0.31    0.759     -.2447701     .1784427
       _cons |    12.52896    .2892393     43.32    0.000      11.96206     13.09586
-------------+----------------------------------------------------------------

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

.
.
. scalar ProbsocMedFw2 = "age radhlw2"

.
. title4  "summary matrix for dose Hp2probsoc impact in wave 2"
-------------
summary matrix for dose Hp2probsoc impact in wave 2
-------------

. * male hp2spM w2  mediators: age
. * dose is not significant main effect for males
. * female hp2spF w2 mediators: age radhlw2
. * dose is not sig main effect for males
.
. scalar SigDoseProbsocMw2 = "no"

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

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

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

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

.     matrix define HP2spFw2= (1, 2, 3, 2, 1, 5, 5, 2 )

.         matrix define HP2spMw2= (1, 2, 3, 1, 0, 2, 0, 1 )

.         matrix rowname HP2spMw2 = HP2spMw2

.         matrix rowname HP2spFw2 = HP2spFw2

.         matlist HP2spMw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2spMw2   |         1            2            3            1            0            2            0

   | c8
-------------+-----------
HP2spMw2   |         1

.         matlist HP2spFw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2spFw2   |         1            2            3            2            1            5            5

   | c8
-------------+-----------
HP2spFw2   |         2

.         matrix define H1pt2w2 = ( HP2wkMw2 \ HP2wkFw2 \ HP2hmcrMw2 \ HP2hmcrFw2 \ HP2spMw2 \ HP2spFw2 )

.
.         matlist H1pt2w2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            1            0
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            2            0
HP2spMw2   |         1            2            3            1            0            2            0
HP2spFw2   |         1            2            3            2            1            5            5

   | c8
-------------+-----------
r1   |         4
r1   |         6
r1   |         2
r1   |         2
HP2spMw2   |         1
HP2spFw2   |         2

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

.     matrix rownames H1pt2w2 =   HP2wkMw2 HP2wkFw2 HP2hmcrMw2 HP2hmcrFw2 HP2socprbMw2 HP2socprbFw2

.     matlist H1pt2w2

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig
-------------+-----------------------------------------------------------------------------
HP2wkMw2   |         1            2            3            1            0            4            0
HP2wkFw2   |         1            2            3            2            0            1            0
HP2hmcrMw2   |         1            2            3            1            0            4            0
HP2hmcrFw2   |         1            2            3            2            0            2            0
HP2socprbMw2   |         1            2            3            1            0            2            0
HP2socprbFw2   |         1            2            3            2            1            5            5

   | numMed
-------------+-----------
HP2wkMw2   |         4
HP2wkFw2   |         6
HP2hmcrMw2   |         2
HP2hmcrFw2   |         2
HP2socprbMw2   |         1
HP2socprbFw2   |         2

.
.
. *xx  significant dose effect for females
. scalar ProbsocModFw2 = "none"

. *xx  no female moderators for Dose Social problem impact relationship
. scalar list
  wkMedMw2 = bf8 age illw2
VactnMedFw2 = age illw2 radhlw2
VactnMedMw2 = age illw2
VacatnModFw2 = none
MainEffVactnFw2 = age radhlw2 deaw2
SigDoseVactnFw2 = no
vactnModMw2 = none
MainEffVactnMw2 = age bf7m radhlw2
SigDoseVactnMw2 = no
sxLifeMedFw2 = age bf4 bf4m
sxLifeMedMw2 = age illw2
InthbModFw2 = none
MainEffInthbFw2 = age radhlw2 bf4
SigdoseInthbFw2 = no
  InthbMw2 = none
MainEffInthbMw2 = age radhlw2 shfamw2
SigDoseInthbMw2 = no
sxlifeMedFw2 = age illw2 radhlw2 bf4 bf4m
sxlifeMedMw2 = age illw2
sxlifeModFw2 = none
MainEffsxlifeFw2 = age radhlw2 bf4 bf4m shrelaw2 shfamw2
SigDoseSxlifeFw2 = no
sxlifeModMw2 = none
SigDosesxlifeMw2 = no
MainEffsxlifeMw2 = age bf4 illw2 radhlw2
PrbfmhmMedFw2 = age bf4
PrbfmhmMedMw2 = age
PrbfmhmModFw2 = none
MainEffPrbfmhmFw2 = age bf4 bf40
SigDosePrbfmhmFw2 = no
PrbfmhmModw2 = none
SigDosePrbfmhmMw2 = no
SigDosePrbfhmMw2 = no
MainEffPrbfhmMw2 = bf1 bf4 dvcew2 bf7m
ProbsocMedFw2 = age radhlw2
ProbsocMedMw2 = age
ProbsocModFw2 = none
MainEffProbSocFw2 = age radhlw2 illw2 Shrelaw2 avgcumodsew2
SigDoseProbsocFw2 = yes
ProbSocModMw2 = none
SigDoseProbsocMw2 = no
MainEffPrbsocMw2 = age radhlw2 shjobw2
hmcareMedFw2 = age illw2
hmcareMedMw2 = age illw2
hmcareModFw2 = none
SigDoseWKFw2 =          0
SigdoseHmcareFw2 = no
hmcareModMw2 = none
MainEffhmcareMw2 = none
SigDoseHmcareMw2 = no
  wkMedFw2 = radhlw2 age bf40 bf4m bf1
  wkModFw2 = none
  wkModMw2 = none
MainEffwkFw2 = age
MainEffwkMw2 = workM: age  bf8  illw2  shjobw2
SigDoseWKMw2 = no
SigDoseWkFw2 = no
hmcrMedFw1 = age icdxcnt shjobw1 bf4 BSIsoma WHPpain WHPsleep WHPel
hmcrMedMw1 = age
MainEffhmcrFw1 = illw1 age
SigDosehmcrFw1 = no
hmcrModMw1 = none
MainEffhmcrMw1 = age shjobw1
SigDosehmcrMw1 = no
  wkMedFw1 = age b4
MainEffwkFw1 = age
MainEffwkMw1 = age
  wkMedMw1 = bf40
  WkMedMw1 = none
  WkModFw1 = none
  WKModMw1 = none
SigDoseWkMw1 = no
SigDoseWkFw1 = no
SigDoseFw1 = no
  wkModFw1 = none
  wkModMw1 = none
 medsigFw1 =          1
prbsocnumMAsig =          8

.
. *----------- Chunk 5   Dose => Problems with the Family at home Impact
. * this washes out in the trimmed models
.
.
. title "4.  wave 2 part2 hypothesis 1 Pt2 Probs with Fam at home"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****      4.  wave 2 part2 hypothesis 1 Pt2 Probs with Fam at home       *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:03:18  *****
*******************************************************************************
*******************************************************************************


. forvalues j=2/2 {
  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 w2bf 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 nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:03:18  *****
*******************************************************************************
*******************************************************************************


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 13 obs not used

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

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

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

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

note: occ8w2 != 0 predicts failure perfectly
      occ8w2 dropped and 44 obs not used

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

note: marrw26 != 0 predicts failure perfectly
      marrw26 dropped and 3 obs not used

note: inc1w2 != 0 predicts failure perfectly
      inc1w2 dropped and 13 obs not used

note: inc4w2 != 0 predicts failure perfectly
      inc4w2 dropped and 10 obs not used

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

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

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

note: marrw25 != 0 predicts success perfectly
      marrw25 dropped and 1 obs not used

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

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

Logistic regression                               Number of obs   =        188
                                                  LR chi2(37)     =      54.88
                                                  Prob > chi2     =     0.0294
Log likelihood = -38.373257                       Pseudo R2       =     0.4169

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0444593    .0428518      1.04    0.299     -.0395286     .1284472
    _Ieduc_2 |           0   (omitted)
    _Ieduc_3 |   -1.216759    1.079528     -1.13    0.260     -3.332594     .8990769
    _Ieduc_4 |           0   (omitted)
    _Ieduc_5 |   -.8969887    1.218662     -0.74    0.462     -3.285522     1.491544
    _Ieduc_6 |           0   (omitted)
    _Ieduc_7 |           0   (omitted)
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -.1675434    7.199614     -0.02    0.981     -14.27853     13.94344
      occ2w2 |   -.7756164    7.209263     -0.11    0.914     -14.90551     13.35428
      occ3w2 |     1.02351    7.214423      0.14    0.887      -13.1165     15.16352
      occ4w2 |    1.180132    7.249556      0.16    0.871     -13.02874       15.389
      occ5w2 |           0   (omitted)
      occ6w2 |           0   (omitted)
      occ7w2 |   -1.331976    7.411247     -0.18    0.857     -15.85775      13.1938
      occ8w2 |           0   (omitted)
     marrw21 |    11.23886    2191.219      0.01    0.996     -4283.471     4305.948
     marrw22 |           0   (omitted)
     marrw23 |    11.19426    2191.219      0.01    0.996     -4283.515     4305.904
     marrw25 |           0   (omitted)
     marrw26 |           0   (omitted)
      inc1w2 |           0   (omitted)
      inc2w2 |    1.591635    7.274442      0.22    0.827     -12.66601     15.84928
      inc3w2 |    2.001132    7.228455      0.28    0.782     -12.16638     16.16864
      inc4w2 |           0   (omitted)
     radhlw2 |    .0450707    .0190833      2.36    0.018      .0076681     .0824733
      havmil |   -.0149705    .0133639     -1.12    0.263     -.0411632     .0112223
avgcumdosew2 |   -.0788123    .3549706     -0.22    0.824     -.7745419     .6169173
         bf1 |   -.1607809    .1318246     -1.22    0.223     -.4191523     .0975906
         bf4 |   -.2790034    .3019344     -0.92    0.355     -.8707839     .3127772
         bf2 |    .0006459    .0003574      1.81    0.071     -.0000546     .0013465
        bf4m |    .1083622     .270079      0.40    0.688     -.4209828     .6377072
        bf5m |    .0014293     .004266      0.34    0.738     -.0069319     .0097905
        bf7m |    .0014124    .0012328      1.15    0.252     -.0010038     .0038286
         bf8 |   -.0000455    .0000891     -0.51    0.610     -.0002201     .0001291
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0990519    .1141451      0.87    0.386     -.1246683     .3227721
        bf22 |    .0000324    .0003377      0.10    0.924     -.0006295     .0006943
        bf29 |           0   (omitted)
        bf30 |   -.0005162    .0007544     -0.68    0.494     -.0019949     .0009625
        bf40 |   -.3427693    .4881552     -0.70    0.483     -1.299536     .6139973
       deaw2 |    1.277518    .6289072      2.03    0.042      .0448826     2.510153
      dvcew2 |           0   (omitted)
      sepaw2 |           0   (omitted)
      accdw2 |   -.8756107    1.266217     -0.69    0.489      -3.35735     1.606128
      movew2 |    .2828439    1.570553      0.18    0.857     -2.795383      3.36107
       illw2 |    1.383819    .6666357      2.08    0.038      .0772372     2.690401
     shfamw2 |   -.0048065    .0139543     -0.34    0.731     -.0321564     .0225433
      shhlw2 |   -.0126567    .0158426     -0.80    0.424     -.0437076     .0183942
     shjobw2 |    .0113436    .0152838      0.74    0.458      -.018612     .0412992
    shrelaw2 |   -.0154518    .0162014     -0.95    0.340      -.047206     .0163025
     suprtw2 |   -.0271504    .0129849     -2.09    0.037     -.0526003    -.0017006
     suchrw2 |    .0166833    .0117501      1.42    0.156     -.0063465      .039713
    havmilsq |    .0000156    .0000131      1.19    0.234       -.00001     .0000412
       _cons |   -21.58182    2191.227     -0.01    0.992     -4316.307     4273.143
-------------+----------------------------------------------------------------

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         8             4  |         12
     -     |        13           163  |        176
-----------+--------------------------+-----------
   Total   |        21           167  |        188

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   38.10%
Specificity                     Pr( -|~D)   97.60%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   92.61%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.40%
False - rate for true D         Pr( -| D)   61.90%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)    7.39%
--------------------------------------------------
Correctly classified                        90.96%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       188
 number of covariate patterns =       188
            Pearson chi2(150) =       103.39
                  Prob > chi2 =         0.9986

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:      -65.811     Log-Lik Full Model:          -38.373
D(132):                       76.747     LR(37):                       54.876
                                         Prob > LR:                     0.029
McFadden's R2:                 0.417     McFadden's Adj R2:            -0.434
Maximum Likelihood R2:         0.253     Cragg & Uhler's R2:            0.503
McKelvey and Zavoina's R2:     0.754     Efron's R2:                    0.356
Variance of y*:               13.351     Variance of error:             3.290
Count R2:                      0.910     Adj Count R2:                  0.190
AIC:                           1.004     AIC*n:                       188.747
BIC:                        -614.464     BIC':                        138.873
Full main model for HP2pbfhm for wave= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:03:20  *****
*******************************************************************************
*******************************************************************************


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

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

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

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

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

note: movew2 != 0 predicts failure perfectly
      movew2 dropped and 37 obs not used

note: _Ieduc_8 omitted because of collinearity
note: marrw26 omitted because of collinearity
note: bf17 omitted because of collinearity
convergence not achieved

Logistic regression                               Number of obs   =        282
                                                  LR chi2(45)     =     115.64
                                                  Prob > chi2     =     0.0000
Log likelihood = -69.237721                       Pseudo R2       =     0.4551

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0573216    .0276334      2.07    0.038      .0031611     .1114822
    _Ieduc_2 |    24.79783    5.419934      4.58    0.000      14.17495      35.4207
    _Ieduc_3 |    25.40648    5.405293      4.70    0.000       14.8123     36.00065
    _Ieduc_4 |     26.0435    5.498915      4.74    0.000      15.26582     36.82117
    _Ieduc_5 |    25.99152    5.477282      4.75    0.000      15.25625      36.7268
    _Ieduc_6 |    25.22458    5.399044      4.67    0.000      14.64265     35.80651
    _Ieduc_7 |    24.91381           .         .        .             .            .
    _Ieduc_8 |           0   (omitted)
      occ1w2 |    .1268694    2.741862      0.05    0.963     -5.247082      5.50082
      occ2w2 |   -2.180454    2.943693     -0.74    0.459     -7.949987     3.589079
      occ3w2 |    .8729362    2.776498      0.31    0.753     -4.568899     6.314772
      occ4w2 |   -1.353704    2.942107     -0.46    0.645     -7.120128      4.41272
      occ5w2 |      2.7416    3.183927      0.86    0.389     -3.498782     8.981982
      occ6w2 |           0   (omitted)
      occ7w2 |    1.723368    2.749238      0.63    0.531      -3.66504     7.111775
      occ8w2 |    1.071406    3.004006      0.36    0.721     -4.816337     6.959149
     marrw21 |    1.363708    1.652619      0.83    0.409     -1.875365     4.602781
     marrw22 |           0   (omitted)
     marrw23 |    .3462148    1.088773      0.32    0.750      -1.78774      2.48017
     marrw25 |    1.049262    1.686487      0.62    0.534     -2.256193     4.354717
     marrw26 |           0   (omitted)
      inc1w2 |   -.4454501    2.822154     -0.16    0.875     -5.976771     5.085871
      inc2w2 |    1.223562    2.740806      0.45    0.655     -4.148319     6.595444
      inc3w2 |    .8897543    2.773723      0.32    0.748     -4.546642     6.326151
      inc4w2 |           0   (omitted)
     radhlw2 |    .0162494    .0128872      1.26    0.207     -.0090091     .0415079
      havmil |    .0034284    .0174028      0.20    0.844     -.0306804     .0375372
avgcumdosew2 |    .2841701    .2286177      1.24    0.214     -.1639122     .7322525
         bf1 |   -.0034211    .0428716     -0.08    0.936     -.0874479     .0806057
         bf4 |   -.5482161    .2947147     -1.86    0.063     -1.125846     .0294141
         bf2 |    .0001496    .0001782      0.84    0.401     -.0001996     .0004989
        bf4m |    .2436517    .2745867      0.89    0.375     -.2945285     .7818318
        bf5m |   -.0026475    .0036526     -0.72    0.469     -.0098065     .0045114
        bf7m |   -.0008652    .0008476     -1.02    0.307     -.0025264      .000796
         bf8 |    .0000586    .0000741      0.79    0.429     -.0000867     .0002038
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0232359    .0348214     -0.67    0.505     -.0914845     .0450127
        bf22 |    .0000587    .0002121      0.28    0.782     -.0003569     .0004744
        bf29 |    .0000275    .0000434      0.63    0.527     -.0000576     .0001126
        bf30 |    .0000875    .0005016      0.17    0.862     -.0008956     .0010706
        bf40 |   -.3662342    .2446561     -1.50    0.134     -.8457514     .1132829
       deaw2 |    .0470792    .2393731      0.20    0.844     -.4220834     .5162419
      dvcew2 |   -1.779925    2.445695     -0.73    0.467     -6.573399     3.013549
      sepaw2 |           0   (omitted)
      accdw2 |   -2.474844    1.428768     -1.73    0.083     -5.275177     .3254891
      movew2 |           0   (omitted)
       illw2 |   -.2222062    .2628556     -0.85    0.398     -.7373938     .2929813
     shfamw2 |    .0141915    .0093043      1.53    0.127     -.0040446     .0324276
      shhlw2 |    .0087578    .0103731      0.84    0.399     -.0115731     .0290887
     shjobw2 |   -.0066068    .0093228     -0.71    0.479     -.0248791     .0116655
    shrelaw2 |   -.0301632    .0120406     -2.51    0.012     -.0537624    -.0065641
     suprtw2 |   -.0125721    .0077017     -1.63    0.103     -.0276672      .002523
     suchrw2 |   -.0060097    .0083821     -0.72    0.473     -.0224384      .010419
    havmilsq |   -.0000291     .000055     -0.53    0.597     -.0001368     .0000787
       _cons |   -27.59558     6.62482     -4.17    0.000     -40.57999    -14.61117
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


Warning: convergence not achieved

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        29             7  |         36
     -     |        18           228  |        246
-----------+--------------------------+-----------
   Total   |        47           235  |        282

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   61.70%
Specificity                     Pr( -|~D)   97.02%
Positive predictive value       Pr( D| +)   80.56%
Negative predictive value       Pr(~D| -)   92.68%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.98%
False - rate for true D         Pr( -| D)   38.30%
False + rate for classified +   Pr(~D| +)   19.44%
False - rate for classified -   Pr( D| -)    7.32%
--------------------------------------------------
Correctly classified                        91.13%
--------------------------------------------------


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       282
 number of covariate patterns =       282
            Pearson chi2(235) =       241.50
                  Prob > chi2 =         0.3715

Measures of Fit for logistic of HP2pbfhm

Log-Lik Intercept Only:     -127.058     Log-Lik Full Model:          -69.238
D(226):                      138.475     LR(45):                      115.641
                                         Prob > LR:                     0.000
McFadden's R2:                 0.455     McFadden's Adj R2:             0.014
Maximum Likelihood R2:         0.336     Cragg & Uhler's R2:            0.566
McKelvey and Zavoina's R2:     0.950     Efron's R2:                    0.475
Variance of y*:               65.351     Variance of error:             3.290
Count R2:                      0.911     Adj Count R2:                  0.468
AIC:                           0.888     AIC*n:                       250.475
BIC:                       -1136.596     BIC':                        138.245

.
.
. title "Partly Trimmed male wave 2  Dose => Problems with Family at home models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Partly Trimmed male wave 2  Dose => Problems with Family at home models*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:03:22  *****
*******************************************************************************
*******************************************************************************


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

. logit HP2pbfhm age sepaw2 dvcew2 radhlw2 avgcumdosew2 suprtw2 ///
>    havmilsq illw2 `w2bf' if gender==1, iterate(50)

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

note: dvcew2 != 0 predicts failure perfectly
      dvcew2 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: bf17 omitted because of collinearity
Iteration 0:   log likelihood = -78.804936
Iteration 1:   log likelihood = -67.490685
Iteration 2:   log likelihood = -61.940594
Iteration 3:   log likelihood = -61.733617
Iteration 4:   log likelihood = -61.732595
Iteration 5:   log likelihood = -61.732594

Logistic regression                               Number of obs   =        302
                                                  LR chi2(17)     =      34.14
                                                  Prob > chi2     =     0.0080
Log likelihood = -61.732594                       Pseudo R2       =     0.2166

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0292956    .0235579      1.24    0.214      -.016877     .0754681
      sepaw2 |           0   (omitted)
      dvcew2 |           0   (omitted)
     radhlw2 |    .0182205    .0109536      1.66    0.096     -.0032483     .0396892
avgcumdosew2 |    -.090545    .2561457     -0.35    0.724     -.5925814     .4114914
     suprtw2 |   -.0052645    .0059622     -0.88    0.377     -.0169502     .0064212
    havmilsq |   -1.61e-06    7.15e-06     -0.23    0.822     -.0000156     .0000124
       illw2 |    .7307941    .4092131      1.79    0.074     -.0712488     1.532837
         bf1 |   -.0825023    .0733724     -1.12    0.261     -.2263094     .0613049
         bf4 |   -.1790987    .2180029     -0.82    0.411     -.6063764     .2481791
         bf2 |    .0002682    .0002153      1.25    0.213     -.0001537     .0006901
        bf4m |    .0150156    .1990066      0.08    0.940     -.3750301     .4050613
        bf5m |    .0001665    .0028981      0.06    0.954     -.0055136     .0058466
        bf7m |    .0013857     .000794      1.75    0.081     -.0001704     .0029419
         bf8 |   -.0000382    .0000618     -0.62    0.537     -.0001593     .0000829
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0450852    .0634467      0.71    0.477     -.0792681     .1694385
        bf22 |   -.0000253    .0002352     -0.11    0.914     -.0004863     .0004357
        bf29 |           0   (omitted)
        bf30 |   -.0003567    .0004856     -0.73    0.463     -.0013085     .0005951
        bf40 |    -.229251    .3317905     -0.69    0.490     -.8795485     .4210465
       _cons |   -5.211948    3.446845     -1.51    0.131     -11.96764     1.543744
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             1  |          1
     -     |        22           279  |        301
-----------+--------------------------+-----------
   Total   |        22           280  |        302

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

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       302
 number of covariate patterns =       301
            Pearson chi2(283) =       231.95
                  Prob > chi2 =         0.9882

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -78.805     Log-Lik Full Model:          -61.733
D(279):                      123.465     LR(17):                       34.145
                                         Prob > LR:                     0.008
McFadden's R2:                 0.217     McFadden's Adj R2:            -0.075
Maximum Likelihood R2:         0.107     Cragg & Uhler's R2:            0.263
McKelvey and Zavoina's R2:     0.433     Efron's R2:                    0.127
Variance of y*:                5.806     Variance of error:             3.290
Count R2:                      0.924     Adj Count R2:                 -0.045
AIC:                           0.561     AIC*n:                       169.465
BIC:                       -1469.744     BIC':                         62.933

.
. 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             *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:03:24  *****
*******************************************************************************
*******************************************************************************


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

. sw, pr(.1):logit HP2pbfhm age sepaw2 dvcew2 radhlw2 avgcumdosew2 suprtw2 ///
>    havmilsq illw2 `w2bf' if gender==1, iterate(50)
note: sepaw2 dropped because of estimability
note: dvcew2 dropped because of estimability
note: bf15m dropped because of estimability
note: bf17 dropped because of estimability
note: bf29 dropped because of estimability
note: o.sepaw2 dropped because of estimability
note: o.dvcew2 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: 38 obs. dropped because of estimability


  begin with full model


p = 0.9542 >= 0.1000  removing bf5m


p = 0.9265 >= 0.1000  removing bf4m


p = 0.9130 >= 0.1000  removing bf22


p = 0.8252 >= 0.1000  removing havmilsq


p = 0.7278 >= 0.1000  removing avgcumdosew2


p = 0.4697 >= 0.1000  removing bf20


p = 0.4787 >= 0.1000  removing bf30


p = 0.3553 >= 0.1000  removing bf8


p = 0.3688 >= 0.1000  removing suprtw2


p = 0.3130 >= 0.1000  removing age


p = 0.3217 >= 0.1000  removing bf40


p = 0.2872 >= 0.1000  removing bf2


p = 0.1449 >= 0.1000  removing bf1


p = 0.2454 >= 0.1000  removing radhlw2


p = 0.1939 >= 0.1000  removing illw2


Logistic regression                               Number of obs   =        302
                                                  LR chi2(2)      =      22.57
                                                  Prob > chi2     =     0.0000
Log likelihood = -67.522012                       Pseudo R2       =     0.1432

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.2376169    .0586559     -4.05    0.000     -.3525804    -.1226534
        bf7m |    .0012872    .0004582      2.81    0.005      .0003891     .0021853
       _cons |   -1.530756    .4468865     -3.43    0.001     -2.406637    -.6548742
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             0  |          0
     -     |        22           280  |        302
-----------+--------------------------+-----------
   Total   |        22           280  |        302

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.72%
--------------------------------------------------
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.28%
--------------------------------------------------
Correctly classified                        92.72%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       302
 number of covariate patterns =       117
            Pearson chi2(114) =       146.75
                  Prob > chi2 =         0.0210

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -78.805     Log-Lik Full Model:          -67.522
D(299):                      135.044     LR(2):                        22.566
                                         Prob > LR:                     0.000
McFadden's R2:                 0.143     McFadden's Adj R2:             0.105
Maximum Likelihood R2:         0.072     Cragg & Uhler's R2:            0.177
McKelvey and Zavoina's R2:     0.333     Efron's R2:                    0.089
Variance of y*:                4.936     Variance of error:             3.290
Count R2:                      0.927     Adj Count R2:                  0.000
AIC:                           0.467     AIC*n:                       141.044
BIC:                       -1572.374     BIC':                        -11.145

.
. scalar MainEffPrbfhmMw2 = "bf1 bf4 dvcew2 bf7m"

. scalar SigDosePrbfhmMw2 = "no"

. // construction of moderators for male model
.
. foreach var in bf1 bf4 dvcew2 bf2 bf7m {
  2.  cap gen `var'Xd3 = `var'*avgcumdosew2
  3.   }

.
.
.
.
. ******************************************************************************
. *-------chunk 6  continued -testing moderators and none found for males
. local w2bf 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              *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:03:48  *****
*******************************************************************************
*******************************************************************************


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

. sw, pr(.1):logit HP2pbfhm age sepaw2 dvcew2 radhlw2 avgcumdosew2 suprtw2 ///
>    havmilsq illw2 `w2bf' bf1Xd3 bf4Xd3  bf2Xd3 bf7mXd3 dvcew2Xd3 if ///
>     gender==1, iterate(50)
note: sepaw2 dropped because of estimability
note: dvcew2 dropped because of estimability
note: bf15m dropped because of estimability
note: bf17 dropped because of estimability
note: bf29 dropped because of estimability
note: dvcew2Xd3 dropped because of estimability
note: o.sepaw2 dropped because of estimability
note: o.dvcew2 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: o.dvcew2Xd3 dropped because of estimability
note: 38 obs. dropped because of estimability


  begin with full model


p = 0.9625 >= 0.1000  removing bf22


p = 0.9571 >= 0.1000  removing bf4m


p = 0.8570 >= 0.1000  removing bf5m


p = 0.8130 >= 0.1000  removing havmilsq


p = 0.7588 >= 0.1000  removing bf2Xd3


p = 0.6682 >= 0.1000  removing bf7mXd3


p = 0.7871 >= 0.1000  removing bf1Xd3


p = 0.4970 >= 0.1000  removing avgcumdosew2


p = 0.7875 >= 0.1000  removing bf4Xd3


p = 0.4697 >= 0.1000  removing bf20


p = 0.4787 >= 0.1000  removing bf30


p = 0.3553 >= 0.1000  removing bf8


p = 0.3688 >= 0.1000  removing suprtw2


p = 0.3130 >= 0.1000  removing age


p = 0.3217 >= 0.1000  removing bf40


p = 0.2872 >= 0.1000  removing bf2


p = 0.1449 >= 0.1000  removing bf1


p = 0.2454 >= 0.1000  removing radhlw2


p = 0.1939 >= 0.1000  removing illw2


Logistic regression                               Number of obs   =        302
                                                  LR chi2(2)      =      22.57
                                                  Prob > chi2     =     0.0000
Log likelihood = -67.522012                       Pseudo R2       =     0.1432

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         bf4 |   -.2376169    .0586559     -4.05    0.000     -.3525804    -.1226534
        bf7m |    .0012872    .0004582      2.81    0.005      .0003891     .0021853
       _cons |   -1.530756    .4468865     -3.43    0.001     -2.406637    -.6548742
-------------+----------------------------------------------------------------

.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         0             0  |          0
     -     |        22           280  |        302
-----------+--------------------------+-----------
   Total   |        22           280  |        302

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.72%
--------------------------------------------------
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.28%
--------------------------------------------------
Correctly classified                        92.72%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       302
 number of covariate patterns =       117
            Pearson chi2(114) =       146.75
                  Prob > chi2 =         0.0210

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:      -78.805     Log-Lik Full Model:          -67.522
D(299):                      135.044     LR(2):                        22.566
                                         Prob > LR:                     0.000
McFadden's R2:                 0.143     McFadden's Adj R2:             0.105
Maximum Likelihood R2:         0.072     Cragg & Uhler's R2:            0.177
McKelvey and Zavoina's R2:     0.333     Efron's R2:                    0.089
Variance of y*:                4.936     Variance of error:             3.290
Count R2:                      0.927     Adj Count R2:                  0.000
AIC:                           0.467     AIC*n:                       141.044
BIC:                       -1572.374     BIC':                        -11.145

.
. scalar SigDosePrbfmhmMw2 = "no"

. scalar PrbfmhmModw2 = "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 2"  "Dose => Problems with Family at home models"
-------------
Partly Trimmed female wave 2 Dose => Problems with Family at home models
-------------

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

. logit HP2pbfhm age sepaw2 dvcew2 radhlw2 avgcumdosew2 bf4 bf8 bf40 ///
>    shrelaw2 suchrw2 suprtw2 ///
>    havmilsq illw2 `w2bf' if gender==2, iterate(50)

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

note: bf15m != 0 predicts failure perfectly
      bf15m dropped and 11 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 = -137.18535
Iteration 1:   log likelihood = -103.93355
Iteration 2:   log likelihood = -95.703442
Iteration 3:   log likelihood =  -95.15807
Iteration 4:   log likelihood = -94.770663
Iteration 5:   log likelihood =  -94.32988
Iteration 6:   log likelihood = -94.321437
Iteration 7:   log likelihood = -94.321422
Iteration 8:   log likelihood = -94.321422

Logistic regression                               Number of obs   =        344
                                                  LR chi2(21)     =      85.73
                                                  Prob > chi2     =     0.0000
Log likelihood = -94.321422                       Pseudo R2       =     0.3125

-------------+----------------------------------------------------------------
     HP2pbfhm |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0495582    .0188768      2.63    0.009      .0125605      .086556
      sepaw2 |           0   (omitted)
      dvcew2 |    .1260682    1.324676      0.10    0.924     -2.470249     2.722386
     radhlw2 |    .0105681    .0093019      1.14    0.256     -.0076632     .0287993
avgcumdosew2 |    .0737234    .1141614      0.65    0.518     -.1500289     .2974756
         bf4 |   -.4430413    .2263763     -1.96    0.050     -.8867306      .000648
         bf8 |    .0000574    .0000561      1.02    0.306     -.0000524     .0001673
        bf40 |   -.1754276    .1875146     -0.94    0.350     -.5429494     .1920941
    shrelaw2 |   -.0156329    .0070882     -2.21    0.027     -.0295256    -.0017402
     suchrw2 |   -.0041523    .0059924     -0.69    0.488     -.0158972     .0075927
     suprtw2 |    -.007471    .0054359     -1.37    0.169     -.0181252     .0031831
    havmilsq |    -.000013    .0000109     -1.19    0.233     -.0000344     8.39e-06
       illw2 |   -.0615734    .1862759     -0.33    0.741     -.4266675     .3035207
         bf1 |     .007936    .0350726      0.23    0.821      -.060805     .0766769
         bf4 |           0   (omitted)
         bf2 |   -.0000527    .0001277     -0.41    0.680     -.0003031     .0001977
        bf4m |    .1913739    .2129046      0.90    0.369     -.2259115     .6086594
        bf5m |   -.0025742    .0029442     -0.87    0.382     -.0083446     .0031963
        bf7m |   -.0002656    .0006721     -0.40    0.693     -.0015828     .0010516
         bf8 |           0   (omitted)
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0160588    .0276726     -0.58    0.562     -.0702962     .0381785
        bf22 |    .0000785    .0001703      0.46    0.645     -.0002554     .0004124
        bf29 |     .000024    .0000382      0.63    0.529     -.0000508     .0000989
        bf30 |   -.0003425    .0003633     -0.94    0.346     -.0010546     .0003696
        bf40 |           0   (omitted)
       _cons |   -1.808076    2.335383     -0.77    0.439     -6.385343      2.76919
-------------+----------------------------------------------------------------


Note: 3 failures and 0 successes completely determined.


.
. estat class

Logistic model for HP2pbfhm

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        17             8  |         25
     -     |        30           289  |        319
-----------+--------------------------+-----------
   Total   |        47           297  |        344

Classified + if predicted Pr(D) >= .5
True D defined as HP2pbfhm != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   36.17%
Specificity                     Pr( -|~D)   97.31%
Positive predictive value       Pr( D| +)   68.00%
Negative predictive value       Pr(~D| -)   90.60%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.69%
False - rate for true D         Pr( -| D)   63.83%
False + rate for classified +   Pr(~D| +)   32.00%
False - rate for classified -   Pr( D| -)    9.40%
--------------------------------------------------
Correctly classified                        88.95%
--------------------------------------------------

. estat gof


Logistic model for HP2pbfhm, goodness-of-fit test


       number of observations =       344
 number of covariate patterns =       344
            Pearson chi2(322) =       324.25
                  Prob > chi2 =         0.4544

. fitstat

Measures of Fit for logit of HP2pbfhm

Log-Lik Intercept Only:     -137.185     Log-Lik Full Model:          -94.321
D(316):                      188.643     LR(21):                       85.728
                                         Prob > LR:                     0.000
McFadden's R2:                 0.312     McFadden's Adj R2:             0.108
Maximum Likelihood R2:         0.221     Cragg & Uhler's R2:            0.401
McKelvey and Zavoina's R2:     0.947     Efron's R2:                    0.303
Variance of y*:               61.833     Variance of error:             3.290
Count R2:                      0.890     Adj Count R2:                  0.191
AIC:                           0.711     AIC*n:                       244.643
BIC:                       -1657.000     BIC':                         36.926

.
. *-------Chunk 6  continued -testing meditors for females
. title "More partly female Trimmed wave 2"  "Dose => Problems with Family at home models"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                 More partly female Trimmed wave 2                   *****
*****            Dose => Problems with Family at home models              *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:19  *****
*******************************************************************************
*******************************************************************************


. local w2bf 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 SigDosePrbfmhmFw2 = "no"

. scalar MainEffPrbfmhmFw2 = "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'*avgcumdosew2
  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 PrbfmhmModFw2="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 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6004

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

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

                                                   AIC             =  7.838826
Log likelihood   =   -1330.6004                    BIC             =  47947.46

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5832314    .2635871      2.21    0.027      .0666101     1.099853
       _cons |    48.62133    .7061562     68.85    0.000      47.23729     50.00537
-------------+----------------------------------------------------------------

. 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  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1225

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

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

                                                   AIC             =  6.053662
Log likelihood   = -1027.122509                    BIC             =  6404.476

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0331637    .1079644     -0.31    0.759     -.2447701     .1784427
       _cons |    12.52896    .2892393     43.32    0.000      11.96206     13.09586
-------------+----------------------------------------------------------------

. 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 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1406.9403

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

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

                                                   AIC             =  7.762756
Log likelihood   = -1406.940271                    BIC             =  47299.65

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.502324    .4454009      3.37    0.001      .6293547     2.375294
       _cons |    48.86944    .7323225     66.73    0.000      47.43412     50.30477
-------------+----------------------------------------------------------------

. 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  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.0983

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

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

                                                   AIC             =  6.121754
Log likelihood   = -1109.098281                    BIC             =  7450.466

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.595012    .1960703     -3.03    0.002     -.9793027    -.2107212
       _cons |    11.02048    .3223763     34.19    0.000      10.38863     11.65232
-------------+----------------------------------------------------------------

. 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  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -818.51169

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

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

                                                   AIC             =  4.520726
Log likelihood   = -818.5116931                    BIC             = -196.0319

-------------+----------------------------------------------------------------
             |                 OIM
         bf40 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1794903    .0880548      2.04    0.042      .0069061     .3520745
       _cons |    3.004543    .1447786     20.75    0.000      2.720783     3.288304
-------------+----------------------------------------------------------------

. 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 PrbfmhmMedMw2 = "age"

. scalar PrbfmhmMedFw2 = "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 HP2prbfamMw2 = J(1,8, 0)

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

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

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

.     matrix define HP2prbfamMw2= (1, 2, 3, 1, 0, 5, 0, 1 )

.         matrix define HP2prbfamFw2= (1, 2, 3, 2, 0, 2, 2, 2)

.         matrix rowname HP2prbfamMw2 = HP2prbfamM

.         matrix rowname HP2prbfamFw2 = HP2prbfamF

.         matlist HP2prbfamMw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2prbfamM   |         1            2            3            1            0            5            0

   | c8
-------------+-----------
HP2prbfamM   |         1

.         matlist HP2prbfamFw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2prbfamF   |         1            2            3            2            0            2            2

   | c8
-------------+-----------
HP2prbfamF   |         2

.         matrix define H1pt2w2 = ( HP2wkMw2 \ HP2wkFw2 \ HP2hmcrMw2 \ HP2hmcrFw2 \HP2spMw2 \HP2spFw2 \ HP2prbfamMw2 \ HP2prbfamFw2 )

.
.         matlist H1pt2w2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            1            0
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            2            0
HP2spMw2   |         1            2            3            1            0            2            0
HP2spFw2   |         1            2            3            2            1            5            5
HP2prbfamM   |         1            2            3            1            0            5            0
HP2prbfamF   |         1            2            3            2            0            2            2

   | c8
-------------+-----------
r1   |         4
r1   |         6
r1   |         2
r1   |         2
HP2spMw2   |         1
HP2spFw2   |         2
HP2prbfamM   |         1
HP2prbfamF   |         2

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

.     matrix rownames H1pt2w2 =   HP2wkMw2 HP2wkFw2 HP2hmcrMw2 HP2hmcrFw2 HP2prbfhmMw2 HP2prbfhmFw2

.     matlist H1pt2w2

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig
-------------+-----------------------------------------------------------------------------
HP2wkMw2   |         1            2            3            1            0            4            0
HP2wkFw2   |         1            2            3            2            0            1            0
HP2hmcrMw2   |         1            2            3            1            0            4            0
HP2hmcrFw2   |         1            2            3            2            0            2            0
HP2prbfhmMw2   |         1            2            3            1            0            2            0
HP2prbfhmFw2   |         1            2            3            2            1            5            5
HP2prbfhmFw2   |         1            2            3            1            0            5            0
HP2prbfhmFw2   |         1            2            3            2            0            2            2

   | numMed
-------------+-----------
HP2wkMw2   |         4
HP2wkFw2   |         6
HP2hmcrMw2   |         2
HP2hmcrFw2   |         2
HP2prbfhmMw2   |         1
HP2prbfhmFw2   |         2
HP2prbfhmFw2   |         1
HP2prbfhmFw2   |         2

.
.
. *-------------------------------------------------------------------------------
. ********************************************************************************
. *-------Chunk 7   Dose==> problems with sex life impact
. * Chunk 7  General model for all part 2 of Nottingham Health Profile
. * washes out for men
. * female main effects wash out in trimmed model
. title "5.  wave 2 part2 H1: Test of hypothesis 1 with Male and Female Respondents" ///
>      " wave 2 Main effects Dose=> sexlife impact identification"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****5.  wave 2 part2 H1: Test of hypothesis 1 with Male and Female Respondents*****
*****      wave 2 Main effects Dose=> sexlife impact identification       *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:41  *****
*******************************************************************************
*******************************************************************************


. forvalues j=2/2 {
  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=2/2 {
  6. local w2bf 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 radhlw2 if gender==`k', coef nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2               *****
*****      chunk 7 H1 test:Gender= 2  model Wave =  2 for HP2pbfhm        *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:41  *****
*******************************************************************************
*******************************************************************************


i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
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: marrw26 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw2 omitted because of collinearity

Logistic regression                               Number of obs   =        346
                                                  LR chi2(50)     =     172.45
                                                  Prob > chi2     =     0.0000
Log likelihood = -111.04151                       Pseudo R2       =     0.4371

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1025465    .0220099      4.66    0.000      .0594079      .145685
    _Ieduc_2 |   -15.48089     5580.75     -0.00    0.998     -10953.55     10922.59
    _Ieduc_3 |   -13.96022     5580.75     -0.00    0.998     -10952.03     10924.11
    _Ieduc_4 |   -13.71505     5580.75     -0.00    0.998     -10951.78     10924.35
    _Ieduc_5 |   -14.90906     5580.75     -0.00    0.998     -10952.98     10923.16
    _Ieduc_6 |     -14.036     5580.75     -0.00    0.998      -10952.1     10924.03
    _Ieduc_7 |   -14.35246    5580.751     -0.00    0.998     -10952.42     10923.72
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.981003    1.626317     -1.22    0.223     -5.168525      1.20652
      occ2w2 |   -1.199181    1.677697     -0.71    0.475     -4.487407     2.089044
      occ3w2 |   -.7937582    1.670584     -0.48    0.635     -4.068042     2.480526
      occ4w2 |   -.8102305     1.76353     -0.46    0.646     -4.266686     2.646225
      occ5w2 |   -.5056346     1.89785     -0.27    0.790     -4.225353     3.214084
      occ6w2 |   -1.645496    1.931022     -0.85    0.394     -5.430229     2.139237
      occ7w2 |   -1.288749    1.611028     -0.80    0.424     -4.446306     1.868809
      occ8w2 |   -.2492981    1.896994     -0.13    0.895     -3.967338     3.468742
     marrw21 |   -.8001566    1.260909     -0.63    0.526     -3.271493      1.67118
     marrw22 |   -.5650635    1.458662     -0.39    0.698     -3.423989     2.293861
     marrw23 |   -1.064868    .8865967     -1.20    0.230     -2.802566     .6728293
     marrw25 |    -2.27112    1.443829     -1.57    0.116     -5.100972     .5587328
     marrw26 |           0   (omitted)
      inc1w2 |    .5165366    1.706152      0.30    0.762      -2.82746     3.860533
      inc2w2 |    .9386295    1.604285      0.59    0.558     -2.205712     4.082971
      inc3w2 |   -.0514022    1.646264     -0.03    0.975      -3.27802     3.175215
      inc4w2 |    .0543252    2.074029      0.03    0.979     -4.010697     4.119348
     radhlw2 |    .0162077    .0081749      1.98    0.047      .0001852     .0322303
      havmil |   -.0014745    .0033419     -0.44    0.659     -.0080244     .0050754
avgcumdosew2 |    .1675129    .1251712      1.34    0.181     -.0778182      .412844
         bf1 |   -.0006699    .0354295     -0.02    0.985     -.0701104     .0687707
         bf4 |   -.6290339    .2665349     -2.36    0.018     -1.151433    -.1066351
         bf2 |    .0000625     .000131      0.48    0.633     -.0001943     .0003193
        bf4m |    .4940985    .2505491      1.97    0.049      .0030312     .9851658
        bf5m |    -.002308    .0018303     -1.26    0.207     -.0058953     .0012792
        bf7m |      .00018    .0006254      0.29    0.773     -.0010457     .0014058
         bf8 |    6.11e-06    .0000425      0.14    0.886     -.0000772     .0000894
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0009967    .0290168     -0.03    0.973     -.0578686     .0558752
        bf22 |   -.0001321    .0001453     -0.91    0.363     -.0004169     .0001527
        bf29 |           0   (omitted)
        bf30 |   -.0003317    .0003532     -0.94    0.348      -.001024     .0003605
        bf40 |     .149372     .145042      1.03    0.303     -.1349052     .4336491
       deaw2 |    .0989356    .2231863      0.44    0.658     -.3385014     .5363726
      dvcew2 |   -14.61462    1422.458     -0.01    0.992     -2802.582     2773.353
      sepaw2 |    13.19252     1422.46      0.01    0.993     -2774.778     2801.163
      accdw2 |   -.3607593    .7071147     -0.51    0.610     -1.746679      1.02516
      movew2 |    .2363995    .5198633      0.45    0.649     -.7825137     1.255313
       illw2 |    .5572231    .2374511      2.35    0.019      .0918274     1.022619
     shfamw2 |     .001878    .0072955      0.26    0.797     -.0124209     .0161768
      shhlw2 |    .0092925    .0072946      1.27    0.203     -.0050046     .0235896
     shjobw2 |   -.0069643    .0067203     -1.04    0.300     -.0201358     .0062073
    shrelaw2 |   -.0169606    .0081044     -2.09    0.036      -.032845    -.0010762
     suprtw2 |   -.0129953    .0058047     -2.24    0.025     -.0243723    -.0016183
     suchrw2 |    .0118245    .0068566      1.72    0.085     -.0016142     .0252632
    havmilsq |   -6.39e-08    2.74e-06     -0.02    0.981     -5.43e-06     5.30e-06
     radhlw2 |           0   (omitted)
       _cons |    5.841436     5580.75      0.00    0.999     -10932.23     10943.91
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        57            17  |         74
     -     |        32           240  |        272
-----------+--------------------------+-----------
   Total   |        89           257  |        346

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   64.04%
Specificity                     Pr( -|~D)   93.39%
Positive predictive value       Pr( D| +)   77.03%
Negative predictive value       Pr(~D| -)   88.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.61%
False - rate for true D         Pr( -| D)   35.96%
False + rate for classified +   Pr(~D| +)   22.97%
False - rate for classified -   Pr( D| -)   11.76%
--------------------------------------------------
Correctly classified                        85.84%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       346
 number of covariate patterns =       346
            Pearson chi2(295) =       312.67
                  Prob > chi2 =         0.2294

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -197.267     Log-Lik Full Model:         -111.042
D(289):                      222.083     LR(50):                      172.450
                                         Prob > LR:                     0.000
McFadden's R2:                 0.437     McFadden's Adj R2:             0.148
Maximum Likelihood R2:         0.393     Cragg & Uhler's R2:            0.577
McKelvey and Zavoina's R2:     0.765     Efron's R2:                    0.477
Variance of y*:               14.018     Variance of error:             3.290
Count R2:                      0.858     Adj Count R2:                  0.449
AIC:                           0.971     AIC*n:                       336.083
BIC:                       -1467.538     BIC':                        119.872

. // full model washes out
.
. title "5.  wave 2 part2 H1: Test of hypothesis 1 with Male and Female Respondents" ///
>      " wave 2 Main effects Dose=> sexlife impact identification"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****5.  wave 2 part2 H1: Test of hypothesis 1 with Male and Female Respondents*****
*****      wave 2 Main effects Dose=> sexlife impact identification       *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:43  *****
*******************************************************************************
*******************************************************************************


. forvalues j=2/2 {
  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=2/2 {
  6. local w2bf 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 radhlw2 if gender==`k', coef nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2               *****
*****     chunk 7 H1 test:Gender= 2  model Wave =  2 for HP2sxlife        *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:43  *****
*******************************************************************************
*******************************************************************************


i.educ            _Ieduc_1-8          (naturally coded; _Ieduc_1 omitted)
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: marrw26 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw2 omitted because of collinearity

Logistic regression                               Number of obs   =        346
                                                  LR chi2(50)     =     172.45
                                                  Prob > chi2     =     0.0000
Log likelihood = -111.04151                       Pseudo R2       =     0.4371

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .1025465    .0220099      4.66    0.000      .0594079      .145685
    _Ieduc_2 |   -15.48089     5580.75     -0.00    0.998     -10953.55     10922.59
    _Ieduc_3 |   -13.96022     5580.75     -0.00    0.998     -10952.03     10924.11
    _Ieduc_4 |   -13.71505     5580.75     -0.00    0.998     -10951.78     10924.35
    _Ieduc_5 |   -14.90906     5580.75     -0.00    0.998     -10952.98     10923.16
    _Ieduc_6 |     -14.036     5580.75     -0.00    0.998      -10952.1     10924.03
    _Ieduc_7 |   -14.35246    5580.751     -0.00    0.998     -10952.42     10923.72
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.981003    1.626317     -1.22    0.223     -5.168525      1.20652
      occ2w2 |   -1.199181    1.677697     -0.71    0.475     -4.487407     2.089044
      occ3w2 |   -.7937582    1.670584     -0.48    0.635     -4.068042     2.480526
      occ4w2 |   -.8102305     1.76353     -0.46    0.646     -4.266686     2.646225
      occ5w2 |   -.5056346     1.89785     -0.27    0.790     -4.225353     3.214084
      occ6w2 |   -1.645496    1.931022     -0.85    0.394     -5.430229     2.139237
      occ7w2 |   -1.288749    1.611028     -0.80    0.424     -4.446306     1.868809
      occ8w2 |   -.2492981    1.896994     -0.13    0.895     -3.967338     3.468742
     marrw21 |   -.8001566    1.260909     -0.63    0.526     -3.271493      1.67118
     marrw22 |   -.5650635    1.458662     -0.39    0.698     -3.423989     2.293861
     marrw23 |   -1.064868    .8865967     -1.20    0.230     -2.802566     .6728293
     marrw25 |    -2.27112    1.443829     -1.57    0.116     -5.100972     .5587328
     marrw26 |           0   (omitted)
      inc1w2 |    .5165366    1.706152      0.30    0.762      -2.82746     3.860533
      inc2w2 |    .9386295    1.604285      0.59    0.558     -2.205712     4.082971
      inc3w2 |   -.0514022    1.646264     -0.03    0.975      -3.27802     3.175215
      inc4w2 |    .0543252    2.074029      0.03    0.979     -4.010697     4.119348
     radhlw2 |    .0162077    .0081749      1.98    0.047      .0001852     .0322303
      havmil |   -.0014745    .0033419     -0.44    0.659     -.0080244     .0050754
avgcumdosew2 |    .1675129    .1251712      1.34    0.181     -.0778182      .412844
         bf1 |   -.0006699    .0354295     -0.02    0.985     -.0701104     .0687707
         bf4 |   -.6290339    .2665349     -2.36    0.018     -1.151433    -.1066351
         bf2 |    .0000625     .000131      0.48    0.633     -.0001943     .0003193
        bf4m |    .4940985    .2505491      1.97    0.049      .0030312     .9851658
        bf5m |    -.002308    .0018303     -1.26    0.207     -.0058953     .0012792
        bf7m |      .00018    .0006254      0.29    0.773     -.0010457     .0014058
         bf8 |    6.11e-06    .0000425      0.14    0.886     -.0000772     .0000894
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |   -.0009967    .0290168     -0.03    0.973     -.0578686     .0558752
        bf22 |   -.0001321    .0001453     -0.91    0.363     -.0004169     .0001527
        bf29 |           0   (omitted)
        bf30 |   -.0003317    .0003532     -0.94    0.348      -.001024     .0003605
        bf40 |     .149372     .145042      1.03    0.303     -.1349052     .4336491
       deaw2 |    .0989356    .2231863      0.44    0.658     -.3385014     .5363726
      dvcew2 |   -14.61462    1422.458     -0.01    0.992     -2802.582     2773.353
      sepaw2 |    13.19252     1422.46      0.01    0.993     -2774.778     2801.163
      accdw2 |   -.3607593    .7071147     -0.51    0.610     -1.746679      1.02516
      movew2 |    .2363995    .5198633      0.45    0.649     -.7825137     1.255313
       illw2 |    .5572231    .2374511      2.35    0.019      .0918274     1.022619
     shfamw2 |     .001878    .0072955      0.26    0.797     -.0124209     .0161768
      shhlw2 |    .0092925    .0072946      1.27    0.203     -.0050046     .0235896
     shjobw2 |   -.0069643    .0067203     -1.04    0.300     -.0201358     .0062073
    shrelaw2 |   -.0169606    .0081044     -2.09    0.036      -.032845    -.0010762
     suprtw2 |   -.0129953    .0058047     -2.24    0.025     -.0243723    -.0016183
     suchrw2 |    .0118245    .0068566      1.72    0.085     -.0016142     .0252632
    havmilsq |   -6.39e-08    2.74e-06     -0.02    0.981     -5.43e-06     5.30e-06
     radhlw2 |           0   (omitted)
       _cons |    5.841436     5580.75      0.00    0.999     -10932.23     10943.91
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        57            17  |         74
     -     |        32           240  |        272
-----------+--------------------------+-----------
   Total   |        89           257  |        346

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   64.04%
Specificity                     Pr( -|~D)   93.39%
Positive predictive value       Pr( D| +)   77.03%
Negative predictive value       Pr(~D| -)   88.24%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.61%
False - rate for true D         Pr( -| D)   35.96%
False + rate for classified +   Pr(~D| +)   22.97%
False - rate for classified -   Pr( D| -)   11.76%
--------------------------------------------------
Correctly classified                        85.84%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       346
 number of covariate patterns =       346
            Pearson chi2(295) =       312.67
                  Prob > chi2 =         0.2294

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -197.267     Log-Lik Full Model:         -111.042
D(289):                      222.083     LR(50):                      172.450
                                         Prob > LR:                     0.000
McFadden's R2:                 0.437     McFadden's Adj R2:             0.148
Maximum Likelihood R2:         0.393     Cragg & Uhler's R2:            0.577
McKelvey and Zavoina's R2:     0.765     Efron's R2:                    0.477
Variance of y*:               14.018     Variance of error:             3.290
Count R2:                      0.858     Adj Count R2:                  0.449
AIC:                           0.971     AIC*n:                       336.083
BIC:                       -1467.538     BIC':                        119.872

.
. *-----Chunk 7 female dose2  => sex life impact----------------------------
. *  wash out in the trimmed model
. title "Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 2"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 2*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:44  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=2/2 {
  2. di as input  "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  3. di as input  "wave 2 male dose avgcumdosew`j' main effect not signif"
  4.         logit HP2sxlife age marrw21-marrw26 bf4 bf4m dvcew`j' illw`j' shhlw`j' ///
>           havmilsq shrelaw`j'  suchrw2 ///
>           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 2 male dose avgcumdosew2 main effect not signif

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

note: marrw24 != 0 predicts failure perfectly
      marrw24 dropped and 3 obs not used

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

Iteration 0:   log likelihood = -166.08818
Iteration 1:   log likelihood = -113.32233
Iteration 2:   log likelihood = -107.02172
Iteration 3:   log likelihood = -106.73421
Iteration 4:   log likelihood = -106.72877
Iteration 5:   log likelihood = -106.72753
Iteration 6:   log likelihood = -106.72723
Iteration 7:   log likelihood = -106.72717
Iteration 8:   log likelihood = -106.72716

Logistic regression                               Number of obs   =        317
                                                  LR chi2(14)     =     118.72
                                                  Prob > chi2     =     0.0000
Log likelihood = -106.72716                       Pseudo R2       =     0.3574

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0644457    .0181912      3.54    0.000      .0287916     .1000998
     marrw21 |    8.652724    607.7898      0.01    0.989     -1182.593     1199.899
     marrw22 |           0   (omitted)
     marrw23 |     8.99536    607.7899      0.01    0.988     -1182.251     1200.242
     marrw24 |           0   (omitted)
     marrw25 |    10.60048     607.791      0.02    0.986     -1180.648     1201.849
     marrw26 |    8.365677    607.7915      0.01    0.989     -1182.884     1199.615
         bf4 |   -.2024234    .1925354     -1.05    0.293     -.5797859      .174939
        bf4m |    .0200376     .172285      0.12    0.907     -.3176348       .35771
      dvcew2 |           0   (omitted)
       illw2 |    .3945351    .2569746      1.54    0.125     -.1091258     .8981961
      shhlw2 |    .0030985    .0058298      0.53    0.595     -.0083277     .0145248
    havmilsq |   -2.23e-06    4.62e-06     -0.48    0.630     -.0000113     6.84e-06
    shrelaw2 |    -.010479     .006183     -1.69    0.090     -.0225974     .0016394
     suchrw2 |    .0070631    .0045745      1.54    0.123     -.0019027     .0160288
avgcumdosew2 |    .0643464    .0493461      1.30    0.192     -.0323701      .161063
     radhlw2 |    .0146535    .0060343      2.43    0.015      .0028265     .0264806
       _cons |   -13.11105    607.7916     -0.02    0.983     -1204.361     1178.139
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        35            15  |         50
     -     |        34           233  |        267
-----------+--------------------------+-----------
   Total   |        69           248  |        317

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   50.72%
Specificity                     Pr( -|~D)   93.95%
Positive predictive value       Pr( D| +)   70.00%
Negative predictive value       Pr(~D| -)   87.27%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    6.05%
False - rate for true D         Pr( -| D)   49.28%
False + rate for classified +   Pr(~D| +)   30.00%
False - rate for classified -   Pr( D| -)   12.73%
--------------------------------------------------
Correctly classified                        84.54%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       317
 number of covariate patterns =       312
            Pearson chi2(297) =       255.20
                  Prob > chi2 =         0.9621

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -166.088     Log-Lik Full Model:         -106.727
D(299):                      213.454     LR(14):                      118.722
                                         Prob > LR:                     0.000
McFadden's R2:                 0.357     McFadden's Adj R2:             0.249
Maximum Likelihood R2:         0.312     Cragg & Uhler's R2:            0.481
McKelvey and Zavoina's R2:     0.539     Efron's R2:                    0.374
Variance of y*:                7.131     Variance of error:             3.290
Count R2:                      0.845     Adj Count R2:                  0.290
AIC:                           0.787     AIC*n:                       249.454
BIC:                       -1508.457     BIC':                        -38.097

. title "Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 2"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****Chunk 7 trimmed male model of dose and HP2sxlife relationship in wave 2*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:46  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=2/2 {
  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 2 male dose avgcumdosew`j' main effect not signif"
  5.         logit HP2sxlife age  bf4  illw`j' ///
>           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 2 male dose avgcumdosew2 main effect not signif

Iteration 0:   log likelihood = -171.51396
Iteration 1:   log likelihood = -121.56573
Iteration 2:   log likelihood = -115.51071
Iteration 3:   log likelihood = -115.37175
Iteration 4:   log likelihood =  -115.3714
Iteration 5:   log likelihood =  -115.3714

Logistic regression                               Number of obs   =        340
                                                  LR chi2(5)      =     112.29
                                                  Prob > chi2     =     0.0000
Log likelihood =  -115.3714                       Pseudo R2       =     0.3273

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0668709    .0154805      4.32    0.000      .0365295     .0972122
         bf4 |   -.1650598    .0368511     -4.48    0.000     -.2372867    -.0928329
       illw2 |    .3077459    .2454954      1.25    0.210     -.1734162      .788908
avgcumdosew2 |    .0621309    .0473611      1.31    0.190     -.0306951     .1549569
     radhlw2 |     .010562    .0054615      1.93    0.053     -.0001422     .0212663
       _cons |   -3.881348    1.050876     -3.69    0.000     -5.941027     -1.82167
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        32            15  |         47
     -     |        37           256  |        293
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   46.38%
Specificity                     Pr( -|~D)   94.46%
Positive predictive value       Pr( D| +)   68.09%
Negative predictive value       Pr(~D| -)   87.37%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    5.54%
False - rate for true D         Pr( -| D)   53.62%
False + rate for classified +   Pr(~D| +)   31.91%
False - rate for classified -   Pr( D| -)   12.63%
--------------------------------------------------
Correctly classified                        84.71%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       330
            Pearson chi2(324) =       287.38
                  Prob > chi2 =         0.9292

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -115.371
D(334):                      230.743     LR(5):                       112.285
                                         Prob > LR:                     0.000
McFadden's R2:                 0.327     McFadden's Adj R2:             0.292
Maximum Likelihood R2:         0.281     Cragg & Uhler's R2:            0.443
McKelvey and Zavoina's R2:     0.462     Efron's R2:                    0.344
Variance of y*:                6.119     Variance of error:             3.290
Count R2:                      0.847     Adj Count R2:                  0.246
AIC:                           0.714     AIC*n:                       242.743
BIC:                       -1716.125     BIC':                        -83.140

.
. * sex life washes out
.
.
. scalar MainEffsxlifeMw2 = "age bf4 illw2 radhlw2"

. scalar SigDosesxlifeMw2 = "no"

.
.
. forvalues j=2/2 {
  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 2 for H1 part 2 with dose ns*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:47  *****
*******************************************************************************
*******************************************************************************


-------------
title2: Wave `j dose HPsxlife relationship but avgcumdosew2: Dose not signif
                                       Date and time:   1 Jul 2012    15:04:47
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
                                       Stata data file:  chwide1jul2012.dta  has  2399  variables and  703  observations

Wave `j dose HPsxlife relationship but avgcumdosew2: Dose not signif
-------------

.
.
. cap gen radhlw2Xd3 = radhlw2*avgcumdosew2

.
. 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=2/2 {
  2.                 sw, pr(.1):logistic HP2sxlife age bf4 illw`j' ///
>                 avgcumdosew`j' radhlw`j' ageXd3 radhlw2Xd3 illw2Xd3 if gender==1, coef nolog
  3.                         estat class
  4.                         estat gof
  5.                         fitstat
  6. }


  begin with full model


p = 0.6505 >= 0.1000  removing avgcumdosew2


p = 0.4079 >= 0.1000  removing illw2Xd3


Logistic regression                               Number of obs   =        340
                                                  LR chi2(6)      =     121.14
                                                  Prob > chi2     =     0.0000
Log likelihood = -110.94454                       Pseudo R2       =     0.3531

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0529331    .0169001      3.13    0.002      .0198095     .0860566
         bf4 |   -.1653141    .0375369     -4.40    0.000     -.2388852    -.0917431
       illw2 |    .4168743    .2517861      1.66    0.098     -.0766174     .9103659
  radhlw2Xd3 |   -.0118911    .0064749     -1.84    0.066     -.0245816     .0007994
     radhlw2 |    .0203277    .0073575      2.76    0.006      .0059072     .0347481
      ageXd3 |    .0144933    .0077512      1.87    0.062     -.0006989     .0296854
       _cons |   -3.925242    1.078928     -3.64    0.000     -6.039901    -1.810582
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        33            11  |         44
     -     |        36           260  |        296
-----------+--------------------------+-----------
   Total   |        69           271  |        340

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   47.83%
Specificity                     Pr( -|~D)   95.94%
Positive predictive value       Pr( D| +)   75.00%
Negative predictive value       Pr(~D| -)   87.84%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.06%
False - rate for true D         Pr( -| D)   52.17%
False + rate for classified +   Pr(~D| +)   25.00%
False - rate for classified -   Pr( D| -)   12.16%
--------------------------------------------------
Correctly classified                        86.18%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       340
 number of covariate patterns =       330
            Pearson chi2(323) =       291.21
                  Prob > chi2 =         0.8976

Measures of Fit for logistic of HP2sxlife

Log-Lik Intercept Only:     -171.514     Log-Lik Full Model:         -110.945
D(333):                      221.889     LR(6):                       121.139
                                         Prob > LR:                     0.000
McFadden's R2:                 0.353     McFadden's Adj R2:             0.312
Maximum Likelihood R2:         0.300     Cragg & Uhler's R2:            0.472
McKelvey and Zavoina's R2:     0.539     Efron's R2:                    0.379
Variance of y*:                7.135     Variance of error:             3.290
Count R2:                      0.862     Adj Count R2:                  0.319
AIC:                           0.694     AIC*n:                       235.889
BIC:                       -1719.150     BIC':                        -86.165

.
. scalar sxlifeModMw2 = "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 2"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                   Chunk 7 trimmed female model:                     *****
*****             dose and HP2sxlife relationship in wave 2               *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:53  *****
*******************************************************************************
*******************************************************************************


. * female models
.         forvalues j=2/2 {
  2.
. set more off
  3. des bf4 bf4m shfamw2 shrelaw2 avgcumdosew2
  4. title "trimmed HP2sexlife main effects models" "wave 2 for H1 part 2 with dose ns"
  5. title "wave 2 dose HP2sexlife relationship" "avgcumdosew`j' Dose not signif"
  6.         logit HP2sxlife age marrw21-marrw26  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)


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


shrelaw2          double   %8.0g                        Percentage of strains and hassles related to relationships in 1996


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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****               trimmed HP2sexlife main effects models                *****
*****                 wave 2 for H1 part 2 with dose ns                   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:53  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                wave 2 dose HP2sexlife relationship                  *****
*****                    avgcumdosew2 Dose not signif                     *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:53  *****
*******************************************************************************
*******************************************************************************


note: marrw24 omitted because of collinearity
note: marrw26 omitted because of collinearity
Iteration 0:   log likelihood = -206.26609
Iteration 1:   log likelihood = -143.57745
Iteration 2:   log likelihood = -138.68519
Iteration 3:   log likelihood = -138.62333
Iteration 4:   log likelihood = -138.62326
Iteration 5:   log likelihood = -138.62326

Logistic regression                               Number of obs   =        362
                                                  LR chi2(11)     =     135.29
                                                  Prob > chi2     =     0.0000
Log likelihood = -138.62326                       Pseudo R2       =     0.3279

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .076392    .0165292      4.62    0.000      .0439954     .1087886
     marrw21 |   -.5305645    .8871345     -0.60    0.550     -2.269316     1.208187
     marrw22 |    .2470266    1.206929      0.20    0.838      -2.11851     2.612563
     marrw23 |   -.9086585    .7011467     -1.30    0.195     -2.282881     .4655638
     marrw24 |           0   (omitted)
     marrw25 |   -1.473965    1.020033     -1.45    0.148     -3.473194      .525263
     marrw26 |           0   (omitted)
     radhlw2 |    .0078658    .0048473      1.62    0.105     -.0016346     .0173663
         bf4 |   -.6041323    .1886755     -3.20    0.001     -.9739294    -.2343351
        bf4m |      .40554    .1714694      2.37    0.018      .0694661     .7416139
     shfamw2 |   -.0013231    .0052527     -0.25    0.801     -.0116181      .008972
    shrelaw2 |   -.0119535    .0060123     -1.99    0.047     -.0237374    -.0001695
avgcumdosew2 |     .185182    .1129898      1.64    0.101     -.0362739     .4066379
       _cons |   -6.005196    1.747399     -3.44    0.001     -9.430035    -2.580358
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        53            20  |         73
     -     |        40           249  |        289
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   56.99%
Specificity                     Pr( -|~D)   92.57%
Positive predictive value       Pr( D| +)   72.60%
Negative predictive value       Pr(~D| -)   86.16%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.43%
False - rate for true D         Pr( -| D)   43.01%
False + rate for classified +   Pr(~D| +)   27.40%
False - rate for classified -   Pr( D| -)   13.84%
--------------------------------------------------
Correctly classified                        83.43%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       361
            Pearson chi2(349) =       408.71
                  Prob > chi2 =         0.0151

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -138.623
D(348):                      277.247     LR(11):                      135.286
                                         Prob > LR:                     0.000
McFadden's R2:                 0.328     McFadden's Adj R2:             0.260
Maximum Likelihood R2:         0.312     Cragg & Uhler's R2:            0.459
McKelvey and Zavoina's R2:     0.482     Efron's R2:                    0.384
Variance of y*:                6.352     Variance of error:             3.290
Count R2:                      0.834     Adj Count R2:                  0.355
AIC:                           0.843     AIC*n:                       305.247
BIC:                       -1773.046     BIC':                        -70.478

. scalar SigDoseSxlifeFw2 = "no"

. scalar MainEffsxlifeFw2 = "age marrw23 radhlw2 bf4 bf4m shrelaw2"

. *-----  constructing possible moderators
.
.       foreach var in marrw21 marrw22 marrw23 marrw24 marrw25 marrw26 ///
>           bf4 bf4m shfamw2 shrelaw2 radhlw2 {
  2.        cap gen `var'Xd3 = `var'*avgcumdosew2
  3.          }

.
. title "Chunk 7 trimmed female model:" "dose and HP2sxlife relationship in wave 2"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                   Chunk 7 trimmed female model:                     *****
*****             dose and HP2sxlife relationship in wave 2               *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:54  *****
*******************************************************************************
*******************************************************************************


. * female models
.         forvalues j=2/2 {
  2.
. set more off
  3. des bf4 bf4m shfamw2 shrelaw2 avgcumdosew2
  4. title "trimmed HP2sexlife main effects models" "wave 2 for H1 part 2 with dose ns"
  5. title "wave 2 dose HP2sexlife relationship" "avgcumdosew`j' Dose not signif"
  6.         logit HP2sxlife age marrw21-marrw26  radhlw`j' bf4 bf4m   ///
>            shfamw`j' shrelaw`j' avgcumdosew`j'  ageXd3 marrw21Xd3 marrw22Xd3 ///
>            marrw23Xd3 marrw24Xd3 marrw25Xd3 bf4Xd3 bf4mXd3 shrelaw2Xd3 ///
>              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)


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


shrelaw2          double   %8.0g                        Percentage of strains and hassles related to relationships in 1996


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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****               trimmed HP2sexlife main effects models                *****
*****                 wave 2 for H1 part 2 with dose ns                   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:54  *****
*******************************************************************************
*******************************************************************************


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                wave 2 dose HP2sexlife relationship                  *****
*****                    avgcumdosew2 Dose not signif                     *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:54  *****
*******************************************************************************
*******************************************************************************


note: marrw24 omitted because of collinearity
note: marrw26 omitted because of collinearity
note: marrw24Xd3 omitted because of collinearity
Iteration 0:   log likelihood = -206.26609
Iteration 1:   log likelihood = -141.90135
Iteration 2:   log likelihood = -137.13734
Iteration 3:   log likelihood = -137.05422
Iteration 4:   log likelihood = -137.05402
Iteration 5:   log likelihood = -137.05402

Logistic regression                               Number of obs   =        362
                                                  LR chi2(19)     =     138.42
                                                  Prob > chi2     =     0.0000
Log likelihood = -137.05402                       Pseudo R2       =     0.3355

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0771657    .0249115      3.10    0.002        .02834     .1259913
     marrw21 |   -1.451767    1.441353     -1.01    0.314     -4.276767     1.373234
     marrw22 |    .0685249    1.464872      0.05    0.963     -2.802572     2.939622
     marrw23 |   -1.092581    .9071979     -1.20    0.228     -2.870657     .6854937
     marrw24 |           0   (omitted)
     marrw25 |   -1.837988    1.514456     -1.21    0.225     -4.806268     1.130292
     marrw26 |           0   (omitted)
     radhlw2 |    .0079384    .0048969      1.62    0.105     -.0016593     .0175361
         bf4 |    -.363408    .3781896     -0.96    0.337     -1.104646     .3778301
        bf4m |    .2325195    .3434991      0.68    0.498     -.4407264     .9057654
     shfamw2 |   -.0007843    .0054412     -0.14    0.885      -.011449     .0098803
    shrelaw2 |   -.0124226    .0061868     -2.01    0.045     -.0245484    -.0002967
avgcumdosew2 |   -1.023812    3.170547     -0.32    0.747      -7.23797     5.190346
      ageXd3 |    .0002661    .0332903      0.01    0.994     -.0649818     .0655139
  marrw21Xd3 |    1.328931    1.506104      0.88    0.378     -1.622979      4.28084
  marrw22Xd3 |    .1769697    .9861833      0.18    0.858     -1.755914     2.109853
  marrw23Xd3 |    .2926788    .7754937      0.38    0.706     -1.227261     1.812619
  marrw24Xd3 |           0   (omitted)
  marrw25Xd3 |    .2934835    .9361317      0.31    0.754     -1.541301     2.128268
      bf4Xd3 |   -.2172939    .2938598     -0.74    0.460     -.7932486     .3586608
     bf4mXd3 |      .14997    .2614038      0.57    0.566      -.362372     .6623121
 shrelaw2Xd3 |    .0002655    .0431225      0.01    0.995      -.084253      .084784
       _cons |    -5.03786    3.098692     -1.63    0.104     -11.11118     1.035465
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        55            20  |         75
     -     |        38           249  |        287
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   59.14%
Specificity                     Pr( -|~D)   92.57%
Positive predictive value       Pr( D| +)   73.33%
Negative predictive value       Pr(~D| -)   86.76%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.43%
False - rate for true D         Pr( -| D)   40.86%
False + rate for classified +   Pr(~D| +)   26.67%
False - rate for classified -   Pr( D| -)   13.24%
--------------------------------------------------
Correctly classified                        83.98%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       361
            Pearson chi2(341) =       404.96
                  Prob > chi2 =         0.0097

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -137.054
D(339):                      274.108     LR(19):                      138.424
                                         Prob > LR:                     0.000
McFadden's R2:                 0.336     McFadden's Adj R2:             0.224
Maximum Likelihood R2:         0.318     Cragg & Uhler's R2:            0.467
McKelvey and Zavoina's R2:     0.494     Efron's R2:                    0.389
Variance of y*:                6.498     Variance of error:             3.290
Count R2:                      0.840     Adj Count R2:                  0.376
AIC:                           0.884     AIC*n:                       320.108
BIC:                       -1723.159     BIC':                        -26.483

. scalar sxlifeModFw2="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*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:56  *****
*******************************************************************************
*******************************************************************************


. * male models
.         forvalues j=2/2 {
  2. set more off
  3. des bf4 bf4m shfamw2 shrelaw2 avgcumdosew2
  4. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  5. title "wave 2 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  6.         logit HP2sxlife age marrw21-marrw26 radhlw`j' bf4 bf4m   ///
>            shfamw`j' shrelaw`j' avgcumdosew`j' marrw21Xd3 marrw22Xd3 ///
>            marrw23Xd3 marrw24Xd3 marrw25Xd3 marrw26Xd3 radhlw`j'Xd3 ///
>            bf4Xd3 shfamw2Xd3 shrelaw2Xd3 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)


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


shrelaw2          double   %8.0g                        Percentage of strains and hassles related to relationships in 1996


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
 1 Jul 2012
15:04:56
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
Data file  chwide1jul2012.dta  currrently has  2406  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 2 dose HP2sexlife relationship but avgcumdosew2: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:56  *****
*******************************************************************************
*******************************************************************************


note: marrw24 omitted because of collinearity
note: marrw26 omitted because of collinearity
note: marrw24Xd3 omitted because of collinearity
note: marrw26Xd3 omitted because of collinearity
Iteration 0:   log likelihood = -206.26609
Iteration 1:   log likelihood = -142.57705
Iteration 2:   log likelihood = -137.51325
Iteration 3:   log likelihood = -137.42461
Iteration 4:   log likelihood = -137.42437
Iteration 5:   log likelihood = -137.42437

Logistic regression                               Number of obs   =        362
                                                  LR chi2(19)     =     137.68
                                                  Prob > chi2     =     0.0000
Log likelihood = -137.42437                       Pseudo R2       =     0.3338

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0881857    .0228618      3.86    0.000      .0433774      .132994
     marrw21 |   -1.190817    1.437325     -0.83    0.407     -4.007921     1.626288
     marrw22 |    .0152843    1.480232      0.01    0.992     -2.885916     2.916485
     marrw23 |   -1.100839    .8999384     -1.22    0.221     -2.864686     .6630077
     marrw24 |           0   (omitted)
     marrw25 |   -1.714881    1.480971     -1.16    0.247      -4.61753     1.187768
     marrw26 |           0   (omitted)
     radhlw2 |    .0059255    .0058476      1.01    0.311     -.0055355     .0173866
         bf4 |   -.5647269    .1952268     -2.89    0.004     -.9473645    -.1820894
        bf4m |    .4033962     .174148      2.32    0.021      .0620723     .7447201
     shfamw2 |    .0021518    .0065354      0.33    0.742     -.0106573     .0149608
    shrelaw2 |   -.0127936    .0062133     -2.06    0.039     -.0249714    -.0006158
avgcumdosew2 |    1.042177    1.610695      0.65    0.518     -2.114727     4.199082
  marrw21Xd3 |    1.083118    1.522783      0.71    0.477     -1.901481     4.067718
  marrw22Xd3 |    .3220928    1.102342      0.29    0.770     -1.838458     2.482644
  marrw23Xd3 |     .394904    .7698412      0.51    0.608     -1.113957     1.903765
  marrw24Xd3 |           0   (omitted)
  marrw25Xd3 |    .3165762    .9106048      0.35    0.728     -1.468176     2.101329
  marrw26Xd3 |           0   (omitted)
  radhlw2Xd3 |    .0024173    .0037617      0.64    0.520     -.0049555       .00979
      bf4Xd3 |   -.0361335     .046891     -0.77    0.441     -.1280381     .0557711
  shfamw2Xd3 |   -.0034656    .0052445     -0.66    0.509     -.0137447     .0068135
 shrelaw2Xd3 |   -.0162686    .0222527     -0.73    0.465     -.0598831     .0273459
       _cons |   -6.710013     2.18777     -3.07    0.002     -10.99796    -2.422062
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        54            19  |         73
     -     |        39           250  |        289
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   58.06%
Specificity                     Pr( -|~D)   92.94%
Positive predictive value       Pr( D| +)   73.97%
Negative predictive value       Pr(~D| -)   86.51%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    7.06%
False - rate for true D         Pr( -| D)   41.94%
False + rate for classified +   Pr(~D| +)   26.03%
False - rate for classified -   Pr( D| -)   13.49%
--------------------------------------------------
Correctly classified                        83.98%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       361
            Pearson chi2(341) =       404.20
                  Prob > chi2 =         0.0104

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -137.424
D(338):                      274.849     LR(19):                      137.683
                                         Prob > LR:                     0.000
McFadden's R2:                 0.334     McFadden's Adj R2:             0.217
Maximum Likelihood R2:         0.316     Cragg & Uhler's R2:            0.465
McKelvey and Zavoina's R2:     0.497     Efron's R2:                    0.388
Variance of y*:                6.546     Variance of error:             3.290
Count R2:                      0.840     Adj Count R2:                  0.376
AIC:                           0.892     AIC*n:                       322.849
BIC:                       -1716.527     BIC':                        -25.742

.
. title "fully female moderator model of dose & HP2sxlife relationship in wv 3"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****fully female moderator model of dose & HP2sxlife relationship in wv 3*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:58  *****
*******************************************************************************
*******************************************************************************


. title2 "Signif female dose main effect "
-------------
title2: Signif female dose main effect
                                       Date and time:   1 Jul 2012    15:04:58
                                       Working directory:  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
                                       Stata data file:  chwide1jul2012.dta  has  2406  variables and  703  observations

Signif female dose main effect
-------------

.
. * female models
.         forvalues j=2/2 {
  2. des bf4 bf4m shfamw2 shrelaw2 avgcumdosew2
  3. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  4. title "wave 2 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  5.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>            shrelaw2 shfamw`j'  avgcumdosew`j'  ///
>           shrelaw2Xd3 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)


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


shrelaw2          double   %8.0g                        Percentage of strains and hassles related to relationships in 1996


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
 1 Jul 2012
15:04:58
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
Data file  chwide1jul2012.dta  currrently has  2406  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 2 dose HP2sexlife relationship but avgcumdosew2: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:58  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -206.26609
Iteration 1:   log likelihood = -145.82764
Iteration 2:   log likelihood =   -140.338
Iteration 3:   log likelihood =  -140.1844
Iteration 4:   log likelihood =  -140.1838
Iteration 5:   log likelihood =  -140.1838

Logistic regression                               Number of obs   =        362
                                                  LR chi2(8)      =     132.16
                                                  Prob > chi2     =     0.0000
Log likelihood =  -140.1838                       Pseudo R2       =     0.3204

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .086161    .0187529      4.59    0.000       .049406      .122916
     radhlw2 |    .0086327     .004785      1.80    0.071     -.0007457      .018011
         bf4 |   -.5633458    .1891523     -2.98    0.003     -.9340774    -.1926141
        bf4m |    .3743527    .1732499      2.16    0.031      .0347891     .7139163
    shrelaw2 |   -.0122309    .0059271     -2.06    0.039     -.0238478     -.000614
     shfamw2 |   -.0009006    .0051781     -0.17    0.862     -.0110495     .0092484
avgcumdosew2 |    .9067215    .7875706      1.15    0.250     -.6368885     2.450332
 shrelaw2Xd3 |   -.0126027    .0132428     -0.95    0.341     -.0385582     .0133527
       _cons |   -7.277228    1.721919     -4.23    0.000     -10.65213    -3.902329
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        52            22  |         74
     -     |        41           247  |        288
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   55.91%
Specificity                     Pr( -|~D)   91.82%
Positive predictive value       Pr( D| +)   70.27%
Negative predictive value       Pr(~D| -)   85.76%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.18%
False - rate for true D         Pr( -| D)   44.09%
False + rate for classified +   Pr(~D| +)   29.73%
False - rate for classified -   Pr( D| -)   14.24%
--------------------------------------------------
Correctly classified                        82.60%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       361
            Pearson chi2(352) =       405.41
                  Prob > chi2 =         0.0259

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -140.184
D(353):                      280.368     LR(8):                       132.165
                                         Prob > LR:                     0.000
McFadden's R2:                 0.320     McFadden's Adj R2:             0.277
Maximum Likelihood R2:         0.306     Cragg & Uhler's R2:            0.450
McKelvey and Zavoina's R2:     0.479     Efron's R2:                    0.373
Variance of y*:                6.317     Variance of error:             3.290
Count R2:                      0.826     Adj Count R2:                  0.323
AIC:                           0.824     AIC*n:                       298.368
BIC:                       -1799.383     BIC':                        -85.031

. * female models
.         forvalues j=2/2 {
  2. des bf4 bf4m shfamw2 shrelaw2 avgcumdosew2
  3. title3 "trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns"
  4. title "wave 2 dose HP2sexlife relationship but avgcumdosew`j': Dose not signif"
  5.         logit HP2sxlife age  radhlw`j' bf4 bf4m   ///
>            shrelaw2 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)


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


shrelaw2          double   %8.0g                        Percentage of strains and hassles related to relationships in 1996


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


-------------
title3 : trimmed HP2sexlife main effects models wave 1 for H1 part 2 with dose ns
 1 Jul 2012
15:04:59
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
Data file  chwide1jul2012.dta  currrently has  2406  variables and  703  observations


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****wave 2 dose HP2sexlife relationship but avgcumdosew2: Dose not signif*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:04:59  *****
*******************************************************************************
*******************************************************************************


Iteration 0:   log likelihood = -206.26609
Iteration 1:   log likelihood = -147.80582
Iteration 2:   log likelihood = -142.56802
Iteration 3:   log likelihood = -142.50325
Iteration 4:   log likelihood = -142.50319
Iteration 5:   log likelihood = -142.50319

Logistic regression                               Number of obs   =        362
                                                  LR chi2(6)      =     127.53
                                                  Prob > chi2     =     0.0000
Log likelihood = -142.50319                       Pseudo R2       =     0.3091

-------------+----------------------------------------------------------------
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0773867    .0151879      5.10    0.000      .0476189     .1071545
     radhlw2 |    .0092803    .0047101      1.97    0.049      .0000487     .0185119
         bf4 |   -.5791652    .1890895     -3.06    0.002     -.9497739    -.2085566
        bf4m |    .3860275    .1731752      2.23    0.026      .0466104     .7254445
    shrelaw2 |   -.0111587    .0058224     -1.92    0.055     -.0225703      .000253
     shfamw2 |   -.0012219     .005072     -0.24    0.810     -.0111628      .008719
       _cons |   -6.703691    1.604696     -4.18    0.000     -9.848837    -3.558545
-------------+----------------------------------------------------------------

Logistic model for HP2sxlife

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        49            23  |         72
     -     |        44           246  |        290
-----------+--------------------------+-----------
   Total   |        93           269  |        362

Classified + if predicted Pr(D) >= .5
True D defined as HP2sxlife != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   52.69%
Specificity                     Pr( -|~D)   91.45%
Positive predictive value       Pr( D| +)   68.06%
Negative predictive value       Pr(~D| -)   84.83%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    8.55%
False - rate for true D         Pr( -| D)   47.31%
False + rate for classified +   Pr(~D| +)   31.94%
False - rate for classified -   Pr( D| -)   15.17%
--------------------------------------------------
Correctly classified                        81.49%
--------------------------------------------------


Logistic model for HP2sxlife, goodness-of-fit test


       number of observations =       362
 number of covariate patterns =       357
            Pearson chi2(350) =       401.39
                  Prob > chi2 =         0.0301

Measures of Fit for logit of HP2sxlife

Log-Lik Intercept Only:     -206.266     Log-Lik Full Model:         -142.503
D(355):                      285.006     LR(6):                       127.526
                                         Prob > LR:                     0.000
McFadden's R2:                 0.309     McFadden's Adj R2:             0.275
Maximum Likelihood R2:         0.297     Cragg & Uhler's R2:            0.437
McKelvey and Zavoina's R2:     0.465     Efron's R2:                    0.360
Variance of y*:                6.146     Variance of error:             3.290
Count R2:                      0.815     Adj Count R2:                  0.280
AIC:                           0.826     AIC*n:                       299.006
BIC:                       -1806.527     BIC':                        -92.176

.
. scalar MainEffsxlifeFw2 = "age radhlw2 bf4 bf4m shrelaw2 shfamw2"

. scalar SigDoseSxlifeFw2="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 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6004

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

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

                                                   AIC             =  7.838826
Log likelihood   =   -1330.6004                    BIC             =  47947.46

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5832314    .2635871      2.21    0.027      .0666101     1.099853
       _cons |    48.62133    .7061562     68.85    0.000      47.23729     50.00537
-------------+----------------------------------------------------------------

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

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


illw2             double   %8.0g                        Total number of illnesses experienced in time period 1987-1996


. glm illw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -303.59609

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

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

                                                   AIC             =  1.797624
Log likelihood   = -303.5960853                    BIC             = -1851.445

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .0085423    .0128556      0.66    0.506     -.0166543     .0337389
       _cons |    .2741359    .0344406      7.96    0.000      .2066336     .3416382
-------------+----------------------------------------------------------------

. glm HP2sxlife illw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  327.4086
Iteration 2:   deviance =  327.3702
Iteration 3:   deviance =  327.3699
Iteration 4:   deviance =  327.3699
Iteration 5:   deviance =  327.3699

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =    327.36992                    (1/df) Deviance =  .9685501
Pearson          =  335.9738293                    (1/df) Pearson  =  .9940054

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

                                                   BIC             = -1642.814

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .4754044    .1211711      3.92    0.000      .2379134     .7128953
       _cons |   -.9963884    .0886054    -11.25    0.000     -1.170052     -.822725
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw2

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


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


. glm radhlw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1693.4076

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

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

                                                   AIC             =  9.972986
Log likelihood   = -1693.407647                    BIC             =  419831.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.220373     .766216      1.59    0.111     -.2813831     2.722128
       _cons |    45.63198    2.052711     22.23    0.000      41.60874     49.65522
-------------+----------------------------------------------------------------

. glm HP2sxlife radhlw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  299.0301
Iteration 2:   deviance =  296.5897
Iteration 3:   deviance =  296.5625
Iteration 4:   deviance =  296.5625
Iteration 5:   deviance =  296.5625

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  296.5625078                    (1/df) Deviance =  .8774039
Pearson          =   336.752315                    (1/df) Pearson  =  .9963086

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

                                                   BIC             = -1673.621

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0156386    .0022528      6.94    0.000      .0112232      .020054
       _cons |   -1.687381    .1543913    -10.93    0.000     -1.989983     -1.38478
-------------+----------------------------------------------------------------
(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  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1225

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

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

                                                   AIC             =  6.053662
Log likelihood   = -1027.122509                    BIC             =  6404.476

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0331637    .1079644     -0.31    0.759     -.2447701     .1784427
       _cons |    12.52896    .2892393     43.32    0.000      11.96206     13.09586
-------------+----------------------------------------------------------------

. 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  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1060.7791

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

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

                                                   AIC             =  6.251642
Log likelihood   = -1060.779096                    BIC             =  8238.006

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0266037    .1191987     -0.22    0.823     -.2602289     .2070215
       _cons |    20.34324    .3193362     63.70    0.000      19.71735     20.96913
-------------+----------------------------------------------------------------

. 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 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1406.9403

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

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

                                                   AIC             =  7.762756
Log likelihood   = -1406.940271                    BIC             =  47299.65

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.502324    .4454009      3.37    0.001      .6293547     2.375294
       _cons |    48.86944    .7323225     66.73    0.000      47.43412     50.30477
-------------+----------------------------------------------------------------

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

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


illw2             double   %8.0g                        Total number of illnesses experienced in time period 1987-1996


. glm illw2 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -463.51524

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

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

                                                   AIC             =  2.564822
Log likelihood   = -463.5152411                    BIC             = -1854.645

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1249912    .0331157      3.77    0.000      .0600856     .1898968
       _cons |     .301285    .0544484      5.53    0.000       .194568     .4080019
-------------+----------------------------------------------------------------

. glm HP2sxlife illw2 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  388.6886
Iteration 2:   deviance =  388.2329
Iteration 3:   deviance =  388.2328
Iteration 4:   deviance =  388.2328

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  388.2327887                    (1/df) Deviance =  1.075437
Pearson          =  359.7775997                    (1/df) Pearson  =  .9966138

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

                                                   BIC             = -1739.647

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .4442672    .0949037      4.68    0.000      .2582594      .630275
       _cons |   -.8535276    .0872416     -9.78    0.000     -1.024518    -.6825372
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw2

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


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


. glm radhlw2 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1791.2233

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

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

                                                   AIC             =  9.880018
Log likelihood   = -1791.223306                    BIC             =  408533.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    3.302288    1.283833      2.57    0.010      .7860214     5.818555
       _cons |    56.95167    2.110863     26.98    0.000      52.81445     61.08888
-------------+----------------------------------------------------------------

. glm HP2sxlife radhlw2 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  390.2214
Iteration 2:   deviance =  389.9357
Iteration 3:   deviance =  389.9356
Iteration 4:   deviance =  389.9356

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  389.9355535                    (1/df) Deviance =  1.080154
Pearson          =  370.7850434                    (1/df) Pearson  =  1.027105

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

                                                   BIC             = -1737.944

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0108547    .0023275      4.66    0.000      .0062929     .0154166
       _cons |   -1.340315    .1718732     -7.80    0.000      -1.67718    -1.003449
-------------+----------------------------------------------------------------
(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  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.0983

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

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

                                                   AIC             =  6.121754
Log likelihood   = -1109.098281                    BIC             =  7450.466

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.595012    .1960703     -3.03    0.002     -.9793027    -.2107212
       _cons |    11.02048    .3223763     34.19    0.000      10.38863     11.65232
-------------+----------------------------------------------------------------

. 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  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1140.8259

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

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

                                                   AIC             =  6.296561
Log likelihood   = -1140.825904                    BIC             =  9280.095

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.599311    .2139789     -2.80    0.005     -1.018702    -.1799202
       _cons |    18.83424    .3518214     53.53    0.000      18.14469      19.5238
-------------+----------------------------------------------------------------

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

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


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


. glm shfamw2  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1804.1821

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

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

                                                   AIC             =  9.978907
Log likelihood   = -1804.182119                    BIC             =  449963.4

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .6648412    1.349346      0.49    0.622     -1.979828      3.30951
       _cons |     33.6876    2.218839     15.18    0.000      29.33876     38.03645
-------------+----------------------------------------------------------------

. glm HP2sxlife shfamw2 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  411.7925
Iteration 2:   deviance =  411.1829
Iteration 3:   deviance =  411.1826
Iteration 4:   deviance =  411.1826

Generalized linear models                          No. of obs      =       362
Optimization     : MQL Fisher scoring              Residual df     =       360
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  411.1826472                    (1/df) Deviance =  1.142174
Pearson          =  361.8999919                    (1/df) Pearson  =  1.005278

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

                                                   BIC             = -1709.809

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw2 |   -.0023803    .0021918     -1.09    0.277     -.0066761     .0019156
       _cons |   -.5736929    .1047839     -5.48    0.000     -.7790656    -.3683202
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des shrelaw2

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


shrelaw2          double   %8.0g                        Percentage of strains and hassles related to relationships in 1996


. glm shrelaw2  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1767.2727

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

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

                                                   AIC             =  9.748059
Log likelihood   = -1767.272695                    BIC             =  357766.3

-------------+----------------------------------------------------------------
             |                 OIM
     shrelaw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.945314     1.20186      1.62    0.106     -.4102891     4.300917
       _cons |    22.64351    1.976084     11.46    0.000      18.77046     26.51657
-------------+----------------------------------------------------------------

. glm HP2sxlife shrelaw2 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  415.0412
Iteration 2:   deviance =   414.406
Iteration 3:   deviance =  414.4058
Iteration 4:   deviance =  414.4058

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  414.4057989                    (1/df) Deviance =  1.147939
Pearson          =  362.9721983                    (1/df) Pearson  =  1.005463

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

                                                   BIC             = -1713.474

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    shrelaw2 |   -.0020918    .0024591     -0.85    0.395     -.0069114     .0027279
       _cons |   -.5970179    .0953785     -6.26    0.000     -.7839564    -.4100794
-------------+----------------------------------------------------------------
(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 radhlw2 bf4 bf4m (soma) mediate sex life for women
.
. scalar sxlifeMedMw2 = "age illw2"

. scalar sxlifeMedFw2 = "age illw2 radhlw2 bf4 bf4m"

. title4 "5. summary matrix contstruction for dose -> sexlife impact"
-------------
5. summary matrix contstruction for dose -> sexlife impact
-------------

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

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

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

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

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

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

.         matrix rowname HP2sxlifeMw2 = HP2sxlifeMw2

.         matrix rowname HP2sxlifeFw2 = HP2sxlifeFw2

.         matlist HP2sxlifeMw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2sxlifeMw2   |         1            2            3            1            0            4            0

   | c8
-------------+-----------
HP2sxlifeMw2   |         2

.         matlist HP2sxlifeFw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2sxlifeFw2   |         1            2            3            2            1            6            0

   | c8
-------------+-----------
HP2sxlifeFw2   |         5

. matrix define H1pt2w2 = ( HP2wkMw2 \ HP2wkFw2 \ HP2hmcrMw2 \ HP2hmcrFw2 \ HP2spMw2 \ HP2spFw2 \ HP2prbfamMw2 \ HP2prbfamFw2 \ HP2sxlifeMw2 \ HP2sxlifeFw2 )

.
.         matlist H1pt2w2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            1            0
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            2            0
HP2spMw2   |         1            2            3            1            0            2            0
HP2spFw2   |         1            2            3            2            1            5            5
HP2prbfamM   |         1            2            3            1            0            5            0
HP2prbfamF   |         1            2            3            2            0            2            2
HP2sxlifeMw2   |         1            2            3            1            0            4            0
HP2sxlifeFw2   |         1            2            3            2            1            6            0

   | c8
-------------+-----------
r1   |         4
r1   |         6
r1   |         2
r1   |         2
HP2spMw2   |         1
HP2spFw2   |         2
HP2prbfamM   |         1
HP2prbfamF   |         2
HP2sxlifeMw2   |         2
HP2sxlifeFw2   |         5

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

.     matrix rownames H1pt2w2 =   HP2wkMw2 HP2wkFw2 HP2hmcrMw2 HP2hmcrFw2 HP2prbfhmMw2 HP2prbfhmFw2

.     matlist H1pt2w2

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig
-------------+-----------------------------------------------------------------------------
HP2wkMw2   |         1            2            3            1            0            4            0
HP2wkFw2   |         1            2            3            2            0            1            0
HP2hmcrMw2   |         1            2            3            1            0            4            0
HP2hmcrFw2   |         1            2            3            2            0            2            0
HP2prbfhmMw2   |         1            2            3            1            0            2            0
HP2prbfhmFw2   |         1            2            3            2            1            5            5
HP2prbfhmFw2   |         1            2            3            1            0            5            0
HP2prbfhmFw2   |         1            2            3            2            0            2            2
HP2prbfhmFw2   |         1            2            3            1            0            4            0
HP2prbfhmFw2   |         1            2            3            2            1            6            0

   | numMed
-------------+-----------
HP2wkMw2   |         4
HP2wkFw2   |         6
HP2hmcrMw2   |         2
HP2hmcrFw2   |         2
HP2prbfhmMw2   |         1
HP2prbfhmFw2   |         2
HP2prbfhmFw2   |         1
HP2prbfhmFw2   |         2
HP2prbfhmFw2   |         2
HP2prbfhmFw2   |         5

.
.
.
.
. *=================== Chunk 8    Dose => interests and Hobbies relationship
. * washes out for males
. * washes out for females in trimmed model
.
. title  "6. Moderators and Mediators of the Dose = > interests and hobbies Impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****6. Moderators and Mediators of the Dose = > interests and hobbies Impact*****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:35  *****
*******************************************************************************
*******************************************************************************


.
. title4 " Hyp. 1. pt 2 wave 2 Main effects Dose=> Interests and Hobbies impact identification"
-------------
 Hyp. 1. pt 2 wave 2 Main effects Dose=> Interests and Hobbies impact identification
-------------

.
. * Chunk 8 ---Female full Interest and hobbies model
. forvalues j=2/2 {
  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 w2bf 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 radhlw2 if gender==2, coef nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:35  *****
*******************************************************************************
*******************************************************************************


Model for gender==1 and wave == 2

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

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

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

Logistic regression                               Number of obs   =        343
                                                  LR chi2(50)     =     122.71
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.17277                       Pseudo R2       =     0.3684

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0823123    .0222811      3.69    0.000      .0386422     .1259824
    _Ieduc_2 |   -11.49207    1090.325     -0.01    0.992     -2148.489     2125.505
    _Ieduc_3 |   -10.49189    1090.324     -0.01    0.992     -2147.489     2126.505
    _Ieduc_4 |   -9.521531    1090.325     -0.01    0.993     -2146.519     2127.476
    _Ieduc_5 |   -10.03097    1090.325     -0.01    0.993     -2147.028     2126.966
    _Ieduc_6 |   -10.65519    1090.325     -0.01    0.992     -2147.652     2126.342
    _Ieduc_7 |   -10.56771     1090.33     -0.01    0.992     -2147.575      2126.44
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.444251    1.786645     -0.81    0.419      -4.94601     2.057508
      occ2w2 |    -1.72162     1.86422     -0.92    0.356     -5.375425     1.932185
      occ3w2 |   -.6960307    1.813742     -0.38    0.701       -4.2509     2.858838
      occ4w2 |   -1.340236    1.971898     -0.68    0.497     -5.205085     2.524613
      occ5w2 |   -1.866674    2.177453     -0.86    0.391     -6.134403     2.401055
      occ6w2 |   -.6630026    2.009767     -0.33    0.741     -4.602073     3.276067
      occ7w2 |   -.3132082    1.768051     -0.18    0.859     -3.778525     3.152109
      occ8w2 |   -.4424864    1.980995     -0.22    0.823     -4.325166     3.440193
     marrw21 |    1.198754    1.252366      0.96    0.338     -1.255838     3.653346
     marrw22 |    -.723147     1.45696     -0.50    0.620     -3.578736     2.132442
     marrw23 |   -.1412732    .8614541     -0.16    0.870     -1.829692     1.547146
     marrw25 |     .030411    1.273943      0.02    0.981     -2.466472     2.527294
     marrw26 |           0   (omitted)
      inc1w2 |    .7639278    1.820866      0.42    0.675     -2.804904      4.33276
      inc2w2 |    1.088119    1.754837      0.62    0.535     -2.351299     4.527537
      inc3w2 |    .8549853    1.806256      0.47    0.636     -2.685212     4.395182
      inc4w2 |    2.107171    2.102907      1.00    0.316     -2.014451     6.228794
     radhlw2 |    .0162662    .0092193      1.76    0.078     -.0018033     .0343356
      havmil |    .0028568    .0035632      0.80    0.423      -.004127     .0098406
avgcumdosew2 |    .1191237    .1112746      1.07    0.284     -.0989705     .3372179
         bf1 |   -.0579291    .0444461     -1.30    0.192     -.1450419     .0291837
         bf4 |   -.5134212    .2911522     -1.76    0.078     -1.084069     .0572265
         bf2 |    .0000225    .0001357      0.17    0.868     -.0002436     .0002885
        bf4m |    .3813738    .2769085      1.38    0.168     -.1613568     .9241045
        bf5m |   -.0013491    .0018728     -0.72    0.471     -.0050196     .0023214
        bf7m |   -.0007653    .0006452     -1.19    0.236     -.0020299     .0004993
         bf8 |    .0000124    .0000428      0.29    0.772     -.0000716     .0000964
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0409398    .0388667      1.05    0.292     -.0352376     .1171172
        bf22 |    .0000496    .0001446      0.34    0.732     -.0002338     .0003329
        bf29 |    .0000147    .0000386      0.38    0.704      -.000061     .0000904
        bf30 |    .0005975    .0003487      1.71    0.087     -.0000859     .0012809
        bf40 |    -.092913    .1571517     -0.59    0.554     -.4009247     .2150987
       deaw2 |    .1650922    .2350487      0.70    0.482     -.2955947     .6257792
      dvcew2 |     -.44027    1.751166     -0.25    0.801     -3.872493     2.991953
      sepaw2 |           0   (omitted)
      accdw2 |    .3072193    .6191348      0.50    0.620     -.9062626     1.520701
      movew2 |   -.4208456    .8150343     -0.52    0.606     -2.018283     1.176592
       illw2 |     .146668    .2184808      0.67    0.502     -.2815466     .5748825
     shfamw2 |    .0028218    .0077742      0.36    0.717     -.0124154      .018059
      shhlw2 |    .0082475    .0076919      1.07    0.284     -.0068283     .0233233
     shjobw2 |   -.0093426    .0067931     -1.38    0.169     -.0226569     .0039716
    shrelaw2 |   -.0142034    .0081278     -1.75    0.081     -.0301336     .0017268
     suprtw2 |   -.0099735    .0060387     -1.65    0.099      -.021809     .0018621
     suchrw2 |   -.0045113    .0068989     -0.65    0.513     -.0180329     .0090102
    havmilsq |   -2.60e-06    4.34e-06     -0.60    0.550     -.0000111     5.92e-06
     radhlw2 |           0   (omitted)
       _cons |    2.140849     1090.33      0.00    0.998     -2134.867     2139.148
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        32            12  |         44
     -     |        33           266  |        299
-----------+--------------------------+-----------
   Total   |        65           278  |        343

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   49.23%
Specificity                     Pr( -|~D)   95.68%
Positive predictive value       Pr( D| +)   72.73%
Negative predictive value       Pr(~D| -)   88.96%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.32%
False - rate for true D         Pr( -| D)   50.77%
False + rate for classified +   Pr(~D| +)   27.27%
False - rate for classified -   Pr( D| -)   11.04%
--------------------------------------------------
Correctly classified                        86.88%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       343
 number of covariate patterns =       343
            Pearson chi2(292) =       307.38
                  Prob > chi2 =         0.2568

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -166.528     Log-Lik Full Model:         -105.173
D(286):                      210.346     LR(50):                      122.710
                                         Prob > LR:                     0.000
McFadden's R2:                 0.368     McFadden's Adj R2:             0.026
Maximum Likelihood R2:         0.301     Cragg & Uhler's R2:            0.484
McKelvey and Zavoina's R2:     0.627     Efron's R2:                    0.388
Variance of y*:                8.828     Variance of error:             3.290
Count R2:                      0.869     Adj Count R2:                  0.308
AIC:                           0.946     AIC*n:                       324.346
BIC:                       -1459.245     BIC':                        169.177
Full main model for HP2inthob for wave= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:37  *****
*******************************************************************************
*******************************************************************************


Model for gender==2 and wave == 2

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

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

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

Logistic regression                               Number of obs   =        343
                                                  LR chi2(50)     =     122.71
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.17277                       Pseudo R2       =     0.3684

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0823123    .0222811      3.69    0.000      .0386422     .1259824
    _Ieduc_2 |   -11.49207    1090.325     -0.01    0.992     -2148.489     2125.505
    _Ieduc_3 |   -10.49189    1090.324     -0.01    0.992     -2147.489     2126.505
    _Ieduc_4 |   -9.521531    1090.325     -0.01    0.993     -2146.519     2127.476
    _Ieduc_5 |   -10.03097    1090.325     -0.01    0.993     -2147.028     2126.966
    _Ieduc_6 |   -10.65519    1090.325     -0.01    0.992     -2147.652     2126.342
    _Ieduc_7 |   -10.56771     1090.33     -0.01    0.992     -2147.575      2126.44
    _Ieduc_8 |           0   (omitted)
      occ1w2 |   -1.444251    1.786645     -0.81    0.419      -4.94601     2.057508
      occ2w2 |    -1.72162     1.86422     -0.92    0.356     -5.375425     1.932185
      occ3w2 |   -.6960307    1.813742     -0.38    0.701       -4.2509     2.858838
      occ4w2 |   -1.340236    1.971898     -0.68    0.497     -5.205085     2.524613
      occ5w2 |   -1.866674    2.177453     -0.86    0.391     -6.134403     2.401055
      occ6w2 |   -.6630026    2.009767     -0.33    0.741     -4.602073     3.276067
      occ7w2 |   -.3132082    1.768051     -0.18    0.859     -3.778525     3.152109
      occ8w2 |   -.4424864    1.980995     -0.22    0.823     -4.325166     3.440193
     marrw21 |    1.198754    1.252366      0.96    0.338     -1.255838     3.653346
     marrw22 |    -.723147     1.45696     -0.50    0.620     -3.578736     2.132442
     marrw23 |   -.1412732    .8614541     -0.16    0.870     -1.829692     1.547146
     marrw25 |     .030411    1.273943      0.02    0.981     -2.466472     2.527294
     marrw26 |           0   (omitted)
      inc1w2 |    .7639278    1.820866      0.42    0.675     -2.804904      4.33276
      inc2w2 |    1.088119    1.754837      0.62    0.535     -2.351299     4.527537
      inc3w2 |    .8549853    1.806256      0.47    0.636     -2.685212     4.395182
      inc4w2 |    2.107171    2.102907      1.00    0.316     -2.014451     6.228794
     radhlw2 |    .0162662    .0092193      1.76    0.078     -.0018033     .0343356
      havmil |    .0028568    .0035632      0.80    0.423      -.004127     .0098406
avgcumdosew2 |    .1191237    .1112746      1.07    0.284     -.0989705     .3372179
         bf1 |   -.0579291    .0444461     -1.30    0.192     -.1450419     .0291837
         bf4 |   -.5134212    .2911522     -1.76    0.078     -1.084069     .0572265
         bf2 |    .0000225    .0001357      0.17    0.868     -.0002436     .0002885
        bf4m |    .3813738    .2769085      1.38    0.168     -.1613568     .9241045
        bf5m |   -.0013491    .0018728     -0.72    0.471     -.0050196     .0023214
        bf7m |   -.0007653    .0006452     -1.19    0.236     -.0020299     .0004993
         bf8 |    .0000124    .0000428      0.29    0.772     -.0000716     .0000964
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0409398    .0388667      1.05    0.292     -.0352376     .1171172
        bf22 |    .0000496    .0001446      0.34    0.732     -.0002338     .0003329
        bf29 |    .0000147    .0000386      0.38    0.704      -.000061     .0000904
        bf30 |    .0005975    .0003487      1.71    0.087     -.0000859     .0012809
        bf40 |    -.092913    .1571517     -0.59    0.554     -.4009247     .2150987
       deaw2 |    .1650922    .2350487      0.70    0.482     -.2955947     .6257792
      dvcew2 |     -.44027    1.751166     -0.25    0.801     -3.872493     2.991953
      sepaw2 |           0   (omitted)
      accdw2 |    .3072193    .6191348      0.50    0.620     -.9062626     1.520701
      movew2 |   -.4208456    .8150343     -0.52    0.606     -2.018283     1.176592
       illw2 |     .146668    .2184808      0.67    0.502     -.2815466     .5748825
     shfamw2 |    .0028218    .0077742      0.36    0.717     -.0124154      .018059
      shhlw2 |    .0082475    .0076919      1.07    0.284     -.0068283     .0233233
     shjobw2 |   -.0093426    .0067931     -1.38    0.169     -.0226569     .0039716
    shrelaw2 |   -.0142034    .0081278     -1.75    0.081     -.0301336     .0017268
     suprtw2 |   -.0099735    .0060387     -1.65    0.099      -.021809     .0018621
     suchrw2 |   -.0045113    .0068989     -0.65    0.513     -.0180329     .0090102
    havmilsq |   -2.60e-06    4.34e-06     -0.60    0.550     -.0000111     5.92e-06
     radhlw2 |           0   (omitted)
       _cons |    2.140849     1090.33      0.00    0.998     -2134.867     2139.148
-------------+----------------------------------------------------------------


Note: 1 failure and 0 successes completely determined.


Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        32            12  |         44
     -     |        33           266  |        299
-----------+--------------------------+-----------
   Total   |        65           278  |        343

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   49.23%
Specificity                     Pr( -|~D)   95.68%
Positive predictive value       Pr( D| +)   72.73%
Negative predictive value       Pr(~D| -)   88.96%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    4.32%
False - rate for true D         Pr( -| D)   50.77%
False + rate for classified +   Pr(~D| +)   27.27%
False - rate for classified -   Pr( D| -)   11.04%
--------------------------------------------------
Correctly classified                        86.88%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       343
 number of covariate patterns =       343
            Pearson chi2(292) =       307.38
                  Prob > chi2 =         0.2568

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -166.528     Log-Lik Full Model:         -105.173
D(286):                      210.346     LR(50):                      122.710
                                         Prob > LR:                     0.000
McFadden's R2:                 0.368     McFadden's Adj R2:             0.026
Maximum Likelihood R2:         0.301     Cragg & Uhler's R2:            0.484
McKelvey and Zavoina's R2:     0.627     Efron's R2:                    0.388
Variance of y*:                8.828     Variance of error:             3.290
Count R2:                      0.869     Adj Count R2:                  0.308
AIC:                           0.946     AIC*n:                       324.346
BIC:                       -1459.245     BIC':                        169.177

.
. * Chunk 8 ---Female trimmed Interest and hobbies model
. forvalues j=2/2 {
  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=2/2 {
  6. local w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  7.
. di as input "trimmed 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.      logit `var' age   ///
>                  avgcumdosew`j' bf4 bf30  ///
>                  shrelaw`j' suprtw`j'  ///
>                 radhlw2 if gender==2,  difficult iterate(50)  nolog
 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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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)


trimmed main model for HP2inthob for wave= 2

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


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****  Full Nottingham Part 2 subscale models for male and then females   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:39  *****
*******************************************************************************
*******************************************************************************


Model for gender==2 and wave == 2


Logistic regression                               Number of obs   =        363
                                                  LR chi2(7)      =     101.28
                                                  Prob > chi2     =     0.0000
Log likelihood = -121.47255                       Pseudo R2       =     0.2942

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0729699     .016233      4.50    0.000      .0411537      .104786
avgcumdosew2 |    .0713471    .0870475      0.82    0.412     -.0992629     .2419571
         bf4 |     -.12277    .0348875     -3.52    0.000     -.1911482    -.0543918
        bf30 |    .0005237    .0002568      2.04    0.041      .0000204      .001027
    shrelaw2 |   -.0121549    .0056037     -2.17    0.030     -.0231379     -.001172
     suprtw2 |   -.0103307    .0040941     -2.52    0.012      -.018355    -.0023065
     radhlw2 |    .0119091    .0056652      2.10    0.036      .0008055     .0230128
       _cons |   -4.716583    1.190104     -3.96    0.000     -7.049144    -2.384021
-------------+----------------------------------------------------------------

.
.
.
. // female interests and hobbies wash out
.
.
. *-------------------------------------------------------------------------
.
.
.
.
.
.
.
.
.  label var radhlw2 "Self-perceived Chornobyl health threat in wave 2"

.
. 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 2 Main effects Dose=> Interests and Hobbies impact identification"
wave 2 Main effects Dose=> Interests and Hobbies impact identification

. forvalues j=2/2 {
  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 w2bf 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 shfamw2 radhlw2 bf4m
 13.       xi: logistic `var' age radhlw2 avgcumdosew2 shfamw2  ///
>                    bf5m if gender==1, coef nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

chunk 8 H1 test:Gender= male  model Wave =  2 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****              Full Nottingham Part 2 subscale models                 *****
*****                          males on  wave=2                           *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:40  *****
*******************************************************************************
*******************************************************************************


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


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


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


radhlw2           double   %8.0g                        Self-perceived Chornobyl health threat in wave 2


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


Logistic regression                               Number of obs   =        339
                                                  LR chi2(5)      =      55.04
                                                  Prob > chi2     =     0.0000
Log likelihood = -91.424671                       Pseudo R2       =     0.2314

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0431333    .0167168      2.58    0.010       .010369     .0758976
     radhlw2 |    .0348063    .0070847      4.91    0.000      .0209205      .048692
avgcumdosew2 |   -.1062023    .1574615     -0.67    0.500     -.4148212     .2024166
     shfamw2 |    .0030601    .0048986      0.62    0.532      -.006541     .0126612
        bf5m |   -.0015801    .0010798     -1.46    0.143     -.0036965     .0005363
       _cons |   -6.400487    1.022095     -6.26    0.000     -8.403758    -4.397217
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |         8             4  |         12
     -     |        30           297  |        327
-----------+--------------------------+-----------
   Total   |        38           301  |        339

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   21.05%
Specificity                     Pr( -|~D)   98.67%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   90.83%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.33%
False - rate for true D         Pr( -| D)   78.95%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)    9.17%
--------------------------------------------------
Correctly classified                        89.97%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       339
 number of covariate patterns =       327
            Pearson chi2(321) =       372.91
                  Prob > chi2 =         0.0242

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -118.946     Log-Lik Full Model:          -91.425
D(333):                      182.849     LR(5):                        55.042
                                         Prob > LR:                     0.000
McFadden's R2:                 0.231     McFadden's Adj R2:             0.181
Maximum Likelihood R2:         0.150     Cragg & Uhler's R2:            0.297
McKelvey and Zavoina's R2:     0.397     Efron's R2:                    0.214
Variance of y*:                5.454     Variance of error:             3.290
Count R2:                      0.900     Adj Count R2:                  0.105
AIC:                           0.575     AIC*n:                       194.849
BIC:                       -1757.209     BIC':                        -25.912

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*avgcumdosew2

.
.
.
. title3 "wave 2 Main effects Dose=> Interests and Hobbies impact identification"
-------------
title3 : wave 2 Main effects Dose=> Interests and Hobbies impact identification
 1 Jul 2012
15:05:41
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
Data file  chwide1jul2012.dta  currrently has  2399  variables and  703  observations

. forvalues j=2/2 {
  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 w2bf 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 nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

chunk 8 H1 test:Gender= male  model Wave =  2 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****     Full Nottingham Part 2 subscale models for males in wave=2      *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:41  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        339
                                                  LR chi2(7)      =      61.20
                                                  Prob > chi2     =     0.0000
Log likelihood = -88.347465                       Pseudo R2       =     0.2572

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .030943    .0178289      1.74    0.083     -.0040009      .065887
     radhlw2 |    .0256859    .0076857      3.34    0.001      .0106222     .0407496
avgcumdosew2 |   -.0706233     .347896     -0.20    0.839      -.752487     .6112404
     shfamw2 |    .0004942    .0051095      0.10    0.923     -.0095202     .0105087
        bf4m |   -.0869807    .0356099     -2.44    0.015     -.1567749    -.0171866
        bf5m |   -.0007397    .0014331     -0.52    0.606     -.0035486     .0020692
     bf5mXd3 |   -.0000719    .0008404     -0.09    0.932     -.0017191     .0015753
       _cons |    -3.59705    1.521825     -2.36    0.018     -6.579772    -.6143281
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        10             5  |         15
     -     |        28           296  |        324
-----------+--------------------------+-----------
   Total   |        38           301  |        339

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   26.32%
Specificity                     Pr( -|~D)   98.34%
Positive predictive value       Pr( D| +)   66.67%
Negative predictive value       Pr(~D| -)   91.36%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.66%
False - rate for true D         Pr( -| D)   73.68%
False + rate for classified +   Pr(~D| +)   33.33%
False - rate for classified -   Pr( D| -)    8.64%
--------------------------------------------------
Correctly classified                        90.27%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       339
 number of covariate patterns =       334
            Pearson chi2(326) =       295.89
                  Prob > chi2 =         0.8832

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -118.946     Log-Lik Full Model:          -88.347
D(331):                      176.695     LR(7):                        61.196
                                         Prob > LR:                     0.000
McFadden's R2:                 0.257     McFadden's Adj R2:             0.190
Maximum Likelihood R2:         0.165     Cragg & Uhler's R2:            0.328
McKelvey and Zavoina's R2:     0.374     Efron's R2:                    0.224
Variance of y*:                5.258     Variance of error:             3.290
Count R2:                      0.903     Adj Count R2:                  0.132
AIC:                           0.568     AIC*n:                       192.695
BIC:                       -1751.711     BIC':                        -20.414

. scalar SigDoseInthbMw2 = "no"

. scalar MainEffInthbMw2 = "age radhlw2 shfamw2"

. scalar InthbMw2 = "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   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:43  *****
*******************************************************************************
*******************************************************************************


.
.
. forvalues j=2/2 {
  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 w2bf 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 nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

chunk 8 H1 test:Gender= male  model Wave =  2 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****        Full Nottingham Part 2 subscale models for females           *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:43  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        363
                                                  LR chi2(4)      =      85.23
                                                  Prob > chi2     =     0.0000
Log likelihood = -129.49784                       Pseudo R2       =     0.2476

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0747628    .0160244      4.67    0.000      .0433556       .10617
     radhlw2 |    .0174604    .0053569      3.26    0.001      .0069611     .0279597
avgcumdosew2 |    .0556287    .0871446      0.64    0.523     -.1151717      .226429
         bf4 |   -.0957645    .0312145     -3.07    0.002     -.1569439    -.0345852
       _cons |   -5.962105     1.09169     -5.46    0.000     -8.101778    -3.822431
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        27             8  |         35
     -     |        39           289  |        328
-----------+--------------------------+-----------
   Total   |        66           297  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   40.91%
Specificity                     Pr( -|~D)   97.31%
Positive predictive value       Pr( D| +)   77.14%
Negative predictive value       Pr(~D| -)   88.11%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.69%
False - rate for true D         Pr( -| D)   59.09%
False + rate for classified +   Pr(~D| +)   22.86%
False - rate for classified -   Pr( D| -)   11.89%
--------------------------------------------------
Correctly classified                        87.05%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       361
            Pearson chi2(356) =       453.01
                  Prob > chi2 =         0.0004

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -172.113     Log-Lik Full Model:         -129.498
D(358):                      258.996     LR(4):                        85.229
                                         Prob > LR:                     0.000
McFadden's R2:                 0.248     McFadden's Adj R2:             0.219
Maximum Likelihood R2:         0.209     Cragg & Uhler's R2:            0.342
McKelvey and Zavoina's R2:     0.407     Efron's R2:                    0.292
Variance of y*:                5.547     Variance of error:             3.290
Count R2:                      0.871     Adj Count R2:                  0.288
AIC:                           0.741     AIC*n:                       268.996
BIC:                       -1851.201     BIC':                        -61.652

. scalar SigdoseInthbFw2 = "no"

. scalar MainEffInthbFw2 = "age radhlw2 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   *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:44  *****
*******************************************************************************
*******************************************************************************


.
.
. forvalues j=2/2 {
  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 w2bf 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 radhlw2Xd3 ///
>                  if gender==2, coef nolog  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


marrw21           byte     %8.0g                        marrw2==1. single


marrw22           byte     %8.0g                        marrw2==2. cohabitating


marrw23           byte     %8.0g                        marrw2==3. married


marrw24           byte     %8.0g                        marrw2==4. separated


marrw25           byte     %8.0g                        marrw2==5. divorced


marrw26           byte     %8.0g                        marrw2==6. widowed


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


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


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


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


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= 2

chunk 8 H1 test:Gender= male  model Wave =  2 for HP2inthob


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   Full Nottingham Part 2 subscale models for females in wave=2      *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:05:44  *****
*******************************************************************************
*******************************************************************************


Logistic regression                               Number of obs   =        363
                                                  LR chi2(7)      =      88.01
                                                  Prob > chi2     =     0.0000
Log likelihood = -128.11005                       Pseudo R2       =     0.2557

-------------+----------------------------------------------------------------
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0684009    .0187006      3.66    0.000      .0317484     .1050534
     radhlw2 |    .0215957    .0064007      3.37    0.001      .0090506     .0341409
avgcumdosew2 |   -.1117068    .8606863     -0.13    0.897     -1.798621     1.575207
         bf4 |   -.0939457    .0393671     -2.39    0.017     -.1711039    -.0167876
      bf4Xd3 |   -.0023725    .0194992     -0.12    0.903     -.0405902     .0358453
      ageXd3 |    .0062659    .0102599      0.61    0.541     -.0138431     .0263749
  radhlw2Xd3 |   -.0033605    .0032954     -1.02    0.308     -.0098193     .0030983
       _cons |    -5.94901    1.257396     -4.73    0.000      -8.41346    -3.484559
-------------+----------------------------------------------------------------

Logistic model for HP2inthob

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        28             8  |         36
     -     |        38           289  |        327
-----------+--------------------------+-----------
   Total   |        66           297  |        363

Classified + if predicted Pr(D) >= .5
True D defined as HP2inthob != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   42.42%
Specificity                     Pr( -|~D)   97.31%
Positive predictive value       Pr( D| +)   77.78%
Negative predictive value       Pr(~D| -)   88.38%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    2.69%
False - rate for true D         Pr( -| D)   57.58%
False + rate for classified +   Pr(~D| +)   22.22%
False - rate for classified -   Pr( D| -)   11.62%
--------------------------------------------------
Correctly classified                        87.33%
--------------------------------------------------


Logistic model for HP2inthob, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       361
            Pearson chi2(353) =       461.18
                  Prob > chi2 =         0.0001

Measures of Fit for logistic of HP2inthob

Log-Lik Intercept Only:     -172.113     Log-Lik Full Model:         -128.110
D(355):                      256.220     LR(7):                        88.005
                                         Prob > LR:                     0.000
McFadden's R2:                 0.256     McFadden's Adj R2:             0.209
Maximum Likelihood R2:         0.215     Cragg & Uhler's R2:            0.351
McKelvey and Zavoina's R2:     0.418     Efron's R2:                    0.305
Variance of y*:                5.654     Variance of error:             3.290
Count R2:                      0.873     Adj Count R2:                  0.303
AIC:                           0.750     AIC*n:                       272.220
BIC:                       -1836.293     BIC':                        -46.744

. scalar InthbModFw2 = "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 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6004

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

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

                                                   AIC             =  7.838826
Log likelihood   =   -1330.6004                    BIC             =  47947.46

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5832314    .2635871      2.21    0.027      .0666101     1.099853
       _cons |    48.62133    .7061562     68.85    0.000      47.23729     50.00537
-------------+----------------------------------------------------------------

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

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


illw2             double   %8.0g                        Total number of illnesses experienced in time period 1987-1996


. glm illw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -303.59609

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

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

                                                   AIC             =  1.797624
Log likelihood   = -303.5960853                    BIC             = -1851.445

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .0085423    .0128556      0.66    0.506     -.0166543     .0337389
       _cons |    .2741359    .0344406      7.96    0.000      .2066336     .3416382
-------------+----------------------------------------------------------------

. glm HP2inthob illw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  237.2651
Iteration 2:   deviance =  236.0196
Iteration 3:   deviance =  236.0142
Iteration 4:   deviance =  236.0142
Iteration 5:   deviance =  236.0142

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  236.0141663                    (1/df) Deviance =  .6982668
Pearson          =    338.89241                    (1/df) Pearson  =   1.00264

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

                                                   BIC             = -1734.169

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .2044103     .113873      1.80    0.073     -.0187766     .4275973
       _cons |   -1.284117    .0852302    -15.07    0.000     -1.451165    -1.117069
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw2

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


radhlw2           double   %8.0g                        Self-perceived Chornobyl health threat in wave 2


. glm radhlw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1693.4076

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

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

                                                   AIC             =  9.972986
Log likelihood   = -1693.407647                    BIC             =  419831.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.220373     .766216      1.59    0.111     -.2813831     2.722128
       _cons |    45.63198    2.052711     22.23    0.000      41.60874     49.65522
-------------+----------------------------------------------------------------

. glm HP2inthob radhlw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  207.4869
Iteration 2:   deviance =  195.0786
Iteration 3:   deviance =  193.7239
Iteration 4:   deviance =  193.6942
Iteration 5:   deviance =  193.6942
Iteration 6:   deviance =  193.6942

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =   193.694234                    (1/df) Deviance =  .5730599
Pearson          =  330.3909814                    (1/df) Pearson  =  .9774881

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

                                                   BIC             = -1776.489

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0187765    .0024049      7.81    0.000       .014063       .02349
       _cons |   -2.360804    .1846104    -12.79    0.000     -2.722634    -1.998974
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
.
. des shfamw2

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


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


. glm shfamw2  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1704.8947

Generalized linear models                          No. of obs      =       339
Optimization     : ML                              Residual df     =       337
                                                   Scale parameter =  1375.284
Deviance         =   463470.769                    (1/df) Deviance =  1375.284
Pearson          =   463470.769                    (1/df) Pearson  =  1375.284

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

                                                   AIC             =  10.07017
Log likelihood   = -1704.894657                    BIC             =  461507.4

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.7484378    .8043765     -0.93    0.352     -2.324987     .8281112
       _cons |    34.76184     2.15791     16.11    0.000      30.53241     38.99127
-------------+----------------------------------------------------------------

. glm HP2inthob shfamw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  236.0134
Iteration 2:   deviance =   234.459
Iteration 3:   deviance =  234.4495
Iteration 4:   deviance =  234.4495

Generalized linear models                          No. of obs      =       339
Optimization     : MQL Fisher scoring              Residual df     =       337
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  234.4495475                    (1/df) Deviance =   .695696
Pearson          =  340.0883436                    (1/df) Pearson  =  1.009164

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

                                                   BIC             = -1728.912

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw2 |    .0043459    .0019602      2.22    0.027      .0005039     .0081879
       _cons |   -1.379269    .1084635    -12.72    0.000     -1.591853    -1.166684
-------------+----------------------------------------------------------------
(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  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -2273.2523

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

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

                                                   AIC             =  13.38384
Log likelihood   = -2273.252279                    BIC             =  1.28e+07

-------------+----------------------------------------------------------------
             |                 OIM
         bf5m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    9.243905    4.217043      2.19    0.028      .9786526     17.50916
       _cons |    104.6228    11.29756      9.26    0.000      82.47996     126.7656
-------------+----------------------------------------------------------------

. 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 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1225

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

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

                                                   AIC             =  6.053662
Log likelihood   = -1027.122509                    BIC             =  6404.476

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0331637    .1079644     -0.31    0.759     -.2447701     .1784427
       _cons |    12.52896    .2892393     43.32    0.000      11.96206     13.09586
-------------+----------------------------------------------------------------

. 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 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1406.9403

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

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

                                                   AIC             =  7.762756
Log likelihood   = -1406.940271                    BIC             =  47299.65

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.502324    .4454009      3.37    0.001      .6293547     2.375294
       _cons |    48.86944    .7323225     66.73    0.000      47.43412     50.30477
-------------+----------------------------------------------------------------

. 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  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1109.0983

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

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

                                                   AIC             =  6.121754
Log likelihood   = -1109.098281                    BIC             =  7450.466

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.595012    .1960703     -3.03    0.002     -.9793027    -.2107212
       _cons |    11.02048    .3223763     34.19    0.000      10.38863     11.65232
-------------+----------------------------------------------------------------

. 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  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1140.8259

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

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

                                                   AIC             =  6.296561
Log likelihood   = -1140.825904                    BIC             =  9280.095

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.599311    .2139789     -2.80    0.005     -1.018702    -.1799202
       _cons |    18.83424    .3518214     53.53    0.000      18.14469      19.5238
-------------+----------------------------------------------------------------

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

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


shfamw2           double   %8.0g                        Percentage of strains and hassles related to family in 1996


. glm shfamw2  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1704.8947

Generalized linear models                          No. of obs      =       339
Optimization     : ML                              Residual df     =       337
                                                   Scale parameter =  1375.284
Deviance         =   463470.769                    (1/df) Deviance =  1375.284
Pearson          =   463470.769                    (1/df) Pearson  =  1375.284

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

                                                   AIC             =  10.07017
Log likelihood   = -1704.894657                    BIC             =  461507.4

-------------+----------------------------------------------------------------
             |                 OIM
      shfamw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.7484378    .8043765     -0.93    0.352     -2.324987     .8281112
       _cons |    34.76184     2.15791     16.11    0.000      30.53241     38.99127
-------------+----------------------------------------------------------------

. glm HP2sxlife shfamw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  338.2157
Iteration 2:   deviance =  338.0066
Iteration 3:   deviance =  338.0065
Iteration 4:   deviance =  338.0065

Generalized linear models                          No. of obs      =       339
Optimization     : MQL Fisher scoring              Residual df     =       337
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  338.0064771                    (1/df) Deviance =  1.002987
Pearson          =  339.3157137                    (1/df) Pearson  =  1.006872

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

                                                   BIC             = -1625.356

-------------+----------------------------------------------------------------
             |                 EIM
    HP2sxlife |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     shfamw2 |    .0027669    .0020626      1.34    0.180     -.0012757     .0068096
       _cons |   -.9380005    .1081399     -8.67    0.000     -1.149951    -.7260503
-------------+----------------------------------------------------------------
(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  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1027.1225

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

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

                                                   AIC             =  6.053662
Log likelihood   = -1027.122509                    BIC             =  6404.476

-------------+----------------------------------------------------------------
             |                 OIM
          bf4 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |   -.0331637    .1079644     -0.31    0.759     -.2447701     .1784427
       _cons |    12.52896    .2892393     43.32    0.000      11.96206     13.09586
-------------+----------------------------------------------------------------

. 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 // 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 ints and hobbies
. glm bf4m  avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1140.8259

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

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

                                                   AIC             =  6.296561
Log likelihood   = -1140.825904                    BIC             =  9280.095

-------------+----------------------------------------------------------------
             |                 OIM
         bf4m |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    -.599311    .2139789     -2.80    0.005     -1.018702    -.1799202
       _cons |    18.83424    .3518214     53.53    0.000      18.14469      19.5238
-------------+----------------------------------------------------------------

. glm HP2inthob bf4m  if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  310.9241
Iteration 2:   deviance =  308.9696
Iteration 3:   deviance =  308.9479
Iteration 4:   deviance =  308.9478
Iteration 5:   deviance =  308.9478

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  308.9478254                    (1/df) Deviance =  .8558112
Pearson          =  336.1855337                    (1/df) Pearson  =  .9312619

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

                                                   BIC             = -1818.932

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        bf4m |   -.0801416    .0127284     -6.30    0.000     -.1050887    -.0551944
       _cons |    .4618823    .2255505      2.05    0.041      .0198113     .9039532
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des age  // age is a possilbe mediating effect for interest and hobbies

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


age               double   %8.0g                    *   Respondent's age


. glm age  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6004

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

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

                                                   AIC             =  7.838826
Log likelihood   =   -1330.6004                    BIC             =  47947.46

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5832314    .2635871      2.21    0.027      .0666101     1.099853
       _cons |    48.62133    .7061562     68.85    0.000      47.23729     50.00537
-------------+----------------------------------------------------------------

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

Iteration 1:   deviance =  224.8585
Iteration 2:   deviance =  219.8355
Iteration 3:   deviance =  219.6997
Iteration 4:   deviance =  219.6996
Iteration 5:   deviance =  219.6996

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  219.6996277                    (1/df) Deviance =  .6499989
Pearson          =  354.7105724                    (1/df) Pearson  =   1.04944

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

                                                   BIC             = -1750.484

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .031726    .0062563      5.07    0.000      .0194638     .0439882
       _cons |   -2.867608     .344284     -8.33    0.000     -3.542392    -2.192824
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des illw2

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


illw2             double   %8.0g                        Total number of illnesses experienced in time period 1987-1996


. glm illw2  avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -303.59609

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

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

                                                   AIC             =  1.797624
Log likelihood   = -303.5960853                    BIC             = -1851.445

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .0085423    .0128556      0.66    0.506     -.0166543     .0337389
       _cons |    .2741359    .0344406      7.96    0.000      .2066336     .3416382
-------------+----------------------------------------------------------------

. glm HP2inthob illw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  237.2651
Iteration 2:   deviance =  236.0196
Iteration 3:   deviance =  236.0142
Iteration 4:   deviance =  236.0142
Iteration 5:   deviance =  236.0142

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  236.0141663                    (1/df) Deviance =  .6982668
Pearson          =    338.89241                    (1/df) Pearson  =   1.00264

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

                                                   BIC             = -1734.169

-------------+----------------------------------------------------------------
             |                 EIM
    HP2inthob |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .2044103     .113873      1.80    0.073     -.0187766     .4275973
       _cons |   -1.284117    .0852302    -15.07    0.000     -1.451165    -1.117069
-------------+----------------------------------------------------------------
(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 sxLifeMedMw2 = "age illw2"

. scalar sxLifeMedFw2 = "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 HP2inthbMw2 = J(1,8, 0)

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

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

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

.     matrix define HP2inthbMw2 = (1, 2, 3, 1, 0, 3, 0, 2 )

.         matrix define HP2inthbFw2 = (1, 2, 3, 2, 0, 3, 0, 3 )

.         matrix rowname HP2inthbMw2 = HP2inthbM

.         matrix rowname HP2inthbFw2 = HP2inthobF

.         matlist HP2inthbMw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2inthbM   |         1            2            3            1            0            3            0

   | c8
-------------+-----------
HP2inthbM   |         2

.         matlist HP2inthbFw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2inthobF   |         1            2            3            2            0            3            0

   | c8
-------------+-----------
HP2inthobF   |         3

.         matrix define H1pt2w2 = ( HP2wkMw2 \ HP2wkFw2 \ HP2hmcrMw2 \ HP2hmcrFw2 \ HP2spMw2 ///
>             \ HP2spFw2 \ HP2prbfamMw2 \ HP2prbfamFw2 \ HP2inthbMw2 \ HP2inthbFw2 )

.         matlist H1pt2w2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            1            0
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            2            0
HP2spMw2   |         1            2            3            1            0            2            0
HP2spFw2   |         1            2            3            2            1            5            5
HP2prbfamM   |         1            2            3            1            0            5            0
HP2prbfamF   |         1            2            3            2            0            2            2
HP2inthbM   |         1            2            3            1            0            3            0
HP2inthobF   |         1            2            3            2            0            3            0

   | c8
-------------+-----------
r1   |         4
r1   |         6
r1   |         2
r1   |         2
HP2spMw2   |         1
HP2spFw2   |         2
HP2prbfamM   |         1
HP2prbfamF   |         2
HP2inthbM   |         2
HP2inthobF   |         3

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

.     matrix rownames H1pt2w2 =   HP2wkMw2 HP2wkFw2 HP2hmcrMw2 HP2hmcrFw2 HP2spMw2 HP2spFw2 HP2prbfamMw2 HP2prbfamFw2 HP2inthbMw2 HP2inthbFw2

.     matlist H1pt2w2

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig
-------------+-----------------------------------------------------------------------------
HP2wkMw2   |         1            2            3            1            0            4            0
HP2wkFw2   |         1            2            3            2            0            1            0
HP2hmcrMw2   |         1            2            3            1            0            4            0
HP2hmcrFw2   |         1            2            3            2            0            2            0
HP2spMw2   |         1            2            3            1            0            2            0
HP2spFw2   |         1            2            3            2            1            5            5
HP2prbfamMw2   |         1            2            3            1            0            5            0
HP2prbfamFw2   |         1            2            3            2            0            2            2
HP2inthbMw2   |         1            2            3            1            0            3            0
HP2inthbFw2   |         1            2            3            2            0            3            0

   | numMed
-------------+-----------
HP2wkMw2   |         4
HP2wkFw2   |         6
HP2hmcrMw2   |         2
HP2hmcrFw2   |         2
HP2spMw2   |         1
HP2spFw2   |         2
HP2prbfamMw2   |         1
HP2prbfamFw2   |         2
HP2inthbMw2   |         2
HP2inthbFw2   |         3

.
. *xxxxxxxxxxxxxxx  chunk 9  Dose=> vacation plans impactxxxxxxxxxxxxxxxxxxxxxxxxx
. title "7. Hypothesis 1 pt 2 wave 2 dose vacation plans impact"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       7. Hypothesis 1 pt 2 wave 2 dose vacation plans impact        *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:06:27  *****
*******************************************************************************
*******************************************************************************


.
. cap gen hp2vacatn = HP2vacatn

.
. forvalues j=2/2 {
  2. title " wave 2 Dose = >hp2vacatn Female 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 w2bf bf1 bf4 bf2 bf4m bf5m bf7m bf8 bf15m bf17 bf20 bf22 bf29 bf30 bf40
  7. di _skip(3)
  8.
. di as input "Female model wave 2 dose-hp2vactn moderator model "
  9. di _skip(4)
 10. logit 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==2, nolog
 11.  di _skip(4)
 12.  title3 "trimmed hp2hmcare main effects models for H1 no direct dose effect for male"
 13.  pwcorr hp2vacatn age  deaw2 shjobw2 bf7m shjobw2 havmilsq ///
>   radhlw2 avgcumdosew2 if gender==2, sig obs sidak star(.05) listwise
 14. di _skip(1)
 15. di as input "For females trimmed vacation plans model on wave2 and d2 is not signif "
 16. di _skip(1)
 17.   logistic hp2vacatn age  deaw2 shjobw2 bf7m havmil  ///
>   radhlw2 avgcumdosew2 if ///
>    gender==2, coef nolog
 18. }


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****   wave 2 Dose = >hp2vacatn Female main effects models for H1 pt2    *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:06:27  *****
*******************************************************************************
*******************************************************************************


Female model wave 2 dose-hp2vactn moderator model

note: 1.educ != 0 predicts success perfectly
      1.educ dropped and 1 obs not used

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

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

note: 7.educ omitted because of collinearity
note: marrw26 omitted because of collinearity
note: bf17 omitted because of collinearity
note: radhlw2 omitted because of collinearity
note: avgcumdosew2 omitted because of collinearity

Logistic regression                               Number of obs   =        342
                                                  LR chi2(49)     =     109.68
                                                  Prob > chi2     =     0.0000
Log likelihood = -105.52458                       Pseudo R2       =     0.3420

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0854768    .0223995      3.82    0.000      .0415747      .129379
             |
        educ |
          1  |           0   (empty)
          2  |   -.1593387    2.114879     -0.08    0.940     -4.304426     3.985748
          3  |    .0597641    2.056969      0.03    0.977     -3.971821     4.091349
          4  |    1.938135    2.166629      0.89    0.371     -2.308379     6.184649
          5  |    .5746086    2.110158      0.27    0.785     -3.561224     4.710442
          6  |     .514209    2.047201      0.25    0.802     -3.498231     4.526649
          7  |           0   (omitted)
             |
      occ1w2 |   -1.136832      2.2792     -0.50    0.618     -5.603982     3.330319
      occ2w2 |   -.2856505    2.305307     -0.12    0.901     -4.803969     4.232668
      occ3w2 |   -.2169427    2.294811     -0.09    0.925     -4.714689     4.280804
      occ4w2 |    -.683475    2.371054     -0.29    0.773     -5.330655     3.963705
      occ5w2 |   -1.371472    2.630882     -0.52    0.602     -6.527906     3.784962
      occ6w2 |    .0514752    2.451671      0.02    0.983     -4.753711     4.856661
      occ7w2 |   -.1816542    2.247999     -0.08    0.936     -4.587651     4.224342
      occ8w2 |    .8447307    2.549827      0.33    0.740     -4.152839       5.8423
     marrw21 |   -.3962689    1.357581     -0.29    0.770     -3.057079     2.264541
     marrw22 |   -.7029234    1.344493     -0.52    0.601     -3.338081     1.932234
     marrw23 |   -.2946087    .8362371     -0.35    0.725     -1.933603     1.344386
     marrw25 |   -.3847095    1.312384     -0.29    0.769     -2.956935     2.187516
     marrw26 |           0   (omitted)
      inc1w2 |   -.1652011    2.308319     -0.07    0.943     -4.689424     4.359021
      inc2w2 |    .5715606    2.259621      0.25    0.800     -3.857216     5.000337
      inc3w2 |    .4239638    2.273454      0.19    0.852     -4.031925     4.879853
      inc4w2 |   -.1023039     2.63108     -0.04    0.969     -5.259126     5.054518
     radhlw2 |    .0311845    .0092957      3.35    0.001      .0129652     .0494037
      havmil |    .0003107    .0031022      0.10    0.920     -.0057695      .006391
avgcumdosew2 |    .0845855    .1349954      0.63    0.531     -.1800007     .3491716
         bf1 |   -.0293284    .0365427     -0.80    0.422     -.1009508      .042294
         bf4 |    -.035894    .2239004     -0.16    0.873     -.4747308     .4029428
         bf2 |    .0000573    .0001382      0.41    0.678     -.0002135     .0003281
        bf4m |   -.0145711    .2099542     -0.07    0.945     -.4260738     .3969316
        bf5m |   -.0005728    .0016599     -0.35    0.730     -.0038262     .0026805
        bf7m |   -.0009478    .0006252     -1.52    0.130     -.0021731     .0002775
         bf8 |   -.0000327    .0000408     -0.80    0.422     -.0001126     .0000472
       bf15m |           0   (omitted)
        bf17 |           0   (omitted)
        bf20 |    .0039952     .030974      0.13    0.897     -.0567128     .0647032
        bf22 |    .0000865    .0001546      0.56    0.576     -.0002165     .0003895
        bf29 |    .0000586    .0000394      1.49    0.137     -.0000187      .000136
        bf30 |   -.0003297    .0003684     -0.89    0.371     -.0010518     .0003924
        bf40 |   -.1986581    .1714089     -1.16    0.246     -.5346134     .1372973
       deaw2 |    .2948255    .2283224      1.29    0.197     -.1526782     .7423292
      dvcew2 |     1.55263    1.538911      1.01    0.313     -1.463579      4.56884
      sepaw2 |           0   (omitted)
      accdw2 |   -.6724545    .7843213     -0.86    0.391     -2.209696     .8647871
      movew2 |   -.2536562    .8260121     -0.31    0.759      -1.87261     1.365298
       illw2 |    .1944001    .2307879      0.84    0.400     -.2579358      .646736
     shfamw2 |     .010723    .0072538      1.48    0.139     -.0034942     .0249402
      shhlw2 |    .0100536    .0078834      1.28    0.202     -.0053977     .0255048
     shjobw2 |   -.0092745    .0068673     -1.35    0.177     -.0227342     .0041852
    shrelaw2 |   -.0224849    .0085804     -2.62    0.009     -.0393023    -.0056675
     suprtw2 |   -.0043936    .0060874     -0.72    0.470     -.0163246     .0075375
     suchrw2 |    .0021145    .0069953      0.30    0.762     -.0115961      .015825
    havmilsq |   -6.40e-07    2.42e-06     -0.26    0.792     -5.39e-06     4.11e-06
     radhlw2 |           0   (omitted)
avgcumdosew2 |           0   (omitted)
       _cons |   -5.212149    3.615206     -1.44    0.149     -12.29782     1.873525
-------------+----------------------------------------------------------------

-------------
title3 : trimmed hp2hmcare main effects models for H1 no direct dose effect for male
 1 Jul 2012
15:06:28
computer  Macintosh (Intel 64-bit)
folder  /Users/robertyaffee/Documents/data/research/chwk/phase3/Htests/H1tests/h1pt2
Data file  chwide1jul2012.dta  currrently has  2399  variables and  703  observations

             | hp2vac~n      age    deaw2  shjobw2     bf7m  shjobw2 havmilsq
-------------+---------------------------------------------------------------
   hp2vacatn |   1.0000
             |
             |      363
             |
         age |   0.3765*  1.0000
             |   0.0000
             |      363      363
             |
       deaw2 |   0.1195   0.1404   1.0000
             |   0.5641   0.2337
             |      363      363      363
             |
     shjobw2 |  -0.0747  -0.0331  -0.0711   1.0000
             |   0.9977   1.0000   0.9991
             |      363      363      363      363
             |
        bf7m |  -0.0670  -0.0780   0.0244  -0.1112   1.0000
             |   0.9997   0.9953   1.0000   0.7134
             |      363      363      363      363      363
             |
     shjobw2 |  -0.0747  -0.0331  -0.0711   1.0000* -0.1112   1.0000
             |   0.9977   1.0000   0.9991   0.0000   0.7134
             |      363      363      363      363      363      363
             |
    havmilsq |  -0.0378  -0.0465  -0.0150   0.0080   0.0150   0.0080   1.0000
             |   1.0000   1.0000   1.0000   1.0000   1.0000   1.0000
             |      363      363      363      363      363      363      363
             |
     radhlw2 |   0.2650*  0.2605*  0.1095  -0.0109   0.2974* -0.0109  -0.0284
             |   0.0000   0.0000   0.7430   1.0000   0.0000   1.0000   1.0000
             |      363      363      363      363      363      363      363
             |
avgcumdosew2 |   0.1224   0.1748* -0.0214   0.0826  -0.0270   0.0826  -0.0052
             |   0.5104   0.0292   1.0000   0.9883   1.0000   0.9883   1.0000
             |      363      363      363      363      363      363      363
             |

             |  radhlw2 avgcum~2
-------------+------------------
     radhlw2 |   1.0000
             |
             |      363
             |
avgcumdosew2 |   0.1342   1.0000
             |   0.3162
             |      363      363
             |

For females trimmed vacation plans model on wave2 and d2 is not signif


Logistic regression                               Number of obs   =        363
                                                  LR chi2(7)      =      76.69
                                                  Prob > chi2     =     0.0000
Log likelihood = -129.17206                       Pseudo R2       =     0.2289

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .079348    .0155749      5.09    0.000      .0488217     .1098742
       deaw2 |    .1646231    .1715933      0.96    0.337     -.1716935     .5009397
     shjobw2 |   -.0056137    .0041432     -1.35    0.175     -.0137341     .0025068
        bf7m |   -.0006133      .00025     -2.45    0.014     -.0011032    -.0001234
      havmil |   -.0001958    .0011139     -0.18    0.860     -.0023791     .0019875
     radhlw2 |    .0233367     .005861      3.98    0.000      .0118494      .034824
avgcumdosew2 |    .0651649    .0909818      0.72    0.474     -.1131561      .243486
       _cons |   -6.606305    1.018983     -6.48    0.000     -8.603475    -4.609135
-------------+----------------------------------------------------------------

.
. // vacation plans washes out for females also
.
.
. scalar SigDoseVactnMw2 = "no"

. scalar MainEffVactnMw2 = "age bf7m radhlw2 "

.
. local cn7:colnames(e(b))

. di "`cn7'"
age deaw2 shjobw2 bf7m havmil radhlw2 avgcumdosew2 _cons

. local len7 = length("`cn7'")

. di `len7'
56

. local len7b = `len7' - 6

. di `len7b'
50

. local myvarlist = substr("`cn7'",1,`len7b')

. di "`myvarlist'"
age deaw2 shjobw2 bf7m havmil radhlw2 avgcumdosew2

.
. foreach var in `myvarlist' {
  2. cap gen `var'Xd3 = `var'*avgcumdosew2
  3. }

.
. title " Trimmed male main effects dose=> vacation plans  model"


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****       Trimmed male main effects dose=> vacation plans  model        *****
*****                                                                     *****
*****                                                                     *****
*****                                             1 Jul 2012    15:06:30  *****
*******************************************************************************
*******************************************************************************


. 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.7095 >= 0.1000  removing deaw2


p = 0.6626 >= 0.1000  removing avgcumdosew2


p = 0.4924 >= 0.1000  removing shjobw2


p = 0.4544 >= 0.1000  removing havmil


p = 0.1243 >= 0.1000  removing bf7m


Logistic regression                               Number of obs   =        340
                                                  LR chi2(2)      =      36.09
                                                  Prob > chi2     =     0.0000
Log likelihood = -107.10862                       Pseudo R2       =     0.1442

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0587352    .0156958      3.74    0.000       .027972     .0894984
     radhlw2 |    .0163217     .005398      3.02    0.002      .0057417     .0269016
       _cons |     -6.0454    .8953448     -6.75    0.000     -7.800244    -4.290557
-------------+----------------------------------------------------------------

.
.
. local cn8:colnames(e(b))

. di "`cn8'"
age radhlw2 _cons

. local len8 = length("`cn8'")

. di `len7'
56

. local len8b = `len8' - 6

. di `len8b'
11

. local myvarlist = substr("`cn8'",1,`len8b')

. di "`myvarlist'"
age radhlw2

.
.
.
.  title4 "Trimmed male interaction dose=> vacation plans model"
-------------
Trimmed male interaction dose=> vacation plans model
-------------

.  logit hp2vacatn age radhlw2 ageXd3 bf7m avgcumdosew2 bf4m bf4mXd3 bf7mXd3 if gender==1

Iteration 0:   log likelihood = -125.15243
Iteration 1:   log likelihood = -103.75295
Iteration 2:   log likelihood = -95.975162
Iteration 3:   log likelihood = -95.713486
Iteration 4:   log likelihood = -95.674656
Iteration 5:   log likelihood = -95.673437
Iteration 6:   log likelihood = -95.673437

Logistic regression                               Number of obs   =        340
                                                  LR chi2(8)      =      58.96
                                                  Prob > chi2     =     0.0000
Log likelihood = -95.673437                       Pseudo R2       =     0.2355

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0351266    .0232179      1.51    0.130     -.0103796     .0806328
     radhlw2 |    .0006782    .0066781      0.10    0.919     -.0124106     .0137669
      ageXd3 |    .0103149    .0213141      0.48    0.628     -.0314599     .0520897
        bf7m |    .0001809    .0004722      0.38    0.702     -.0007446     .0011065
avgcumdosew2 |   -.5848691    1.717213     -0.34    0.733     -3.950545     2.780807
        bf4m |   -.1548807    .0718689     -2.16    0.031     -.2957412    -.0140202
     bf4mXd3 |   -.0235592    .0602635     -0.39    0.696     -.1416735      .094555
     bf7mXd3 |     .000194    .0003621      0.54    0.592     -.0005158     .0009038
       _cons |   -1.171738    1.695722     -0.69    0.490     -4.495293     2.151816
-------------+----------------------------------------------------------------

.
.  scalar vactnModMw2 ="none"

.
.  di as input "Trimmed Female model wave 2 main effects dose-hp2vacatn model "
Trimmed Female model wave 2 main effects dose-hp2vacatn model

.  forvalues j=2/2 {
  2.  local w2bf 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 nolog difficult iterate(50)
  4.
. }

Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =      70.03
                                                  Prob > chi2     =     0.0000
Log likelihood = -132.50308                       Pseudo R2       =     0.2090

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0851818    .0154813      5.50    0.000       .054839     .1155246
     radhlw2 |    .0170145    .0053804      3.16    0.002      .0064692     .0275599
avgcumdosew2 |    .0786711    .0879844      0.89    0.371     -.0937752     .2511173
       deaw2 |     .201149    .1681372      1.20    0.232     -.1283938     .5306918
     suchrw2 |   -.0020193    .0038609     -0.52    0.601     -.0095866      .005548
       _cons |   -7.431055    .9998597     -7.43    0.000     -9.390744    -5.471366
-------------+----------------------------------------------------------------

.
. scalar SigDoseVactnMw2 = "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 radhlw2 avgcumdosew2 deaw2 suchrw2 _cons

. local len9 = length("`cn9'")

. di `len9'
44

. local len9b = `len9' - 6

. di `len9b'
38

. local myvarlist = substr("`cn9'",1,`len9b')

. di "`myvarlist'"
age radhlw2 avgcumdosew2 deaw2 suchrw2

.
.
. foreach var in `myvarlist' {
  2.   cap gen `var'Xd3 = `var'*avgcumdosew2
  3.   }

.
.
. * female dose vacatn w2 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.6010 >= 0.1000  removing suchrw2


p = 0.4044 >= 0.1000  removing avgcumdosew2


p = 0.2500 >= 0.1000  removing deaw2


Logistic regression                               Number of obs   =        363
                                                  LR chi2(2)      =      67.78
                                                  Prob > chi2     =     0.0000
Log likelihood =   -133.624                       Pseudo R2       =     0.2023

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |     .087459    .0153711      5.69    0.000      .0573321     .1175858
     radhlw2 |    .0183043    .0051588      3.55    0.000      .0081933     .0284153
       _cons |   -7.552753    .9504531     -7.95    0.000     -9.415607    -5.689899
-------------+----------------------------------------------------------------

. estat class

Logistic model for hp2vacatn

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |        18             3  |         21
     -     |        45           297  |        342
-----------+--------------------------+-----------
   Total   |        63           300  |        363

Classified + if predicted Pr(D) >= .5
True D defined as hp2vacatn != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   28.57%
Specificity                     Pr( -|~D)   99.00%
Positive predictive value       Pr( D| +)   85.71%
Negative predictive value       Pr(~D| -)   86.84%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.00%
False - rate for true D         Pr( -| D)   71.43%
False + rate for classified +   Pr(~D| +)   14.29%
False - rate for classified -   Pr( D| -)   13.16%
--------------------------------------------------
Correctly classified                        86.78%
--------------------------------------------------

. estat gof


Logistic model for hp2vacatn, goodness-of-fit test


       number of observations =       363
 number of covariate patterns =       219
            Pearson chi2(216) =       284.26
                  Prob > chi2 =         0.0013

. fitstat

Measures of Fit for logit of hp2vacatn

Log-Lik Intercept Only:     -167.516     Log-Lik Full Model:         -133.624
D(360):                      267.248     LR(2):                        67.784
                                         Prob > LR:                     0.000
McFadden's R2:                 0.202     McFadden's Adj R2:             0.184
Maximum Likelihood R2:         0.170     Cragg & Uhler's R2:            0.283
McKelvey and Zavoina's R2:     0.354     Efron's R2:                    0.237
Variance of y*:                5.091     Variance of error:             3.290
Count R2:                      0.868     Adj Count R2:                  0.238
AIC:                           0.753     AIC*n:                       273.248
BIC:                       -1854.737     BIC':                        -55.995

.
. scalar SigDoseVactnFw2 = "no"

. scalar MainEffVactnFw2 = "age radhlw2 deaw2"

.
. di as result " Full moderator model for females for dose=> Vacation plans"
 Full moderator model for females for dose=> Vacation plans

. logit hp2vacatn age radhlw2 deaw2 suchrw2 avgcumdosew2 ageXd3 radhlw2Xd3 deaw2Xd3  ///
>     suchrw2Xd3 havmilsq if gender==2

Iteration 0:   log likelihood =   -167.516
Iteration 1:   log likelihood = -135.52597
Iteration 2:   log likelihood = -131.52279
Iteration 3:   log likelihood =  -131.2764
Iteration 4:   log likelihood = -131.27069
Iteration 5:   log likelihood = -131.27061
Iteration 6:   log likelihood = -131.27061

Logistic regression                               Number of obs   =        363
                                                  LR chi2(10)     =      72.49
                                                  Prob > chi2     =     0.0000
Log likelihood = -131.27061                       Pseudo R2       =     0.2164

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0708879    .0190976      3.71    0.000      .0334572     .1083185
     radhlw2 |    .0165656    .0064315      2.58    0.010      .0039601     .0291712
       deaw2 |    .3060548     .241868      1.27    0.206     -.1679977     .7801073
     suchrw2 |   -.0009912    .0046331     -0.21    0.831     -.0100718     .0080894
avgcumdosew2 |   -.9450174    1.222942     -0.77    0.440      -3.34194     1.451905
      ageXd3 |    .0137792    .0133034      1.04    0.300      -.012295     .0398534
  radhlw2Xd3 |     .001068    .0036864      0.29    0.772     -.0061572     .0082931
    deaw2Xd3 |   -.1266981    .2241693     -0.57    0.572     -.5660619     .3126657
  suchrw2Xd3 |   -.0004938    .0024641     -0.20    0.841     -.0053234     .0043359
    havmilsq |   -5.05e-07    1.35e-06     -0.37    0.708     -3.15e-06     2.14e-06
       _cons |   -6.701508    1.270732     -5.27    0.000     -9.192096    -4.210919
-------------+----------------------------------------------------------------

.
. di as result "trimmed female moderator model for dose=> vacation plans"
trimmed female moderator model for dose=> vacation plans

. logit hp2vacatn age avgcumdosew2 suchrw2 deaw2 deaw2Xd3  if gender==2

Iteration 0:   log likelihood =   -167.516
Iteration 1:   log likelihood = -140.72298
Iteration 2:   log likelihood = -137.85316
Iteration 3:   log likelihood = -137.83165
Iteration 4:   log likelihood = -137.83165

Logistic regression                               Number of obs   =        363
                                                  LR chi2(5)      =      59.37
                                                  Prob > chi2     =     0.0000
Log likelihood = -137.83165                       Pseudo R2       =     0.1772

-------------+----------------------------------------------------------------
    hp2vacatn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
         age |    .0896607    .0149698      5.99    0.000      .0603204     .1190011
avgcumdosew2 |    .1488443    .1025315      1.45    0.147     -.0521136     .3498023
     suchrw2 |   -.0054654    .0036554     -1.50    0.135     -.0126297      .001699
       deaw2 |    .2935759    .2210405      1.33    0.184     -.1396555     .7268074
    deaw2Xd3 |   -.0992117    .1869089     -0.53    0.596     -.4655464      .267123
       _cons |   -6.416219     .881865     -7.28    0.000     -8.144642    -4.687795
-------------+----------------------------------------------------------------

.
. scalar VacatnModFw2 = "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 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1330.6004

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

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

                                                   AIC             =  7.838826
Log likelihood   =   -1330.6004                    BIC             =  47947.46

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .5832314    .2635871      2.21    0.027      .0666101     1.099853
       _cons |    48.62133    .7061562     68.85    0.000      47.23729     50.00537
-------------+----------------------------------------------------------------

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

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


illw2             double   %8.0g                        Total number of illnesses experienced in time period 1987-1996


. glm illw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -303.59609

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

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

                                                   AIC             =  1.797624
Log likelihood   = -303.5960853                    BIC             = -1851.445

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .0085423    .0128556      0.66    0.506     -.0166543     .0337389
       _cons |    .2741359    .0344406      7.96    0.000      .2066336     .3416382
-------------+----------------------------------------------------------------

. glm hp2vactn illw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  246.5506
Iteration 2:   deviance =  245.3093
Iteration 3:   deviance =  245.3029
Iteration 4:   deviance =  245.3029
Iteration 5:   deviance =  245.3029

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  245.3029322                    (1/df) Deviance =  .7257483
Pearson          =  335.4909761                    (1/df) Pearson  =  .9925769

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

                                                   BIC             = -1724.881

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .3031606    .1114242      2.72    0.007      .0847731     .5215481
       _cons |   -1.277579    .0863769    -14.79    0.000     -1.446875    -1.108284
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. des radhlw2

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


radhlw2           double   %8.0g                        Self-perceived Chornobyl health threat in wave 2


. glm radhlw2 avgcumdosew2 if gender==1, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1693.4076

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

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

                                                   AIC             =  9.972986
Log likelihood   = -1693.407647                    BIC             =  419831.3

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.220373     .766216      1.59    0.111     -.2813831     2.722128
       _cons |    45.63198    2.052711     22.23    0.000      41.60874     49.65522
-------------+----------------------------------------------------------------

. glm hp2vactn radhlw2 if gender==1, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  234.5448
Iteration 2:   deviance =  229.6041
Iteration 3:   deviance =  229.4465
Iteration 4:   deviance =  229.4462
Iteration 5:   deviance =  229.4462

Generalized linear models                          No. of obs      =       340
Optimization     : MQL Fisher scoring              Residual df     =       338
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  229.4462113                    (1/df) Deviance =  .6788349
Pearson          =  340.4683102                    (1/df) Pearson  =  1.007303

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

                                                   BIC             = -1740.737

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0116586    .0021811      5.35    0.000      .0073837     .0159334
       _cons |   -1.817407    .1519393    -11.96    0.000     -2.115203    -1.519612
-------------+----------------------------------------------------------------
(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 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1406.9403

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

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

                                                   AIC             =  7.762756
Log likelihood   = -1406.940271                    BIC             =  47299.65

-------------+----------------------------------------------------------------
             |                 OIM
          age |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    1.502324    .4454009      3.37    0.001      .6293547     2.375294
       _cons |    48.86944    .7323225     66.73    0.000      47.43412     50.30477
-------------+----------------------------------------------------------------

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

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


illw2             double   %8.0g                        Total number of illnesses experienced in time period 1987-1996


. glm illw2 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -463.51524

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

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

                                                   AIC             =  2.564822
Log likelihood   = -463.5152411                    BIC             = -1854.645

-------------+----------------------------------------------------------------
             |                 OIM
        illw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    .1249912    .0331157      3.77    0.000      .0600856     .1898968
       _cons |     .301285    .0544484      5.53    0.000       .194568     .4080019
-------------+----------------------------------------------------------------

. glm hp2vactn illw2 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =   329.874
Iteration 2:   deviance =  329.8007
Iteration 3:   deviance =  329.8005
Iteration 4:   deviance =  329.8005

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  329.8005369                    (1/df) Deviance =  .9135749
Pearson          =  363.0908863                    (1/df) Pearson  =  1.005792

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

                                                   BIC             = -1798.079

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
       illw2 |    .1861547    .0776301      2.40    0.016      .0340026     .3383068
       _cons |   -1.027515    .0837109    -12.27    0.000     -1.191586    -.8634451
-------------+----------------------------------------------------------------
(Standard errors scaled using square root of deviance-based dispersion.)

.
. * radhlw2 is a mediating effect for females => vactn
. des radhlw2

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


radhlw2           double   %8.0g                        Self-perceived Chornobyl health threat in wave 2


. glm radhlw2 avgcumdosew2 if gender==2, fam(gaus) link(identity)

Iteration 0:   log likelihood = -1791.2233

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

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

                                                   AIC             =  9.880018
Log likelihood   = -1791.223306                    BIC             =  408533.7

-------------+----------------------------------------------------------------
             |                 OIM
      radhlw2 |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
avgcumdosew2 |    3.302288    1.283833      2.57    0.010      .7860214     5.818555
       _cons |    56.95167    2.110863     26.98    0.000      52.81445     61.08888
-------------+----------------------------------------------------------------

. glm hp2vactn radhlw2 if gender==2, fam(bin) irls scale(dev) link(probit)

Iteration 1:   deviance =  310.7426
Iteration 2:   deviance =  307.9144
Iteration 3:   deviance =   307.878
Iteration 4:   deviance =   307.878
Iteration 5:   deviance =   307.878

Generalized linear models                          No. of obs      =       363
Optimization     : MQL Fisher scoring              Residual df     =       361
                   (IRLS EIM)                      Scale parameter =         1
Deviance         =  307.8780006                    (1/df) Deviance =  .8528476
Pearson          =   369.926962                    (1/df) Pearson  =  1.024728

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

                                                   BIC             = -1820.001

-------------+----------------------------------------------------------------
             |                 EIM
     hp2vactn |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     radhlw2 |    .0127779    .0023866      5.35    0.000      .0081002     .0174555
       _cons |   -1.793767    .1848064     -9.71    0.000      -2.15598    -1.431553
-------------+----------------------------------------------------------------
(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 VactnMedMw2 = "age illw2"

. scalar VactnMedFw2 = "age illw2 radhlw2"

.
. *xx summary of moderator effects for females:
.     * no signif main dose effect
.     * 3 signif main effects in main effect model
.     * 1 moderator: deaw2Xd3
. title4 "7. SUMMARY MATRIX of dose - vacation plans impact"
-------------
7. SUMMARY MATRIX of dose - vacation plans impact
-------------

. set more off

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

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

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

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

.     matrix define HP2vactnMw2= (1, 2, 3, 1, 0, 3, 0, 2 )

.         matrix define HP2vactnFw2= (1, 2, 3, 2, 0, 3, 1, 3 )

.         matrix rowname HP2vactnMw2 = HP2vactnM

.         matrix rowname HP2vactnFw2 = HP2vactnF

.         matlist HP2vactnMw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2vactnM   |         1            2            3            1            0            3            0

   | c8
-------------+-----------
HP2vactnM   |         2

.         matlist HP2vactnFw2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
HP2vactnF   |         1            2            3            2            0            3            1

   | c8
-------------+-----------
HP2vactnF   |         3

. matrix define H1pt2w2=(HP2wkMw2 \ HP2wkFw2 \ HP2hmcrMw2 \ HP2hmcrFw2 \ HP2spMw2 \ HP2spFw2 \ HP2prbfamMw2 \ HP2prbfamFw2 \ HP2inthbMw2 \ HP2inthbFw2 \ HP2vactnMw2 \ HP2vactnFw2 )

.
.         matlist H1pt2w2

   | c1    c2    c3    c4    c5    c6    c7
-------------+-----------------------------------------------------------------------------
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            1            0
r1   |         1            2            3            1            0            4            0
r1   |         1            2            3            2            0            2            0
HP2spMw2   |         1            2            3            1            0            2            0
HP2spFw2   |         1            2            3            2            1            5            5
HP2prbfamM   |         1            2            3            1            0            5            0
HP2prbfamF   |         1            2            3            2            0            2            2
HP2inthbM   |         1            2            3            1            0            3            0
HP2inthobF   |         1            2            3            2            0            3            0
HP2vactnM   |         1            2            3            1            0            3            0
HP2vactnF   |         1            2            3            2            0            3            1

   | c8
-------------+-----------
r1   |         4
r1   |         6
r1   |         2
r1   |         2
HP2spMw2   |         1
HP2spFw2   |         2
HP2prbfamM   |         1
HP2prbfamF   |         2
HP2inthbM   |         2
HP2inthobF   |         3
HP2vactnM   |         2
HP2vactnF   |         3

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

. matrix rownames H1pt2w2 =HP2wkMw2 HP2wkFw2 HP2hmcrMw2 HP2hmcrFw2 HP2socprbMw2 HP2socprbFw2 HP2prbfamMw2 HP2prbfamFw2 HP2inthbMw2 HP2inthbFw2 HP2vacatnMw2 HP2vacatnFw2

.     matlist H1pt2w2

   | hypnum    ptnum    wave    gender    medsig    numMAsig    numModsig
-------------+-----------------------------------------------------------------------------
HP2wkMw2   |         1            2            3            1            0            4            0
HP2wkFw2   |         1            2            3            2            0            1            0
HP2hmcrMw2   |         1            2            3            1            0            4            0
HP2hmcrFw2   |         1            2            3            2            0            2            0
HP2socprbMw2   |         1            2            3            1            0            2            0
HP2socprbFw2   |         1            2            3            2            1            5            5
HP2prbfamMw2   |         1            2            3            1            0            5            0
HP2prbfamFw2   |         1            2            3            2            0            2            2
HP2inthbMw2   |         1            2            3            1            0            3            0
HP2inthbFw2   |         1            2            3            2            0            3            0
HP2vacatnMw2   |         1            2            3            1            0            3            0
HP2vacatnFw2   |         1            2            3            2            0            3            1

   | numMed
-------------+-----------
HP2wkMw2   |         4
HP2wkFw2   |         6
HP2hmcrMw2   |         2
HP2hmcrFw2   |         2
HP2socprbMw2   |         1
HP2socprbFw2   |         2
HP2prbfamMw2   |         1
HP2prbfamFw2   |         2
HP2inthbMw2   |         2
HP2inthbFw2   |         3
HP2vacatnMw2   |         2
HP2vacatnFw2   |         3

.
.
. sjlog close, replace