. // discrete time logistic regression
. // on whether or not a person is depressed
. pwd
/Users/robertyaffee/Documents/data/research/chwk/phase4/survival/posted/dep/data

.
. *  /Users/robertyaffee/Documents/data/research/chwk/phase4/survival/posted/dep/output
.
. cd /Users/robertyaffee/Documents/data/research/chwk/phase4/survival/posted/dep/data
/Users/robertyaffee/Documents/data/research/chwk/phase4/survival/posted/dep/data

. use panelcuredep2, clear

.
. di c(pwd)
/Users/robertyaffee/Documents/data/research/chwk/phase4/survival/posted/dep/data

. di c(filename)
panelcuredep2.dta

. di c(current_date)
29 Aug 2013

. di c(current_time)
04:40:03

.
.
. title Discrete time logistic depression models for males and females


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                              Discrete                               *****
*****                                time                                 *****
*****                              logistic                               *****
*****                             depression                              *****
*****                               models                                *****
*****                                for                                  *****
*****                               males                                 *****
*****                                and                                  *****
*****                              females                                *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:40:03  *****
*******************************************************************************
*******************************************************************************


.
. xtset id date
       panel variable:  id (strongly balanced)
        time variable:   date, 1980h1 to 2010h2
                delta:  1 halfyear

. cap drop widowed

. recode marrw(1=.)
(marrw: 9192 changes made)

. cap drop widowed

. by id: gen widowed = 0

. by id: replace widowed =1 if marrw == 6
(2198 real changes made)

. cap drop divorced

. by id: gen divorced = 0

. by id: replace divorced=1 if marrw==5
(1824 real changes made)

. cap drop separated

. by id: gen separated = 0

. by id: replace separated=1 if marrw==4
(346 real changes made)

. cap drop married

. by id: gen married = 0

. by id: replace married = 1 if marrw==3
(28402 real changes made)

. cap drop cohabiting

. by id: gen cohabiting = 0

. by id: replace cohabiting = 1 if marrw ==2
(1416 real changes made)

.
.
. * whole sample age group
. cap drop agegp

. by id: g agegp = 0 if age < 43
(28706 missing values generated)

. by id: replace agegp = 1 if age > 42 & age < 56
(14508 real changes made)

. by id: replace agegp = 2 if age < 85 & age >= 56
(14198 real changes made)

.
.  label var agegp "Age group"

.  cap label drop ag

.  label define ag  0 "28 thru 42" 1 "43 thru 55"  2 "56 thru 84"

.  label values agegp ag

.  tab agegp

  Age group |      Freq.     Percent        Cum.
------------+-----------------------------------
 28 thru 42 |     14,818       34.05       34.05
 43 thru 55 |     14,508       33.33       67.38
 56 thru 84 |     14,198       32.62      100.00
------------+-----------------------------------
      Total |     43,524      100.00

.
. * Defining gender-specific agegroups: magegp and fagegp
. cap drop magegp

. g magegp = 0 if age <= 41 & gender==1
(36208 missing values generated)

.  replace magegp = 1 if age >41 & age < 56 & gender==1
(7316 real changes made)

.  replace magegp = 2 if age >= 56 & age < 78 & gender==1
(6386 real changes made)

. cap label define mag 0 "30 thru 40" 1 "41 thru 55" 2 "56 thru 77"

.  label values magegp mag

.  label var magegp "Male specific age group in years"

.  tab magegp

       Male |
   specific |
  age group |
   in years |      Freq.     Percent        Cum.
------------+-----------------------------------
 30 thru 40 |      7,316       34.81       34.81
 41 thru 55 |      7,316       34.81       69.62
 56 thru 77 |      6,386       30.38      100.00
------------+-----------------------------------
      Total |     21,018      100.00

.
. * Defining gender-specific agegroups: magegp and fagegp
. cap drop fagegp

. g fagegp = 0 if age < 43 & gender==2
(36642 missing values generated)

.  replace fagegp = 1 if age > 43 & age < 57 & gender==2
(7936 real changes made)

.  replace fagegp = 2 if age > 56 & age < 84 & gender==2
(7068 real changes made)

. cap label define fag 0 "28 thru 43" 1 "44 thru 56" 2 "57 thru 84"

.  label values fagegp fag

.  label var fagegp "Female specific age group in years"

. tab fagegp

     Female |
   specific |
  age group |
   in years |      Freq.     Percent        Cum.
------------+-----------------------------------
 28 thru 43 |      6,882       31.44       31.44
 44 thru 56 |      7,936       36.26       67.71
 57 thru 84 |      7,068       32.29      100.00
------------+-----------------------------------
      Total |     21,886      100.00

.
.  xtset id date
       panel variable:  id (strongly balanced)
        time variable:   date, 1980h1 to 2010h2
                delta:  1 halfyear

.  xtdescribe

      id:  1, 2, ..., 803                                    n =        702
    date:  1980h1, 1980h2, ..., 2010h2                       T =         62
           Delta(date) = 1 halfyear
           Span(date)  = 62 periods
           (id*date uniquely identifies each observation)

Distribution of T_i:   min      5%     25%       50%       75%     95%     max
                        62      62      62        62        62      62      62

     Freq.  Percent    Cum. |  Pattern
 ---------------------------+----------------------------------------------------------------
      702    100.00  100.00 |  11111111111111111111111111111111111111111111111111111111111111
 ---------------------------+----------------------------------------------------------------
      702    100.00         |  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

.  xtsum depind

Variable         |      Mean   Std. Dev.       Min        Max |    Observations
-----------------+--------------------------------------------+----------------
depind   overall |  .1835092    .387088          0          1 |     N =   42739
         between |             .2635044          0          1 |     n =     702
         within  |             .2847543  -.7825925    1.16656 |     T = 60.8818

.
.  title Variable index


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                              Variable                               *****
*****                               index                                 *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:40:07  *****
*******************************************************************************
*******************************************************************************


.  set more off

.           des depind date agegp ///
>    marrw childw emplw occ1w-occ8w  ///
>     inc1w inc2w inc3w inc4w jsw deaw dvcew sepaw accdw ///
>          cataw illw movew shjobw shfamw shhlw shfincw shhousw shrelaw suprtw suchrw   ///
>          dafter toxic-icdxcnt WHPel-HP2vacatn goferw-neiw ///
>           avgcumdosew

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


depind            float     %9.0g                       Drepression indicator


date              float     %th                         Half-year date


agegp             float     %10.0g       ag             Age group


marrw             float     %15.0g       LABH           cohabitation/marital status


childw            float     %9.0g                       number of children


emplw             float     %15.0g       LABI           mode of employment


occ1w             float     %15.0g       LABJ           profess executive administration


occ2w             float     %15.0g       LABJ           technical sales admin support


occ3w             float     %15.0g       LABJ           service occup protective services


occ4w             float     %15.0g       LABJ           precision prod mechan craft construction


occ5w             float     %15.0g       LABJ           factory laborer machinist transp cleaner


occ6w             float     %15.0g       LABJ           farming agricul forestry fishing trapping logging


occ7w             float     %15.0g       LABJ           homemaking or caregiving


occ8w             float     %15.0g       LABJ           student


inc1w             float     %15.0g       LABJ           Income is not sufficient for basic neccessities


inc2w             float     %15.0g       LABJ           Income is just sufficient for basic neccessities


inc3w             float     %15.0g       LABJ           Income is sufficient for basics plus extra purchases/savings


inc4w             float     %15.0g       LABJ           Income allows to comfortably afford luxury items


jsw               float     %9.0g                       Job satisfaction on a scale of 0-100% in


deaw              float     %9.0g                       Total number of death experienced in time period


dvcew             float     %9.0g                       Total number of divorces experienced in time period


sepaw             float     %9.0g                       Total number of separations experienced in time period


accdw             float     %9.0g                       Total number of accidents experienced in time period


cataw             float     %9.0g                       Total number of disasters experienced in time period


illw              float     %9.0g                       Total number of illnesses experienced in time period


movew             float     %9.0g                       Total number of moves experienced in time period


shjobw            float     %9.0g                       Percentage of strains and hassles related to job


shfamw            float     %9.0g                       Percentage of strains and hassles related to family


shhlw             float     %9.0g                       Percentage of strains and hassles related to health


shfincw           float     %9.0g                       Percentage of strains and hassles related to finances


shhousw           float     %9.0g                       Percentage of strains and hassles related to housing


shrelaw           float     %9.0g                       Percentage of strains and hassles related to relationships


suprtw            float     %9.0g                       Level of support (in percent) from partner


suchrw            float     %9.0g                       Level of support (in percent) from Chernobyl survivor benefits


dafter            int       %8.0g                   *   #days lapsed after Chornobyl accident before you heard about the acc


toxic             byte      %8.0g                       all radioactive materials remain toxic for thousands of years (% of agree)


repair            byte      %8.0g                   *    body has capability to repair tissue damage caused by exposure (% of agree)


skin              byte      %8.0g                       a suntan is caused by radiating damage to the skin (% of agree)


near              byte      %8.0g                   *   radiation from a nuclear plant is more concentrated near the plant (% of agree)


cloud             byte      %8.0g                   *   radioactive fallout is only harmful when visible (% of agree)


world             byte      %8.0g                   *   the chornobyl accident has affected people around the world(% of agree)


healthef          byte      %8.0g                   *   a person exposed to any radiation  likely to suffer from (% of agree)


carcin            byte      %8.0g                   *   a person exposed to carcinogen  is likely to get cancer (% of agree)


woman             byte      %8.0g                   *   pregnant exposed to radiation likely  birth to children with deffects (% agree)


saferad           byte      %8.0g                       there is no safe level of radiation (% of agree)


goodrad           byte      %8.0g                       small doses can actually improve one's health(% of agree)


kzchorn           byte      %8.0g                   *   in k/z most cancerare known to be caused by radiation from Chern (% of agree)


kzunder           byte      %8.0g                       people in k/z underestimate the risks assoicated with radiation (% of agree)


chsize            byte      %8.0g                   *   rad. fallout fr Cher affected mr ppl than the rad from other sites (% of agree)


icdxcnt           float     %9.0g                       count of icdx illnesses


WHPel             float     %9.0g                       Wtd Health Profile Pt 1 Energy Level Subscale


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


WHPer             float     %9.0g                       Wtd Health Profile Emotional reaction Pt 1 subscale


WHPsleep          float     %9.0g                       Wtd Health Profile Sleep Pt 1 subscale


WHPsociso         float     %9.0g                       Wtd Health Profile Social Isolation Pt 1 subscale


WHPpa             float     %9.0g                       Wtd Health Profile Physical Ability Pt 1 Subscale


HP2work           float     %9.0g        hp2fmt         Nottingham Health profile subscale Part2: paid employment


HP2hmcare         float     %9.0g        hp2fmt         Hlth profile Pt2: Home cleaning, cooking and repairs


HP2probsoc        float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth causing probs with social life


HP2pbfhm          float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth causing probs with family members at home


HP2sxlife         float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth causing probs with sex life


HP2inthob         float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth probs interfering with interests & hobbies


HP2vacatn         float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth probs interfering with vacations


goferw            float     %9.0g                       level of fear in percent from going outdoors


fdferw            float     %9.0g                       level of fear in percent from consuming foods contaminated with radiation


trgovw            float     %9.0g                       level of trust in government reports about chornobyl


trrepw            float     %9.0g                       level of trust in  medical/scientific reports about chornobyl


defnw             float     %9.0g                       consider hazardous (in per) - deficiencies in essential nutrition


efradw            float     %9.0g                       consider hazardous (in per) - effects of radiation


ecprw             float     %9.0g                       consider hazardous (in per) - economic problems


polprw            float     %9.0g                       consider hazardous (in per) - political problems


airw              float     %9.0g                       consider hazardous (in per) - air and water pollution


radw              float     %9.0g                       believed % of the radioactively contaminated area


radchw            float     %9.0g                       believed % of polution related to chornobyl


radtlw            float     %9.0g                       believed % of cumulated radiation exposed to in a lifetime


radhlw            float     %9.0g                       how much believed personal health is affected by radiation


radfmw            float     %9.0g                       how much believed family health is affected by radiation now


dauthw            float     %9.0g                       level of danger by authorities in %


medw              float     %9.0g                       level of danger by general media %


neiw              float     %9.0g                       level of danger by neighbors in  %


avgcumdosew       float     %9.0g                        avg mean dose of CS137 in mGy


.    label list
ev:
           0 non-depressed
           1 depressed
           2 right-censored
ed:
           0 never
           1 reported depression
nptsd:
           0 reported PTSD
           1 never had PTSD
LABE:
           0 0. not answered
           1 1. not at all
           2 2. a little bit
           3 3. moderately
           4 4. quite a bit
           5 5. extremely
sx:
           0 0. male
           1 1. female
q85:
           0 0. not answered
           1 1. government official
           2 2. military
           3 3. local authority
           4 4. local police
           5 5. family/friends/neighbors
           6 6. media (tv, radio, newspaper)
q25:
           0 0. not answered
           1 1. did not graduate high school
           2 2. graduated high school
           3 3. technical degree
           4 4. did not finish college/bachelor's
           5 5. graduated college/bachelor's
           6 6. finished specialist/master's degree
           7 7. doctor of science/phd
           8 8. doctor of medicine/md
q14:
           0 0. not answered
           1 1. male
           2 2. female
lon:
           0 0. missing
           1 1. east
           2 2. west
inj:
           0 0. no
           1 1. yes
ill862:
           1 1. cancer
           2 2. cardiovascular
           3 3. dermatologic
           4 4. endocrine/metabolic
           5 5. gastrointestinal
           6 6. genitourinary
           7 7. hematological
           8 8. infectious
           9 9. musculoskeletal
          10 10. neurological
          11 11. psychiatric
          12 12. peripheral vascular
          13 13. respiratory
          14 14. rheumatologic
          15 15. tumors
          16 16. tumors
          17 17. substance use
          18 18. surgery (of any type)
hp2fmt:
           0 0. no
           1 1. yes
dum:
           0 0. no
           1 1. yes
LABO:
           0 0. not answered
           1 1. primary indoors
           2 2. primarily outdoors
           3 3. combination of both
LABN:
           0 0. not answered
           1 1. private source
           2 2. commercial source
           3 3. both sources
LABM:
           0 0. not answered
           1 1. primarily indoors
           2 2. primarily outdoors
           3 3. combination of both
LABL:
           0 0. not answered
           1 1. wood
           2 2. brick
           3 3. multi-story building
LABJ:
           0 0. not selected
           1 1. selected
LABI:
           0 0. not answered
           1 1. full time
           2 2. part time
           3 3. voluntary
           4 4. retired
           5 5. unemployed
LABH:
           0 0. not answered
           1 1. single
           2 2. cohabitating
           3 3. married
           4 4. separated
           5 5. divorced
           6 6. widowed
LABG:
           0 0. not answered
           1 1. cherkasy
           2 2. chernihiv
           3 3. chernivtski
           4 4. dnipropetrovsk
           5 5. dontsk
           6 6. ivano-frankivsk
           7 7. kharkiv
           8 8. kherson
           9 9. khmelnytskyi
          10 10. kyiv
          11 11. kirovohrad
          12 12. luhansk
          13 13. lviv
          14 14. mykolaiv
          15 15. odessa
          16 16. poltava
          17 17. rivne
          18 18. sumy
          19 19. ternopil
          20 20. vinnytsia
          21 21. volyn/volhynia
          22 22. zaporizhia
          23 23. zhytomyr
          24 24. zakarpattia/transcarpathian
          25 25. ark
          26 26. outside ukraine
LABF:
           0 0. not answered
           1 1. north
           2 2. south
LABD:
           0 0. not answered
           1 1. not at all true
           2 2. slightly true
           3 3. somewhat true
           4 4. very true
           5 5. extremely true
LABC:
           0 0. not answered
           1 1. yes
           2 2. no
LABB:
           0 0. not answered
           1 1. not at all
           2 2. a little
           3 3. a lot
HPLabel:
           0 0. no
           1 1. yes
fnjr:
           0 Unanswered
           1 not at all true
           2 very untrue
           3 somewhat true
           4 very true
           5 extemely true
oblnown:
           1 dontsk
           2 kyiv
           3 zhytomyr
ranown:
           1 1. Andrushevskiy
           2 2. Baranovskiy
           3 3. Barishevskiy
           4 4. Berdichevskiy
           5 5. Bilo Tserkovskiy
           6 6. Boguslavskiy
           7 7. Borodyanskiy
           8 8. Boryspilskiy
           9 9. Brovarskiy
          10 10. Brusilovskiy
          11 11. Chernyahovskiy
          12 12. Chervonoarmiyskiy
          13 13. Chudnivskiy
          14 14. Emilchinskiy
          15 15. Fastivskiy
          16 16. Irpenskiy
          17 17. Kagarlykskiy
          18 18. Korostenskiy
          19 19. Korostichevskiy
          20 20. Kyevo-Svyatoshenskiy
          21 21. Kyivskiy
          22 22. Lubarskiy
          23 23. Luginskiy
          24 24. Makarovskiy
          25 25. Malinskiy
          26 26. Mironivskiy
          27 27. Narodichevskiy
          28 28. Novograd-Volynskiy
          29 29. Obukhovskiy
          30 30. Olevskiy
          31 31. Ovruchskiy
          32 32. Pereyaslav-Khmelnitskiy
          33 33. Polesskiy
          34 34. Popelnyanskiy
          35 35. Radomischevskiy
          36 36. Rakitnetskiy
          37 37. Romanovskiy
          38 38. Ruzhinskiy
          39 39. Skvirskiy
          40 40. Stavyschenskiy
          41 41. Taraschenskiy
          42 42. Tarascheskiy
          43 43. Tetievskiy
          44 44. Vasilkivskiy
          45 45. Vasilkovskiy
          46 46. Vasylkovskiy
          47 47. Volodar-Volynskiy
          48 48. Volodarskiy
          49 49. Vyshgorodskiy
          50 50. Yagotinskiy
          51 51. Zhitomirskiy
ar:
          25 Malinsky-Norodichevsky
          30 Olevsk-Emilchino
combi:
           0 not combined
           1 merged with another area
townlabel:
           1 Adler
           2 Aktubinsk
           3 Alexandrovka
           4 Alupka
           5 Alushta
           6 Amderma
           7 Anadyr
           8 Ananiev
           9 Andrushevka
          10 Antaliya
          11 Antonin
          12 Apolonivka
          13 Ashhabad
          14 Ashkhabad
          15 Avratin
          16 B.Aleksandrovka
          17 B.Lepetiha
          18 Babanka
          19 Babinchi
          20 Babki
          21 Bahchisaray
          22 Bahta
          23 Baku
          24 Balakleya
          25 Balta
          26 Baranovka
          27 Barishevka
          28 Barysh
          29 Bazar
          30 Beevo
          31 Belgorod-Dnestrovskiy
          32 Bendyugivka
          33 Berdichev
          34 Berdyansk
          35 Beregovoe
          36 Bereslav
          37 Berezan
          38 Berezanka
          39 Berlin
          40 Bila Tserkva
          41 Birlovka
          42 Bogdanovka
          43 Bogoduhov
          44 Boguslav
          45 Bolotnitsa
          46 Bolotovo
          47 Bolshaya Pavlovka
          48 Borodyanka
          49 Borovskoe
          50 Boryspil
          51 Boyarka
          52 Branitsa
          53 Brest
          54 Bronitsa
          55 Brovary
          56 Bryanka
          57 Bryansk
          58 Brynsk
          59 Bub-Slobodka
          60 Bucha
          61 Buda
          62 Bugskoe
          63 Buinaks
          64 Burgas
          65 Bushev
          66 Bushtino
          67 Bygskoe
          68 Cherkasy
          69 Chernigiv
          70 Chernivtsi
          71 Chernove
          72 Chernyahov
          73 Chervonozavodsk
          74 Chervonozavodskoy
          75 Chita
          76 Chizhivka
          77 Chornobyl
          78 Chortkiv
          79 Chortoria
          80 Chudniv
          81 Chumalevo
          82 Cineva
          83 Crit
          84 Deli
          85 Denusu
          86 Derzhanovka
          87 Desna
          88 Dessau
          89 Dibrove
          90 Dibrovka
          91 Divochki
          92 Dnipropetrovsk
          93 Donbass
          94 Donetsk
          95 Dovbish
          96 Dovgalevka
          97 Dovzhik
          98 Drugovka
          99 Dubische
         100 Dubno
         101 Dubrivka
         102 Dudarkov
         103 Dushanbe
         104 Dvorysche
         105 Dvurechnaya
         106 Dymarka
         107 Dymerka
         108 Dzerzhinsk
         109 Dzhankoy
         110 Emba
         111 Erevan
         112 Evpatoria
         113 Fastiv
         114 Fedorivka
         115 Feodosia
         116 Fergana
         117 Finov
         118 Fomovka
         119 Gadyach
         120 Gadzinka
         121 Gaevichi
         122 Galievka
         123 Gaysin
         124 Gden
         125 Gdov
         126 Genichesk
         127 Gerebulivka
         128 Glevaha
         129 Glybochitsa
         130 Gogolev
         131 Golovino
         132 Golovotino
         133 Golubyatino
         134 Gomel
         135 Gorbani
         136 Gorlivka
         137 Gorodische
         138 Gorodnitsa
         139 Gorodskoe
         140 Goroschkov
         141 Gostomel
         142 Gradezhsk
         143 Gremayliv
         144 Grishkovichi
         145 Gurzuf
         146 Guyva
         147 Habez
         148 Hantymansiysk
         149 Hirov
         150 Holon
         151 Homs
         152 Horol
         153 Hotiv
         154 Hotov
         155 Hust
         156 Hutor-Hmelnaya
         157 Ilintsi
         158 Illichevsk
         159 Iman
         160 Irkutsk
         161 Irpen
         162 Irschansk
         163 Ivanivka
         164 Ivanki
         165 Ivankiv
         166 Ivano-Frankivsk
         167 Kabul
         168 Kagarlyk
         169 Kahovka
         170 Kalenna
         171 Kaliningrad
         172 Kalinovka
         173 Kalita
         174 Kamenets-Podolskiy
         175 Kameniy Brid
         176 Kameniy Maydan
         177 Kamenka
         178 Kandalaksha
         179 Karelia
         180 Karyakino
         181 Kerch
         182 Keverovo
         183 Khabarovsk
         184 Kharkiv
         185 Kherson
         186 Khmelnitskiy
         187 Khotyanovka
         188 Kirov
         189 Kirovograd
         190 Kishinev
         191 Klavdievo
         192 Kobuscha
         193 Kolaborka
         194 Kolesniki
         195 Kolomak
         196 Komarov
         197 Komarovo
         198 Komsomolsk na Dnepre
         199 Komsomolskoe
         200 Korosten
         201 Korostichev
         202 Korotke
         203 Korotkozabudske
         204 Korshiv
         205 Koshiv
         206 Kostanai
         207 Kostroma
         208 Kosturevo
         209 Kovpyta
         210 Kranopil
         211 Krasilovka
         212 Krasna Slobodka
         213 Krasnodar
         214 Krasnoyarsk
         215 Kremenchuk
         216 Krinichki
         217 Krive Ozero
         218 Kriviy Rig
         219 Krivoscheintsi
         220 Kruva
         221 Ksaverivka
         222 Kursk
         223 Kyiv
         224 Kzyl-Orda
         225 Lazarivka
         226 Lazurnoe
         227 Lebedin
         228 Lebedivka
         229 Letki
         230 Levkiv
         231 Lezinka
         232 Lipetsk
         233 Lipniki
         234 Litochki
         235 Livin
         236 Lodz
         237 Lohvitsoe
         238 Lozovskoe
         239 Lubar
         240 Lubimovka
         241 Lubny
         242 Lugansk
         243 Luka
         244 Lutsk
         245 Lviv
         246 Lybny
         247 Lypki
         248 Maidanovka
         249 Makarov
         250 Makovitcy
         251 Maksimovichi
         252 Mala Glumcha
         253 Malin
         254 Malkovka
         255 Malye Moskovichi
         256 Manevichi
         257 Mariupol
         258 Maruschevka
         259 Marushevka
         260 Maystriv
         261 Megenchaursk
         262 Melitopol
         263 Melovoe
         264 Millerovo
         265 Minsk
         266 Minvody
         267 Mircha
         268 Mirgorod
         269 Mirniy
         270 Mirnoe
         271 Mironivka
         272 Mliev
         273 Mlynishe
         274 Mokra Kamenovka
         275 Molchanovka
         276 Morozovka
         277 Moshanitsa
         278 Moskva
         279 Motovilovka
         280 Motslobidka
         281 Mukachevo
         282 Munhen
         283 Mykolaiv
         284 Myronivka
         285 N.Petrivtsy
         286 Naraev
         287 Narodichi
         288 Natalivka
         289 Nedelko
         290 Nedrigaylov
         291 Nehvorosh
         292 Nekrasichi
         293 Neteschin
         294 Netyaeno
         295 Nikopol
         296 Nizhin
         297 Nosovka
         298 Nova Ushitsa
         299 Novaya Borovaya
         300 Novgorod
         301 Noviy Gorodok
         302 Novo Sangarsk
         303 Novo-Druzievka
         304 Novocherkask
         305 Novogdyanka
         306 Novograd-Volynskiy
         307 Novoguyvinsk
         308 Novomihailovka
         309 Novopavlovka
         310 Novosibirsk
         311 Novye Vorobi
         312 Obodovka
         313 Obukhov
         314 Ochakov
         315 Odessa
         316 Oha
         317 Olenovka
         318 Olevsk
         319 Olhovka
         320 Oranoe
         321 Orychi
         322 Osipovo
         323 Oslo
         324 Oster
         325 Ostki
         326 Osychki
         327 Ovruch
         328 Ozernoe
         329 Panutino
         330 Penza
         331 Pereslav
         332 Pereyaslav-Khmelnitskiy
         333 Pervomaysk
         334 Peschane
         335 Peski-Ydayskie
         336 Petrushki
         337 Planerskoe
         338 Plosske
         339 Pogrebische
         340 Polesske
         341 Pologie Verguny
         342 Poltava
         343 Popelnya
         344 Potoki
         345 Praga
         346 Pribitka
         347 Priki
         348 Priluki
         349 Primorsk
         350 Primorskiy
         351 Primorskoe
         352 Pripyat
         353 Privitov
         354 Privorotie
         355 Prohorovka
         356 Proletarsk
         357 Pugachev
         358 Pugachov
         359 Puhovka
         360 Pyatka
         361 Rachki
         362 Radcha
         363 Radchitsy
         364 Radinka
         365 Radomichi
         366 Radomyschi
         367 Rakitne
         368 Rassudov
         369 Reshetilovka
         370 Riga
         371 Rodomischel
         372 Rogachev
         373 Rogizna
         374 Romanov
         375 Rossohovskoe
         376 Rostok
         377 Rudnich
         378 Ruzhin
         379 Ruzhiv
         380 Ryazan
         381 Rybinsk
         382 Rybnits-Damgarten
         383 Ryhalskoe
         384 Ryzhishe
         385 Ryzhiv
         386 Rzhischev
         387 Sadki
         388 Sahalin
         389 Saki
         390 Salehard
         391 Samara
         392 Samarkand
         393 Saranul
         394 Sasinovka
         395 Saverichi
         396 Schevchenko
         397 Selets
         398 Serov
         399 Serpuhov
         400 Sevastopol
         401 Shahtersk
         402 Sharm El Sheyh
         403 Sherbakul
         404 Shushtansk
         405 Shuya
         406 Sierra-Leone
         407 Simferopol
         408 Sinelnikovo
         409 Singuri
         410 Skadovsk
         411 Skalya Podolskaya
         412 Skvira
         413 Slavuta
         414 Slavutich
         415 Sloboda
         416 Smela
         417 Smeloe
         418 Smolensk
         419 Smolyary
         420 Sochi
         421 Sofia
         422 Soligorsk
         423 Sosna
         424 St.Peterburg
         425 Starokonstyantinov
         426 Starovichi
         427 Stavropol
         428 Stavysche
         429 Stayki
         430 Stetchiki
         431 Stremygorod
         432 Striy
         433 Sudak
         434 Suhumi
         435 Sumgait
         436 Sumy
         437 Svalyava
         438 Svarichevka
         439 Sverdlovsk
         440 Svetlovodsk
         441 Svitanok
         442 Tambov
         443 Tarascha
         444 Tashkent
         445 Tbilisi
         446 Tchinvali
         447 Tepenitsa
         448 Teplik
         449 Ternopil
         450 Teterev
         451 Teteriv
         452 Tetiev
         453 Tetiv
         454 Tevelivka
         455 Timoshevks
         456 Tokmak
         457 Tomilovo
         458 Trilesy
         459 Trilisu
         460 Trotskoe
         461 Troyany
         462 Truskavets
         463 Tulchin
         464 Ukrainka
         465 Ulan-Ude
         466 Uman
         467 Usin
         468 Varvarovka
         469 Vasilev
         470 Vasilkiv
         471 Velyki Klishi
         472 Velyki Minki
         473 Verbivra
         474 Vereya
         475 Verhnedneprovsk
         476 Verhovna
         477 Verona
         478 Veselovka
         479 Vilna Tarasovka
         480 Vinnitsa
         481 Vinzdorf
         482 Vishneve
         483 Vladislavchik
         484 Vladivostok
         485 Volnyanka
         486 Volodar-Volynskiy
         487 Volodarka
         488 Volodarsk
         489 Vologda
         490 Vologodsk
         491 Vorkuta
         492 Vorsel
         493 Vorzel
         494 Voskodavenci
         495 Vroslav
         496 Vyshgorod
         497 Vyshneve
         498 Vysoka Pich
         499 Warshava
         500 Yagnyatin
         501 Yagotin
         502 Yalta
         503 Yaropovuchi
         504 Yarun
         505 Yurovka
         506 Zabryda
         507 Zalessya
         508 Zaltsburg
         509 Zaporizhya
         510 Zarbrugen
         511 Zaruchany
         512 Zarya
         513 Zatoka
         514 Zazimye
         515 Zelenki
         516 Zgurivka
         517 Zheleznaya Ruda
         518 Zhelezniy Port
         519 Zherebki
         520 Zhitomyr
         521 Zhovtneve
         522 Zorki
         523 Zosimovka
         524 Zubrinka
         525 Zvenigorodka
         526 Zyablovka
railabel:
           1 Afganistan
           2 Alupkinskiy
           3 Alushtinskiy
           4 Ananievskiy
           5 Andrushevskiy
           6 Armenia
           7 Austria
           8 Azerbaidjan
           9 B.Alexandrovskiy
          10 B.Lepetihskiy
          11 Bahchisarayskiy
          12 Bahmachskiy
          13 Bakaleyskiy
          14 Baltinskiy
          15 Baranovskiy
          16 Baryshevskiy
          17 Belarus
          18 Belgorod-Dnestrovskiy
          19 Berdichevskiy
          20 Berdyanskiy
          21 Berekovskiy
          22 Bereslavskiy
          23 Berezhanskiy
          24 Berschikskiy
          25 Bilo Tserkovskiy
          26 Bobrovitskiy
          27 Bobrovskiy
          28 Bogoduhovskiy
          29 Boguslavskiy
          30 Bolgaria
          31 Boreslavskiy
          32 Borodyanskiy
          33 Borschevskiy
          34 Boryspilskiy
          35 Boyarka
          36 Brovarskiy
          37 Brusilovskiy
          38 Buchatskiy
          39 Buchskiy
          40 Bushevskiy
          41 Cherkaskiy
          42 Chernigivskiy
          43 Chernivetskiy
          44 Chernyahovskiy
          45 Chervonoarmeyskiy
          46 Chornihinskiy
          47 Chortkivskiy
          48 Chudnivskiy
          49 Czech Republic
          50 Dnipropetrovskiy
          51 Donbasskiy
          52 Donetskiy
          53 Drogobichskiy
          54 Dvurechnetskiy
          55 Dzerzhinskiy
          56 Dzhankoyskiy
          57 Egypt
          58 Emilchinskiy
          59 Evpatorskiy
          60 Fastivskiy
          61 Feodoskiy
          62 Gadyachskiy
          63 Gaysinskiy
          64 Genicheskiy
          65 Georgia
          66 Germany
          67 Globinskiy
          68 Golopristanskiy
          69 Gorlivskiy
          70 Gorodyscheskiy
          71 Goshanskiy
          72 Greece
          73 Gurzufskiy
          74 Gusyatinskyy
          75 Guyvskiy
          76 Horolskiy
          77 Hotivskiy
          78 Hustskiy
          79 Ichinyatskiy
          80 Ilinetskiy
          81 Illichevskiy
          82 India
          83 Irpenskiy
          84 Italy
          85 Ivankovskiy
          86 Ivano-Frankivskiy
          87 Ivanovskiy
          88 Izrael
          89 Kagarlykskiy
          90 Kahovskiy
          91 Kalinovskiy
          92 Kamenets-Podolskiy
          93 Kanevskiy
          94 Kazakhstan
          95 Kazatinskiy
          96 Kerchinskiy
          97 Keverovskiy
          98 Kharkivskiy
          99 Khersonskiy
         100 Khmelnitskiy
         101 Kirovogradskiy
         102 Klavdievskiy
         103 Kolomakskiy
         104 Komsomolskiy
         105 Korostenskiy
         106 Korostichevskiy
         107 Korsun-Shevchenkovskiy
         108 Kostanayskiy
         109 Kostropolskiy
         110 Kovpytovskiy
         111 Kozeletskiy
         112 Kozyatinskiy
         113 Kremenchukskiy
         114 Krivorizhskiy
         115 Kuzedelskiy
         116 Kyevo-Svyatoshenskiy
         117 Kyivskiy
         118 Latvia
         119 Lebedinskiy
         120 Lipova-Dolynskiy
         121 Litva
         122 Livia
         123 Lodzinskiy
         124 Lohvitskiy
         125 Lozovskiy
         126 Lubarskiy
         127 Lubenskiy
         128 Luganskiy
         129 Luginskiy
         130 Lutskiy
         131 Lvivskiy
         132 Maidanovskiy
         133 Makarovskiy
         134 Malinskiy
         135 Malkovskiy
         136 Manevichevskiy
         137 Mankovskiy
         138 Mariupolskiy
         139 Melitopolskiy
         140 Melovskiy
         141 Mirgorodskiy
         142 Mironivskiy
         143 Mogilev-Podolskiy
         144 Moldova
         145 Motovilovskiy
         146 Mukachevskiy
         147 Mykolaivskiy
         148 Narodichevskiy
         149 Nikopolskiy
         150 Nizhinskiy
         151 Norway
         152 Nosovskiy
         153 Nova Ushitskiy
         154 Novgorodskiy
         155 Novo-Druzievskiy
         156 Novo-Sangarskiy
         157 Novocherkaskiy
         158 Novograd-Volynskiy
         159 Novoodesskiy
         160 Obukhovskiy
         161 Ochakovskiy
         162 Odesskiy
         163 Olevskiy
         164 Olshanskiy
         165 Oranovskiy
         166 Orehovskiy
         167 Orychskiy
         168 Osterskiy
         169 Ovidiopolskiy
         170 Ovruchskiy
         171 Pereslavskiy
         172 Perevalskiy
         173 Pereyaslav-Khmelnitskiy
         174 Pervomayskiy
         175 Peschanskiy
         176 Piryatinskiy
         177 Plosskiy
         178 Pogrebischenskiy
         179 Poland
         180 Polesskiy
         181 Poltavskiy
         182 Popasnyanskiy
         183 Popelnyanskiy
         184 Prilukskiy
         185 Primorskiy
         186 Radomyscheskiy
         187 Rakitnetskiy
         188 Repkinskiy
         189 Reshetilovskiy
         190 Romanovskiy
         191 Romenskiy
         192 Rovenskiy
         193 Roynyatovskiy
         194 Russia
         195 Ruzhinskiy
         196 Ryzhishenskiy
         197 Sakskiy
         198 Sevastopolskiy
         199 Sierra-Leone
         200 Simferopol
         201 Sinelnikovskiy
         202 Skadovskiy
         203 Skvirskiy
         204 Slavutichskiy
         205 Slavutskiy
         206 Smelskiy
         207 Solonovskiy
         208 Sorabskiy
         209 Sosnitskiy
         210 Spolyanskiy
         211 Starobeshevskiy
         212 Starokonstyantinovskiy
         213 Stavyschenskiy
         214 Striyskiy
         215 Sudakskiy
         216 Sumgaitskiy
         217 Sumskiy
         218 Svalyavskiy
         219 Svatovskiy
         220 Tadjikistan
         221 Taraschenskiy
         222 Tatischenskiy
         223 Teplikskiy
         224 Ternopilskiy
         225 Tetelivskiy
         226 Teterivskiy
         227 Tetievskiy
         228 Topilnskiy
         229 Trostyanetskiy
         230 Trotskiy
         231 Truskavetskiy
         232 Tulchinskiy
         233 Turkey
         234 Turkmenistan
         235 Tyachevskiy
         236 Umanskiy
         237 Uzbekistan
         238 Vasilkovskiy
         239 Vinnitskiy
         240 Vischnevskiy
         241 Volodar-Volynskiy
         242 Volodarskiy
         243 Vorzelskiy
         244 Vradievskiy
         245 Vyshgorodskiy
         246 Vysoka Pichskiy
         247 Yagotinskiy
         248 Yaltinskiy
         249 Zaporizhskiy
         250 Zenkovskiy
         251 Zgurivskiy
         252 Zhitomirskiy
         253 Zolotonoschenskiy
         254 Zvenigorodskiy
ag:
           0 28 thru 42
           1 43 thru 55
           2 56 thru 84
mag:
           0 30 thru 40
           1 41 thru 55
           2 56 thru 77
fag:
           0 28 thru 43
           1 44 thru 56
           2 57 thru 84

.
.
.
.  // full male model
.  cap drop hazm

.  title baseline dt logit


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                              baseline                               *****
*****                                 dt                                  *****
*****                               logit                                 *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:40:07  *****
*******************************************************************************
*******************************************************************************


.  logit depind i.date if gender==1,  nolog

Logistic regression                               Number of obs   =      20797
                                                  LR chi2(61)     =     728.66
                                                  Prob > chi2     =     0.0000
Log likelihood = -9063.4415                       Pseudo R2       =     0.0386

-------------+----------------------------------------------------------------
       depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        date |
         41  |   -1.97e-12     .351935     -0.00    1.000     -.6897799     .6897799
         42  |    .0602688     .347275      0.17    0.862     -.6203777     .7409154
         43  |    .0602688     .347275      0.17    0.862     -.6203777     .7409154
         44  |   -.0637254    .3571066     -0.18    0.858     -.7636413     .6361906
         45  |   -.0637254    .3571066     -0.18    0.858     -.7636413     .6361906
         46  |   -1.97e-12     .351935     -0.00    1.000     -.6897799     .6897799
         47  |   -1.97e-12     .351935     -0.00    1.000     -.6897799     .6897799
         48  |   -1.97e-12     .351935     -0.00    1.000     -.6897799     .6897799
         49  |   -1.97e-12     .351935     -0.00    1.000     -.6897799     .6897799
         50  |    .1174562    .3430535      0.34    0.732     -.5549163     .7898287
         51  |    .1174562    .3430535      0.34    0.732     -.5549163     .7898287
         52  |    1.766537    .2798037      6.31    0.000      1.218132     2.314942
         53  |    1.766537    .2798037      6.31    0.000      1.218132     2.314942
         54  |    1.521521    .2841542      5.35    0.000       .964589     2.078453
         55  |    1.521521    .2841542      5.35    0.000       .964589     2.078453
         56  |    1.444455    .2857766      5.05    0.000      .8843432     2.004567
         57  |    1.444455    .2857766      5.05    0.000      .8843432     2.004567
         58  |    1.424591    .2862161      4.98    0.000      .8636176     1.985564
         59  |    1.424591    .2862161      4.98    0.000      .8636176     1.985564
         60  |    1.404471    .2866706      4.90    0.000       .842607     1.966335
         61  |    1.404471    .2866706      4.90    0.000       .842607     1.966335
         62  |    1.186935    .2922145      4.06    0.000      .6142046     1.759664
         63  |    1.186935    .2922145      4.06    0.000      .6142046     1.759664
         64  |    1.255638    .2903335      4.32    0.000      .6865951     1.824682
         65  |    1.255638    .2903335      4.32    0.000      .6865951     1.824682
         66  |    1.255638    .2903335      4.32    0.000      .6865951     1.824682
         67  |    1.255638    .2903335      4.32    0.000      .6865951     1.824682
         68  |    1.255638    .2903335      4.32    0.000      .6865951     1.824682
         69  |    1.255638    .2903335      4.32    0.000      .6865951     1.824682
         70  |      1.2331    .2909368      4.24    0.000      .6628741     1.803325
         71  |      1.2331    .2909368      4.24    0.000      .6628741     1.803325
         72  |    1.464072    .2853512      5.13    0.000      .9047939      2.02335
         73  |    1.464072    .2853512      5.13    0.000      .9047939      2.02335
         74  |    1.363427    .2876269      4.74    0.000      .7996882     1.927165
         75  |    1.363427    .2876269      4.74    0.000      .7996882     1.927165
         76  |     1.48345    .2849394      5.21    0.000      .9249791     2.041921
         77  |     1.48345    .2849394      5.21    0.000      .9249791     2.041921
         78  |    1.577023    .2830646      5.57    0.000      1.022226     2.131819
         79  |    1.577023    .2830646      5.57    0.000      1.022226     2.131819
         80  |    1.613031    .2823915      5.71    0.000      1.059554     2.166508
         81  |    1.613031    .2823915      5.71    0.000      1.059554     2.166508
         82  |    1.577023    .2830646      5.57    0.000      1.022226     2.131819
         83  |    1.577023    .2830646      5.57    0.000      1.022226     2.131819
         84  |    1.521521    .2841542      5.35    0.000       .964589     2.078453
         85  |    1.521521    .2841542      5.35    0.000       .964589     2.078453
         86  |    1.502597    .2845406      5.28    0.000       .944908     2.060287
         87  |    1.502597    .2845406      5.28    0.000       .944908     2.060287
         88  |    1.613031    .2823915      5.71    0.000      1.059554     2.166508
         89  |    1.613031    .2823915      5.71    0.000      1.059554     2.166508
         90  |    1.577023    .2830646      5.57    0.000      1.022226     2.131819
         91  |    1.577023    .2830646      5.57    0.000      1.022226     2.131819
         92  |    1.682877    .2811589      5.99    0.000      1.131816     2.233939
         93  |    1.682877    .2811589      5.99    0.000      1.131816     2.233939
         94  |    1.750104    .2800598      6.25    0.000      1.201197     2.299012
         95  |    1.750104    .2800598      6.25    0.000      1.201197     2.299012
         96  |    1.893222    .2779871      6.81    0.000      1.348377     2.438067
         97  |    1.893222    .2779871      6.81    0.000      1.348377     2.438067
         98  |    1.983375    .2768556      7.16    0.000      1.440748     2.526002
         99  |    1.873498    .2817453      6.65    0.000      1.321287     2.425708
        100  |    1.891516    .2849822      6.64    0.000      1.332961     2.450071
        101  |    1.906888    .2913801      6.54    0.000      1.335793     2.477982
             |
       _cons |   -2.941338    .2488556    -11.82    0.000     -3.429086     -2.45359
-------------+----------------------------------------------------------------

.  predict hazm, pr

.  tsline hazm if gender==1, connect(stairstep) lpatt(solid) ///
>     title( Male baseline hazard structure)

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

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

.
.
.
.
.
. title full male model


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                                full                                 *****
*****                                male                                 *****
*****                               model                                 *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:40:12  *****
*******************************************************************************
*******************************************************************************


. logit depind i.date i.agegp ///
>   i.marrw childw i.emplw occ1w-occ8w  ///
>     inc1w inc2w inc3w inc4w jsw deaw dvcew sepaw accdw ///
>          cataw illw movew shjobw shfamw shhlw shfincw shhousw shrelaw suprtw suchrw   ///
>          dafter toxic-icdxcnt WHPel-HP2vacatn goferw-neiw ///
>           avgcumdosew if gender==1, vce(cluster id)  nolog
note: 0.marrw != 0 predicts failure perfectly
      0.marrw dropped and 14 obs not used

note: 3.emplw != 0 predicts failure perfectly
      3.emplw dropped and 34 obs not used

note: 6.marrw omitted because of collinearity

Logistic regression                               Number of obs   =      13258
                                                  Wald chi2(66)   =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -4091.8737                 Pseudo R2       =     0.3425

(Std. Err. adjusted for 266 clusters in id)
-----------------+----------------------------------------------------------------
                 |               Robust
           depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
            date |
             41  |   -4.44e-13           .         .        .             .            .
             42  |   -4.39e-13    .3442361     -0.00    1.000     -.6746904     .6746904
             43  |   -4.42e-13    .3442361     -0.00    1.000     -.6746904     .6746904
             44  |   -.4944306    .4311577     -1.15    0.251     -1.339484      .350623
             45  |   -.4944306    .4311577     -1.15    0.251     -1.339484      .350623
             46  |   -.3102593    .4373624     -0.71    0.478     -1.167474     .5469553
             47  |   -.3102593    .4373624     -0.71    0.478     -1.167474     .5469553
             48  |   -.3102593    .3787808     -0.82    0.413     -1.052656     .4321375
             49  |   -.3102593    .3787808     -0.82    0.413     -1.052656     .4321375
             50  |   -.7072097    .3359897     -2.10    0.035     -1.365737    -.0486821
             51  |   -.7072097    .3359897     -2.10    0.035     -1.365737    -.0486821
             52  |    1.362816    .6813861      2.00    0.045      .0273243     2.698309
             53  |    1.362816    .6813861      2.00    0.045      .0273243     2.698309
             54  |     .882625    .8619939      1.02    0.306     -.8068519     2.572102
             55  |     .882625    .8619939      1.02    0.306     -.8068519     2.572102
             56  |    .6220415    .8632384      0.72    0.471     -1.069875     2.313958
             57  |    .6220415    .8632384      0.72    0.471     -1.069875     2.313958
             58  |    .5303854    .8640762      0.61    0.539     -1.163173     2.223944
             59  |    .5303854    .8640762      0.61    0.539     -1.163173     2.223944
             60  |    .5303854    .8469263      0.63    0.531      -1.12956      2.19033
             61  |    .5303854    .8469263      0.63    0.531      -1.12956      2.19033
             62  |     .131124     .861489      0.15    0.879     -1.557363     1.819611
             63  |     .131124     .861489      0.15    0.879     -1.557363     1.819611
             64  |    .2366852    .8588616      0.28    0.783     -1.446652     1.920023
             65  |    .2366852    .8588616      0.28    0.783     -1.446652     1.920023
             66  |    .0766041    .8719383      0.09    0.930     -1.632364     1.785572
             67  |    .0766041    .8719383      0.09    0.930     -1.632364     1.785572
             68  |    .2366852    .8713417      0.27    0.786     -1.471113     1.944484
             69  |    .2366852    .8713417      0.27    0.786     -1.471113     1.944484
             70  |    .2366852    .8715633      0.27    0.786     -1.471547     1.944918
             71  |    .2366852    .8715633      0.27    0.786     -1.471547     1.944918
             72  |    .5765524    .8633231      0.67    0.504      -1.11553     2.268635
             73  |    .5765524    .8633231      0.67    0.504      -1.11553     2.268635
             74  |   -.0928625     .884562     -0.10    0.916     -1.826572     1.640847
             75  |   -.0928625     .884562     -0.10    0.916     -1.826572     1.640847
             76  |    .1177613    .8716942      0.14    0.893     -1.590728     1.826251
             77  |    .1177613    .8716942      0.14    0.893     -1.590728     1.826251
             78  |    .3517337    .8778938      0.40    0.689     -1.368907     2.072374
             79  |    .3517337    .8778938      0.40    0.689     -1.368907     2.072374
             80  |    .3517337    .8624169      0.41    0.683     -1.338572      2.04204
             81  |    .3517337    .8624169      0.41    0.683     -1.338572      2.04204
             82  |    .3139701    .8552426      0.37    0.714     -1.362275     1.990215
             83  |    .3139701    .8552426      0.37    0.714     -1.362275     1.990215
             84  |    .2757403    .8659415      0.32    0.750     -1.421474     1.972954
             85  |    .2757403    .8659415      0.32    0.750     -1.421474     1.972954
             86  |    .1978049    .8655971      0.23    0.819     -1.498734     1.894344
             87  |    .1978049    .8655971      0.23    0.819     -1.498734     1.894344
             88  |    .4259339    .8578219      0.50    0.620     -1.255366     2.107234
             89  |    .4259339    .8578219      0.50    0.620     -1.255366     2.107234
             90  |    .3517337    .8608303      0.41    0.683     -1.335463      2.03893
             91  |    .3517337    .8608303      0.41    0.683     -1.335463      2.03893
             92  |    .4984745     .854456      0.58    0.560     -1.176228     2.173177
             93  |    .4984745     .854456      0.58    0.560     -1.176228     2.173177
             94  |    .6390486    .8559985      0.75    0.455     -1.038678     2.316775
             95  |    .6390486    .8559985      0.75    0.455     -1.038678     2.316775
             96  |      .93692    .8559495      1.09    0.274     -.7407102      2.61455
             97  |      .93692    .8559495      1.09    0.274     -.7407102      2.61455
             98  |      .93692    .8583304      1.09    0.275     -.7453767     2.619217
             99  |    .9607917    .8597062      1.12    0.264     -.7242016     2.645785
            100  |    1.087347    .8590004      1.27    0.206     -.5962631     2.770957
            101  |    1.162034    .8662673      1.34    0.180     -.5358189     2.859887
                 |
           agegp |
     43 thru 55  |    .0955223    .3794683      0.25    0.801     -.6482219     .8392665
     56 thru 84  |   -.2591783    .4827095     -0.54    0.591     -1.205272     .6869151
                 |
           marrw |
0. not answered  |           0   (empty)
2. cohabitating  |     .486391    .8315091      0.58    0.559     -1.143337     2.116119
     3. married  |    .4826492    .7868345      0.61    0.540     -1.059518     2.024817
   4. separated  |    .5858813    .9891346      0.59    0.554     -1.352787     2.524549
    5. divorced  |   -.4036786    1.047237     -0.39    0.700     -2.456225     1.648867
     6. widowed  |           0   (omitted)
                 |
          childw |   -.2988718    .1662029     -1.80    0.072     -.6246235     .0268799
                 |
           emplw |
   2. part time  |     .352751     .305183      1.16    0.248     -.2453966     .9508987
   3. voluntary  |           0   (empty)
     4. retired  |     2.09604    .9234125      2.27    0.023      .2861847     3.905895
  5. unemployed  |    .4178027    1.136876      0.37    0.713     -1.810433     2.646039
                 |
           occ1w |    12.57135    1.923682      6.54    0.000      8.801007      16.3417
           occ2w |    12.62489    1.729476      7.30    0.000      9.235182      16.0146
           occ3w |    13.15503    1.355881      9.70    0.000      10.49755      15.8125
           occ4w |    12.23778    1.291527      9.48    0.000      9.706435     14.76913
           occ5w |    11.64691    1.868417      6.23    0.000      7.984878     15.30894
           occ6w |    13.67588      1.6272      8.40    0.000      10.48663     16.86514
           occ7w |    10.50619    1.688191      6.22    0.000      7.197399     13.81499
           occ8w |    10.56646     2.27145      4.65    0.000      6.114503     15.01843
           inc1w |   -.1942777    .8278201     -0.23    0.814     -1.816775      1.42822
           inc2w |   -.3006133    .7387171     -0.41    0.684     -1.748472     1.147246
           inc3w |   -.4346915    .6702232     -0.65    0.517     -1.748305     .8789219
           inc4w |   -1.186416    1.092229     -1.09    0.277     -3.327145     .9543134
             jsw |    -.000547    .0060797     -0.09    0.928      -.012463      .011369
            deaw |    .2858439    .1237511      2.31    0.021      .0432962     .5283917
           dvcew |    1.211788    .5689654      2.13    0.033      .0966365      2.32694
           sepaw |     .756017    .5188355      1.46    0.145     -.2608819     1.772916
           accdw |    .3239663    .2470655      1.31    0.190     -.1602733     .8082059
           cataw |   -.2318532    .3550074     -0.65    0.514     -.9276548     .4639485
            illw |       .4706    .1333866      3.53    0.000      .2091671      .732033
           movew |    .0522263    .2241395      0.23    0.816      -.387079     .4915316
          shjobw |   -.0006645    .0036556     -0.18    0.856     -.0078294     .0065005
          shfamw |   -.0006419       .0042     -0.15    0.879     -.0088736     .0075899
           shhlw |   -.0115644    .0036753     -3.15    0.002      -.018768    -.0043609
         shfincw |   -.0068241    .0050246     -1.36    0.174     -.0166722      .003024
         shhousw |    .0051863     .003411      1.52    0.128     -.0014991     .0118718
         shrelaw |      .01483    .0050604      2.93    0.003      .0049117     .0247482
          suprtw |    .0014472    .0030806      0.47    0.639     -.0045907      .007485
          suchrw |   -.0052225    .0030511     -1.71    0.087     -.0112026     .0007577
          dafter |   -.0011695    .0012216     -0.96    0.338     -.0035639     .0012248
           toxic |   -.0071789    .0043245     -1.66    0.097     -.0156547     .0012969
          repair |    .0051574    .0039845      1.29    0.196     -.0026521     .0129668
            skin |    .0085179     .003297      2.58    0.010      .0020559       .01498
            near |    .0175647    .0051646      3.40    0.001      .0074422     .0276872
           cloud |   -.0076486    .0043212     -1.77    0.077      -.016118     .0008209
           world |   -.0077171    .0072381     -1.07    0.286     -.0219035     .0064693
        healthef |    .0341628    .0161062      2.12    0.034      .0025953     .0657303
          carcin |   -.0308331     .015335     -2.01    0.044     -.0608892     -.000777
           woman |    .0077282    .0057223      1.35    0.177     -.0034873     .0189438
         saferad |    .0025819    .0039309      0.66    0.511     -.0051224     .0102863
         goodrad |   -.0010726    .0040068     -0.27    0.789     -.0089258     .0067806
         kzchorn |   -.0018994    .0064386     -0.30    0.768     -.0145189       .01072
         kzunder |    .0066128    .0063153      1.05    0.295      -.005765     .0189907
          chsize |   -.0040209    .0057172     -0.70    0.482     -.0152265     .0071847
         icdxcnt |    .1251483     .089825      1.39    0.164     -.0509055     .3012022
           WHPel |    .0213939    .0055438      3.86    0.000      .0105282     .0322595
         WHPpain |   -.0106222    .0119312     -0.89    0.373     -.0340069     .0127625
           WHPer |   -.0263321    .0155815     -1.69    0.091     -.0568713      .004207
        WHPsleep |    .0002245    .0070294      0.03    0.975     -.0135529     .0140019
       WHPsociso |    .0289984    .0067058      4.32    0.000      .0158553     .0421414
           WHPpa |    .0152802    .0099529      1.54    0.125     -.0042271     .0347875
         HP2work |   -.2003475    .3148746     -0.64    0.525     -.8174904     .4167954
       HP2hmcare |    .2852139    .2868899      0.99    0.320       -.27708     .8475078
      HP2probsoc |   -.0348374    .4143186     -0.08    0.933     -.8468869      .777212
        HP2pbfhm |   -.7876585     .530283     -1.49    0.137     -1.826994      .251677
       HP2sxlife |   -.8980242    .3662001     -2.45    0.014     -1.615763    -.1802851
       HP2inthob |    .1149295    .4568965      0.25    0.801     -.7805711      1.01043
       HP2vacatn |    .3514914    .4480738      0.78    0.433     -.5267171       1.2297
          goferw |   -.0028582     .005721     -0.50    0.617     -.0140712     .0083547
          fdferw |    .0117382    .0050758      2.31    0.021      .0017898     .0216866
          trgovw |    -.003061    .0046521     -0.66    0.511     -.0121789     .0060569
          trrepw |    .0114954    .0042028      2.74    0.006      .0032581     .0197327
           defnw |   -.0180711    .0042359     -4.27    0.000     -.0263732     -.009769
          efradw |    .0008515    .0034791      0.24    0.807     -.0059674     .0076703
           ecprw |    .0000153    .0034826      0.00    0.996     -.0068105     .0068412
          polprw |    .0004092    .0038349      0.11    0.915     -.0071071     .0079256
            airw |    .0028976    .0036415      0.80    0.426     -.0042396     .0100348
            radw |      .00558    .0044925      1.24    0.214     -.0032251     .0143851
          radchw |   -.0128731    .0050011     -2.57    0.010      -.022675    -.0030711
          radtlw |     .005115    .0047068      1.09    0.277     -.0041102     .0143401
          radhlw |    .0034277    .0091542      0.37    0.708     -.0145142     .0213695
          radfmw |    .0148885    .0086119      1.73    0.084     -.0019906     .0317676
          dauthw |    .0153345    .0070458      2.18    0.030       .001525     .0291441
            medw |   -.0085065    .0075976     -1.12    0.263     -.0233975     .0063845
            neiw |     .003981    .0050666      0.79    0.432     -.0059494     .0139115
     avgcumdosew |    .0404296    .0592275      0.68    0.495     -.0756543     .1565134
           _cons |   -18.00134    1.986496     -9.06    0.000      -21.8948    -14.10787
-----------------+----------------------------------------------------------------

.
.
. title first trimmed male model :trim at .15


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                               first                                 *****
*****                              trimmed                                *****
*****                                male                                 *****
*****                               model                                 *****
*****                               :trim                                 *****
*****                                 at                                  *****
*****                                .15                                  *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:40:17  *****
*******************************************************************************
*******************************************************************************


.
. logit depind i.date i.agegp ///
>        i.emplw occ1w-occ8w  ///
>       deaw dvcew accdw illw movew  shhlw  shhousw shrelaw  suchrw   ///
>           toxic skin near cloud world WHPel WHPer WHPsociso WHPpa HP2sxlife ///
>           fdferw defnw radchw radfmw dauthw icdxcnt avgcumdosew ///
>           if gender==1, vce(cluster id) nolog
note: 0.emplw != 0 predicts failure perfectly
      0.emplw dropped and 48 obs not used

note: 3.emplw != 0 predicts failure perfectly
      3.emplw dropped and 34 obs not used

note: 5.emplw omitted because of collinearity

Logistic regression                               Number of obs   =      20594
                                                  Wald chi2(71)   =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -6508.7778                 Pseudo R2       =     0.3045

(Std. Err. adjusted for 338 clusters in id)
-----------------+----------------------------------------------------------------
                 |               Robust
           depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-----------------+----------------------------------------------------------------
            date |
             41  |    1.28e-15           .         .        .             .            .
             42  |    .0704693    .2117076      0.33    0.739       -.34447     .4854086
             43  |    .0704693    .2117076      0.33    0.739       -.34447     .4854086
             44  |   -.0741164    .2461081     -0.30    0.763     -.5564794     .4082465
             45  |   -.0741164    .2461081     -0.30    0.763     -.5564794     .4082465
             46  |    1.61e-15    .2505557      0.00    1.000     -.4910802     .4910802
             47  |    1.06e-15    .2505557      0.00    1.000     -.4910802     .4910802
             48  |    1.62e-15     .228725      0.00    1.000     -.4482929     .4482929
             49  |    1.64e-15     .228725      0.00    1.000     -.4482929     .4482929
             50  |    .1376817    .2178747      0.63    0.527      -.289345     .5647083
             51  |    .1376817    .2178747      0.63    0.527      -.289345     .5647083
             52  |    1.424908    .3856727      3.69    0.000      .6690036     2.180813
             53  |    1.424908    .3856727      3.69    0.000      .6690036     2.180813
             54  |    .9907097    .4373141      2.27    0.023      .1335898      1.84783
             55  |    .9907097    .4373141      2.27    0.023      .1335898      1.84783
             56  |    .8799361    .4484731      1.96    0.050      .0009449     1.758927
             57  |    .8799361    .4484731      1.96    0.050      .0009449     1.758927
             58  |    .8515618    .4419987      1.93    0.054     -.0147398     1.717863
             59  |    .8515618    .4419987      1.93    0.054     -.0147398     1.717863
             60  |     .822896    .4276131      1.92    0.054     -.0152104     1.661002
             61  |     .822896    .4276131      1.92    0.054     -.0152104     1.661002
             62  |    .5176243    .4375291      1.18    0.237     -.3399169     1.375166
             63  |    .5176243    .4375291      1.18    0.237     -.3399169     1.375166
             64  |    .6131271    .4429374      1.38    0.166     -.2550143     1.481268
             65  |    .6131271    .4429374      1.38    0.166     -.2550143     1.481268
             66  |    .6131271    .4458551      1.38    0.169     -.2607329     1.486987
             67  |    .6131271    .4458551      1.38    0.169     -.2607329     1.486987
             68  |    .6131271    .4365381      1.40    0.160     -.2424719     1.468726
             69  |    .6131271    .4365381      1.40    0.160     -.2424719     1.468726
             70  |    .5817057    .4312405      1.35    0.177     -.2635103     1.426922
             71  |    .5817057    .4312405      1.35    0.177     -.2635103     1.426922
             72  |    .9080287    .4212959      2.16    0.031       .082304     1.733753
             73  |    .9080287    .4212959      2.16    0.031       .082304     1.733753
             74  |    .3647513    .4571471      0.80    0.425     -.5312407     1.260743
             75  |    .3647513    .4571471      0.80    0.425     -.5312407     1.260743
             76  |    .5287814    .4606024      1.15    0.251     -.3739826     1.431545
             77  |    .5287814    .4606024      1.15    0.251     -.3739826     1.431545
             78  |    .6585147     .459197      1.43    0.152     -.2414948     1.558524
             79  |    .6585147     .459197      1.43    0.152     -.2414948     1.558524
             80  |    .7088715    .4580299      1.55    0.122     -.1888505     1.606594
             81  |    .7088715    .4580299      1.55    0.122     -.1888505     1.606594
             82  |    .6585147    .4519639      1.46    0.145     -.2273183     1.544348
             83  |    .6585147    .4519639      1.46    0.145     -.2273183     1.544348
             84  |    .5813685    .4593854      1.27    0.206     -.3190104     1.481747
             85  |    .5813685    .4593854      1.27    0.206     -.3190104     1.481747
             86  |    .5551956     .458895      1.21    0.226     -.3442222     1.454613
             87  |    .5551956     .458895      1.21    0.226     -.3442222     1.454613
             88  |    .7088715    .4589345      1.54    0.122     -.1906237     1.608367
             89  |    .7088715    .4589345      1.54    0.122     -.1906237     1.608367
             90  |    .6585147    .4549932      1.45    0.148     -.2332556     1.550285
             91  |    .6585147    .4549932      1.45    0.148     -.2332556     1.550285
             92  |    .8072334    .4545642      1.78    0.076     -.0836962     1.698163
             93  |    .8072334    .4545642      1.78    0.076     -.0836962     1.698163
             94  |    .9027531    .4530171      1.99    0.046      .0148558      1.79065
             95  |    .9027531    .4530171      1.99    0.046      .0148558      1.79065
             96  |    1.108811    .4566281      2.43    0.015      .2138363     2.003786
             97  |    1.108811    .4566281      2.43    0.015      .2138363     2.003786
             98  |    1.240443    .4508141      2.75    0.006      .3568634     2.124022
             99  |     1.16695    .4580442      2.55    0.011      .2692001       2.0647
            100  |    1.211679    .4675035      2.59    0.010      .2953889     2.127969
            101  |    1.314436    .4726856      2.78    0.005      .3879897     2.240883
                 |
           agegp |
     43 thru 55  |     .094417    .3254473      0.29    0.772      -.543448      .732282
     56 thru 84  |    -.014255    .3972615     -0.04    0.971     -.7928733     .7643633
                 |
           emplw |
0. not answered  |           0   (empty)
   1. full time  |   -1.250313    1.013791     -1.23    0.217     -3.237307     .7366819
   2. part time  |   -1.074533    1.023487     -1.05    0.294      -3.08053      .931465
   3. voluntary  |           0   (empty)
     4. retired  |    -1.04043    .7683113     -1.35    0.176     -2.546292     .4654324
  5. unemployed  |           0   (omitted)
                 |
           occ1w |   -.4966303    .5442951     -0.91    0.362     -1.563429     .5701685
           occ2w |   -.2898113    .5448775     -0.53    0.595     -1.357752     .7781289
           occ3w |   -.1027273    .6197819     -0.17    0.868     -1.317477     1.112023
           occ4w |   -.9569006    .5699999     -1.68    0.093      -2.07408     .1602787
           occ5w |   -1.474855    .5760235     -2.56    0.010      -2.60384    -.3458696
           occ6w |    .1548609      .70258      0.22    0.826     -1.222171     1.531892
           occ7w |   -1.117206    .7327977     -1.52    0.127     -2.553463     .3190516
           occ8w |   -2.302921    .9370254     -2.46    0.014     -4.139457    -.4663851
            deaw |    .2855094    .1161378      2.46    0.014      .0578835     .5131353
           dvcew |    .3083896    .3643017      0.85    0.397     -.4056286     1.022408
           accdw |    .2654391    .2440357      1.09    0.277     -.2128621     .7437404
            illw |    .5067468    .1128328      4.49    0.000      .2855985     .7278951
           movew |     .024309     .228052      0.11    0.915     -.4226648     .4712828
           shhlw |   -.0070157    .0036942     -1.90    0.058     -.0142562     .0002249
         shhousw |    .0041958    .0038153      1.10    0.271      -.003282     .0116736
         shrelaw |    .0102257    .0031255      3.27    0.001      .0040999     .0163516
          suchrw |    -.007564    .0022888     -3.30    0.001     -.0120499    -.0030781
           toxic |    -.004661    .0034346     -1.36    0.175     -.0113927     .0020707
            skin |    .0106405    .0029535      3.60    0.000      .0048518     .0164292
            near |    .0167716    .0040915      4.10    0.000      .0087525     .0247908
           cloud |   -.0000588    .0030824     -0.02    0.985     -.0061002     .0059827
           world |   -.0012898    .0053138     -0.24    0.808     -.0117046     .0091251
           WHPel |    .0162199    .0043693      3.71    0.000      .0076563     .0247835
           WHPer |   -.0090027     .009273     -0.97    0.332     -.0271774     .0091721
       WHPsociso |    .0144906    .0058068      2.50    0.013      .0031095     .0258717
           WHPpa |    .0094946    .0090876      1.04    0.296     -.0083168      .027306
       HP2sxlife |   -.9050585    .3212879     -2.82    0.005     -1.534771    -.2753457
          fdferw |    .0091517    .0034354      2.66    0.008      .0024185      .015885
           defnw |   -.0085389    .0032793     -2.60    0.009     -.0149662    -.0021116
          radchw |    -.007316    .0032479     -2.25    0.024     -.0136818    -.0009502
          radfmw |    .0145336    .0040625      3.58    0.000      .0065712      .022496
          dauthw |    .0066023    .0032138      2.05    0.040      .0003034     .0129012
         icdxcnt |    .1651952    .0798654      2.07    0.039      .0086619     .3217285
     avgcumdosew |    .0041136    .0196349      0.21    0.834     -.0343701     .0425973
           _cons |   -3.578203     1.41687     -2.53    0.012     -6.355218    -.8011885
-----------------+----------------------------------------------------------------

.
. cap drop devm

. cap drop malepred

. title second trimmed male model : trimming at .1


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                               second                                *****
*****                              trimmed                                *****
*****                                male                                 *****
*****                               model                                 *****
*****                                 :                                   *****
*****                              trimming                               *****
*****                                 at                                  *****
*****                                 .1                                  *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:40:20  *****
*******************************************************************************
*******************************************************************************


. logit depind i.date  occ4w occ5w occ8w deaw illw  shhlw shrelaw  suchrw   ///
>            skin near WHPel WHPsociso  HP2sxlife fdferw defnw radchw radfmw ///
>            icdxcnt ///
>           if gender==1, vce(cluster id) nolog

Logistic regression                               Number of obs   =      20704
                                                  Wald chi2(50)   =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -6735.2834                 Pseudo R2       =     0.2819

(Std. Err. adjusted for 338 clusters in id)
-------------+----------------------------------------------------------------
             |               Robust
       depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        date |
         41  |   -1.77e-15           .         .        .             .            .
         42  |    .0675046    .2028105      0.33    0.739     -.3299967     .4650058
         43  |    .0675046    .2028105      0.33    0.739     -.3299967     .4650058
         44  |   -.0710185    .2358094     -0.30    0.763     -.5331963     .3911594
         45  |   -.0710185    .2358094     -0.30    0.763     -.5331963     .3911594
         46  |   -1.97e-15    .2400475     -0.00    1.000     -.4704844     .4704844
         47  |   -2.09e-15    .2400475     -0.00    1.000     -.4704844     .4704844
         48  |   -1.18e-15    .2191323     -0.00    1.000     -.4294915     .4294915
         49  |   -1.73e-15    .2191323     -0.00    1.000     -.4294915     .4294915
         50  |    .1318723    .2087132      0.63    0.527     -.2771979     .5409426
         51  |    .1318723    .2087132      0.63    0.527     -.2771979     .5409426
         52  |    1.350438     .363192      3.72    0.000      .6385943     2.062281
         53  |    1.350438     .363192      3.72    0.000      .6385943     2.062281
         54  |    1.004635    .4204877      2.39    0.017      .1804945     1.828776
         55  |    1.004635    .4204877      2.39    0.017      .1804945     1.828776
         56  |    .8974399    .4293206      2.09    0.037       .055987     1.738893
         57  |    .8974399    .4293206      2.09    0.037       .055987     1.738893
         58  |    .8699463    .4197891      2.07    0.038      .0471749     1.692718
         59  |    .8699463    .4197891      2.07    0.038      .0471749     1.692718
         60  |    .8421557    .4098872      2.05    0.040      .0387916      1.64552
         61  |    .8421557    .4098872      2.05    0.040      .0387916      1.64552
         62  |    .5453228    .4197878      1.30    0.194     -.2774462     1.368092
         63  |    .5453228    .4197878      1.30    0.194     -.2774462     1.368092
         64  |    .6383552    .4239982      1.51    0.132      -.192666     1.469376
         65  |    .6383552    .4239982      1.51    0.132      -.192666     1.469376
         66  |    .6383552    .4289782      1.49    0.137     -.2024267     1.479137
         67  |    .6383552    .4289782      1.49    0.137     -.2024267     1.479137
         68  |    .6383552     .423796      1.51    0.132     -.1922698      1.46898
         69  |    .6383552     .423796      1.51    0.132     -.1922698      1.46898
         70  |    .6077633    .4142689      1.47    0.142     -.2041889     1.419715
         71  |    .6077633    .4142689      1.47    0.142     -.2041889     1.419715
         72  |    .9246463    .4040612      2.29    0.022      .1327008     1.716592
         73  |    .9246463    .4040612      2.29    0.022      .1327008     1.716592
         74  |    .2943891    .4277264      0.69    0.491     -.5439392     1.132717
         75  |    .2943891    .4277264      0.69    0.491     -.5439392     1.132717
         76  |    .4561565    .4305416      1.06    0.289     -.3876896     1.300003
         77  |    .4561565    .4305416      1.06    0.289     -.3876896     1.300003
         78  |    .5836344    .4294723      1.36    0.174      -.258116     1.425385
         79  |    .5836344    .4294723      1.36    0.174      -.258116     1.425385
         80  |    .6330022    .4290049      1.48    0.140     -.2078318     1.473836
         81  |    .6330022    .4290049      1.48    0.140     -.2078318     1.473836
         82  |    .5836344    .4254136      1.37    0.170     -.2501609      1.41743
         83  |    .5836344    .4254136      1.37    0.170     -.2501609      1.41743
         84  |    .5078797    .4281635      1.19    0.236     -.3313053     1.347065
         85  |    .5078797    .4281635      1.19    0.236     -.3313053     1.347065
         86  |    .4821453    .4277265      1.13    0.260     -.3561832     1.320474
         87  |    .4821453    .4277265      1.13    0.260     -.3561832     1.320474
         88  |    .6330022    .4302496      1.47    0.141     -.2102714     1.476276
         89  |    .6330022    .4302496      1.47    0.141     -.2102714     1.476276
         90  |    .5836344     .425808      1.37    0.170      -.250934     1.418203
         91  |    .5836344     .425808      1.37    0.170      -.250934     1.418203
         92  |    .7292477    .4254435      1.71    0.087     -.1046063     1.563102
         93  |    .7292477    .4254435      1.71    0.087     -.1046063     1.563102
         94  |    .8224783    .4259516      1.93    0.053     -.0123716     1.657328
         95  |    .8224783    .4259516      1.93    0.053     -.0123716     1.657328
         96  |     1.02282     .428044      2.39    0.017      .1838694     1.861771
         97  |     1.02282     .428044      2.39    0.017      .1838694     1.861771
         98  |    1.150258    .4214663      2.73    0.006      .3241991     1.976317
         99  |    1.057752    .4281966      2.47    0.014      .2185023     1.897002
        100  |    1.098288     .437333      2.51    0.012      .2411313     1.955445
        101  |    1.175135    .4440675      2.65    0.008      .3047784     2.045491
             |
       occ4w |   -.7006686    .3064548     -2.29    0.022     -1.301309    -.1000283
       occ5w |   -1.278382    .3191154     -4.01    0.000     -1.903837    -.6529273
       occ8w |    -1.41308    .4012691     -3.52    0.000     -2.199553    -.6266068
        deaw |    .3281548    .1337682      2.45    0.014      .0659738     .5903357
        illw |    .4549669     .105175      4.33    0.000      .2488276     .6611062
       shhlw |   -.0033025    .0030317     -1.09    0.276     -.0092445     .0026395
     shrelaw |     .009187    .0031143      2.95    0.003       .003083     .0152909
      suchrw |    -.007302    .0021312     -3.43    0.001     -.0114792    -.0031249
        skin |    .0097691    .0028728      3.40    0.001      .0041384     .0153997
        near |    .0145796    .0037672      3.87    0.000      .0071961     .0219632
       WHPel |    .0157299     .003673      4.28    0.000       .008531     .0229288
   WHPsociso |    .0130051    .0052089      2.50    0.013      .0027959     .0232143
   HP2sxlife |   -1.064121     .295893     -3.60    0.000     -1.644061    -.4841818
      fdferw |     .006299    .0034665      1.82    0.069     -.0004951     .0130932
       defnw |   -.0073618    .0030411     -2.42    0.015     -.0133223    -.0014013
      radchw |    -.005643    .0031759     -1.78    0.076     -.0118678     .0005817
      radfmw |    .0139996    .0039014      3.59    0.000       .006353     .0216461
     icdxcnt |    .1664108    .0821774      2.03    0.043       .005346     .3274756
       _cons |   -4.862108    .5722455     -8.50    0.000     -5.983689    -3.740527
-------------+----------------------------------------------------------------

. predict devm, deviance
(22820 missing values generated)

. predict malepred, xb
(138 missing values generated)

. tsline malepred if gender==1, title(Male Baseline logits) || lowess malepred date

. estat gof


Logistic model for depind, goodness-of-fit test


       number of observations =     20704
 number of covariate patterns =     20540
          Pearson chi2(20460) =     20662.63
                  Prob > chi2 =         0.1582

. estat class

Logistic model for depind

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |      1180           674  |       1854
     -     |      2302         16548  |      18850
-----------+--------------------------+-----------
   Total   |      3482         17222  |      20704

Classified + if predicted Pr(D) >= .5
True D defined as depind != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   33.89%
Specificity                     Pr( -|~D)   96.09%
Positive predictive value       Pr( D| +)   63.65%
Negative predictive value       Pr(~D| -)   87.79%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    3.91%
False - rate for true D         Pr( -| D)   66.11%
False + rate for classified +   Pr(~D| +)   36.35%
False - rate for classified -   Pr( D| -)   12.21%
--------------------------------------------------
Correctly classified                        85.63%
--------------------------------------------------

. lroc

Logistic model for depind

number of observations =    20704
area under ROC curve   =   0.8567

.
. // using Sophia Rabe Hasketh and Andre Skrondale's code in vol 2 of third ed.
. // Multilevel and Longitudinal Modeling using Stata Stata Press (p.762)
.
. cap drop ln_one_m_hazm

. cap drop ln_survm

. cap drop survm

. gen ln_one_m_hazm = ln(1 - invlogit(malepred))
(138 missing values generated)

. by id (date), sort: gen ln_survm = sum(ln_one_m_hazm)

. gen survm = exp(ln_survm)

.
. twoway (line survm date if id==8, connect(stairstep) lpattern(solid)) ///
> (line survm date if id==244, connect(stairstep) lpattern(dash)), ///
>   xtitle(date) ytitle(Survival probability) legend(off) ///
>   tline(1986h1) title(Comparing id 8 with id 244)

.
.
. des depind date agegp ///
>    marrw childw emplw occ1w-occ8w  ///
>     inc1w inc2w inc3w inc4w jsw deaw dvcew sepaw accdw ///
>          cataw illw movew shjobw shfamw shhlw shfincw shhousw shrelaw suprtw suchrw   ///
>          dafter toxic-icdxcnt WHPel-HP2vacatn goferw-neiw ///
>           avgcumdosew

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


depind            float     %9.0g                       Drepression indicator


date              float     %th                         Half-year date


agegp             float     %10.0g       ag             Age group


marrw             float     %15.0g       LABH           cohabitation/marital status


childw            float     %9.0g                       number of children


emplw             float     %15.0g       LABI           mode of employment


occ1w             float     %15.0g       LABJ           profess executive administration


occ2w             float     %15.0g       LABJ           technical sales admin support


occ3w             float     %15.0g       LABJ           service occup protective services


occ4w             float     %15.0g       LABJ           precision prod mechan craft construction


occ5w             float     %15.0g       LABJ           factory laborer machinist transp cleaner


occ6w             float     %15.0g       LABJ           farming agricul forestry fishing trapping logging


occ7w             float     %15.0g       LABJ           homemaking or caregiving


occ8w             float     %15.0g       LABJ           student


inc1w             float     %15.0g       LABJ           Income is not sufficient for basic neccessities


inc2w             float     %15.0g       LABJ           Income is just sufficient for basic neccessities


inc3w             float     %15.0g       LABJ           Income is sufficient for basics plus extra purchases/savings


inc4w             float     %15.0g       LABJ           Income allows to comfortably afford luxury items


jsw               float     %9.0g                       Job satisfaction on a scale of 0-100% in


deaw              float     %9.0g                       Total number of death experienced in time period


dvcew             float     %9.0g                       Total number of divorces experienced in time period


sepaw             float     %9.0g                       Total number of separations experienced in time period


accdw             float     %9.0g                       Total number of accidents experienced in time period


cataw             float     %9.0g                       Total number of disasters experienced in time period


illw              float     %9.0g                       Total number of illnesses experienced in time period


movew             float     %9.0g                       Total number of moves experienced in time period


shjobw            float     %9.0g                       Percentage of strains and hassles related to job


shfamw            float     %9.0g                       Percentage of strains and hassles related to family


shhlw             float     %9.0g                       Percentage of strains and hassles related to health


shfincw           float     %9.0g                       Percentage of strains and hassles related to finances


shhousw           float     %9.0g                       Percentage of strains and hassles related to housing


shrelaw           float     %9.0g                       Percentage of strains and hassles related to relationships


suprtw            float     %9.0g                       Level of support (in percent) from partner


suchrw            float     %9.0g                       Level of support (in percent) from Chernobyl survivor benefits


dafter            int       %8.0g                   *   #days lapsed after Chornobyl accident before you heard about the acc


toxic             byte      %8.0g                       all radioactive materials remain toxic for thousands of years (% of agree)


repair            byte      %8.0g                   *    body has capability to repair tissue damage caused by exposure (% of agree)


skin              byte      %8.0g                       a suntan is caused by radiating damage to the skin (% of agree)


near              byte      %8.0g                   *   radiation from a nuclear plant is more concentrated near the plant (% of agree)


cloud             byte      %8.0g                   *   radioactive fallout is only harmful when visible (% of agree)


world             byte      %8.0g                   *   the chornobyl accident has affected people around the world(% of agree)


healthef          byte      %8.0g                   *   a person exposed to any radiation  likely to suffer from (% of agree)


carcin            byte      %8.0g                   *   a person exposed to carcinogen  is likely to get cancer (% of agree)


woman             byte      %8.0g                   *   pregnant exposed to radiation likely  birth to children with deffects (% agree)


saferad           byte      %8.0g                       there is no safe level of radiation (% of agree)


goodrad           byte      %8.0g                       small doses can actually improve one's health(% of agree)


kzchorn           byte      %8.0g                   *   in k/z most cancerare known to be caused by radiation from Chern (% of agree)


kzunder           byte      %8.0g                       people in k/z underestimate the risks assoicated with radiation (% of agree)


chsize            byte      %8.0g                   *   rad. fallout fr Cher affected mr ppl than the rad from other sites (% of agree)


icdxcnt           float     %9.0g                       count of icdx illnesses


WHPel             float     %9.0g                       Wtd Health Profile Pt 1 Energy Level Subscale


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


WHPer             float     %9.0g                       Wtd Health Profile Emotional reaction Pt 1 subscale


WHPsleep          float     %9.0g                       Wtd Health Profile Sleep Pt 1 subscale


WHPsociso         float     %9.0g                       Wtd Health Profile Social Isolation Pt 1 subscale


WHPpa             float     %9.0g                       Wtd Health Profile Physical Ability Pt 1 Subscale


HP2work           float     %9.0g        hp2fmt         Nottingham Health profile subscale Part2: paid employment


HP2hmcare         float     %9.0g        hp2fmt         Hlth profile Pt2: Home cleaning, cooking and repairs


HP2probsoc        float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth causing probs with social life


HP2pbfhm          float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth causing probs with family members at home


HP2sxlife         float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth causing probs with sex life


HP2inthob         float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth probs interfering with interests & hobbies


HP2vacatn         float     %9.0g        hp2fmt         Hlth profile Pt2: Hlth probs interfering with vacations


goferw            float     %9.0g                       level of fear in percent from going outdoors


fdferw            float     %9.0g                       level of fear in percent from consuming foods contaminated with radiation


trgovw            float     %9.0g                       level of trust in government reports about chornobyl


trrepw            float     %9.0g                       level of trust in  medical/scientific reports about chornobyl


defnw             float     %9.0g                       consider hazardous (in per) - deficiencies in essential nutrition


efradw            float     %9.0g                       consider hazardous (in per) - effects of radiation


ecprw             float     %9.0g                       consider hazardous (in per) - economic problems


polprw            float     %9.0g                       consider hazardous (in per) - political problems


airw              float     %9.0g                       consider hazardous (in per) - air and water pollution


radw              float     %9.0g                       believed % of the radioactively contaminated area


radchw            float     %9.0g                       believed % of polution related to chornobyl


radtlw            float     %9.0g                       believed % of cumulated radiation exposed to in a lifetime


radhlw            float     %9.0g                       how much believed personal health is affected by radiation


radfmw            float     %9.0g                       how much believed family health is affected by radiation now


dauthw            float     %9.0g                       level of danger by authorities in %


medw              float     %9.0g                       level of danger by general media %


neiw              float     %9.0g                       level of danger by neighbors in  %


avgcumdosew       float     %9.0g                        avg mean dose of CS137 in mGy


.
. cap drop hazf

. title Baseline female discrete time logit model


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                              Baseline                               *****
*****                               female                                *****
*****                              discrete                               *****
*****                                time                                 *****
*****                               logit                                 *****
*****                               model                                 *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:41:21  *****
*******************************************************************************
*******************************************************************************


. set more off

. logit depind i.date if gender==2,

Iteration 0:   log likelihood = -10913.799
Iteration 1:   log likelihood = -10309.785
Iteration 2:   log likelihood = -10244.255
Iteration 3:   log likelihood = -10242.747
Iteration 4:   log likelihood = -10242.742
Iteration 5:   log likelihood = -10242.742

Logistic regression                               Number of obs   =      21942
                                                  LR chi2(61)     =    1342.11
                                                  Prob > chi2     =     0.0000
Log likelihood = -10242.742                       Pseudo R2       =     0.0615

-------------+----------------------------------------------------------------
       depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
        date |
         41  |   -8.46e-13    .3046947     -0.00    1.000     -.5971907     .5971907
         42  |   -.5995324    .3552459     -1.69    0.091     -1.295802     .0967368
         43  |   -.5995324    .3552459     -1.69    0.091     -1.295802     .0967368
         44  |   -.0968369     .311388     -0.31    0.756     -.7071461     .5134723
         45  |   -.0968369     .311388     -0.31    0.756     -.7071461     .5134723
         46  |   -.6824282    .3641453     -1.87    0.061      -1.39614     .0312834
         47  |   -.6824282    .3641453     -1.87    0.061      -1.39614     .0312834
         48  |   -.3832847     .334367     -1.15    0.252     -1.038632     .2720626
         49  |   -.3832847     .334367     -1.15    0.252     -1.038632     .2720626
         50  |   -.2027513    .3193086     -0.63    0.525     -.8285847     .4230821
         51  |   -.2027513    .3193086     -0.63    0.525     -.8285847     .4230821
         52  |    1.461816    .2493457      5.86    0.000      .9731074     1.950525
         53  |    1.461816    .2493457      5.86    0.000      .9731074     1.950525
         54  |    1.033583    .2587267      3.99    0.000      .5264876     1.540678
         55  |    1.033583    .2587267      3.99    0.000      .5264876     1.540678
         56  |    1.189374    .2548293      4.67    0.000      .6899178      1.68883
         57  |    1.189374    .2548293      4.67    0.000      .6899178      1.68883
         58  |    .9049022    .2624226      3.45    0.001      .3905633     1.419241
         59  |    .9049022    .2624226      3.45    0.001      .3905633     1.419241
         60  |    1.074063    .2576557      4.17    0.000      .5690674     1.579059
         61  |    1.074063    .2576557      4.17    0.000      .5690674     1.579059
         62  |    1.033583    .2587267      3.99    0.000      .5264876     1.540678
         63  |    1.033583    .2587267      3.99    0.000      .5264876     1.540678
         64  |    1.279377    .2528411      5.06    0.000      .7838181     1.774937
         65  |    1.279377    .2528411      5.06    0.000      .7838181     1.774937
         66  |    1.243978    .2536012      4.91    0.000       .746929     1.741027
         67  |    1.243978    .2536012      4.91    0.000       .746929     1.741027
         68  |    1.413925    .2501975      5.65    0.000      .9235469     1.904303
         69  |    1.413925    .2501975      5.65    0.000      .9235469     1.904303
         70  |    1.347979    .2514458      5.36    0.000      .8551543     1.840804
         71  |    1.347979    .2514458      5.36    0.000      .8551543     1.840804
         72  |    1.493056     .248814      6.00    0.000       1.00539     1.980723
         73  |    1.493056     .248814      6.00    0.000       1.00539     1.980723
         74  |    1.296794    .2524772      5.14    0.000       .801948     1.791641
         75  |    1.296794    .2524772      5.14    0.000       .801948     1.791641
         76  |    1.554017    .2478295      6.27    0.000       1.06828     2.039754
         77  |    1.554017    .2478295      6.27    0.000       1.06828     2.039754
         78  |    1.538959    .2480663      6.20    0.000      1.052758      2.02516
         79  |    1.538959    .2480663      6.20    0.000      1.052758      2.02516
         80  |    1.698689    .2457582      6.91    0.000      1.217012     2.180366
         81  |    1.698689    .2457582      6.91    0.000      1.217012     2.180366
         82  |     1.56896    .2475985      6.34    0.000      1.083675     2.054244
         83  |     1.56896    .2475985      6.34    0.000      1.083675     2.054244
         84  |    1.554017    .2478295      6.27    0.000       1.06828     2.039754
         85  |    1.554017    .2478295      6.27    0.000       1.06828     2.039754
         86  |    1.583789    .2473733      6.40    0.000      1.098947     2.068632
         87  |    1.583789    .2473733      6.40    0.000      1.098947     2.068632
         88  |    1.523781    .2483092      6.14    0.000      1.037104     2.010458
         89  |    1.523781    .2483092      6.14    0.000      1.037104     2.010458
         90  |    1.740227    .2452289      7.10    0.000      1.259588     2.220867
         91  |    1.740227    .2452289      7.10    0.000      1.259588     2.220867
         92  |    1.781014    .2447362      7.28    0.000       1.30134     2.260688
         93  |    1.781014    .2447362      7.28    0.000       1.30134     2.260688
         94  |    1.899378    .2434522      7.80    0.000      1.422221     2.376536
         95  |    1.899378    .2434522      7.80    0.000      1.422221     2.376536
         96  |    2.262668    .2407445      9.40    0.000      1.790818     2.734519
         97  |    2.262668    .2407445      9.40    0.000      1.790818     2.734519
         98  |     2.28569    .2406307      9.50    0.000      1.814063     2.757318
         99  |    2.090252    .2511065      8.32    0.000      1.598093     2.582412
        100  |    1.601957     .273567      5.86    0.000      1.065775     2.138138
        101  |    1.814202    .3327791      5.45    0.000      1.161967     2.466437
             |
       _cons |   -2.693451    .2154517    -12.50    0.000     -3.115729    -2.271174
-------------+----------------------------------------------------------------

. predict hazf, pr

. tsline hazf if gender==2, connect(stairstep) lpatt(solid) ///
>  title(Female Baseline hazard structure)

. tsline hazm hazf, connect(stairstep) lpattern(solid dash) ///
>  title(Male and female baseline hazard patterns) ///
>  tline(1986h1) ///
>  ttext( .2 1985h1 "1986 Chornobyl", orientation(vertical)) ///
>  caption("male = solid" "female=dash")

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

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

.
.
. set more off

. title Full female discrete time model


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                                Full                                 *****
*****                               female                                *****
*****                              discrete                               *****
*****                                time                                 *****
*****                               model                                 *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:41:29  *****
*******************************************************************************
*******************************************************************************


. logit depind i.date i.agegp ///
>   i.marrw childw i.emplw occ1w-occ8w  ///
>     inc1w inc2w inc3w inc4w jsw deaw dvcew sepaw accdw ///
>          cataw illw movew shjobw shfamw shhlw shfincw shhousw shrelaw suprtw suchrw   ///
>          dafter toxic-icdxcnt WHPel-HP2vacatn goferw-neiw ///
>           avgcumdosew if gender==2, vce(cluster id) nolog
note: occ8w omitted because of collinearity
note: inc4w omitted because of collinearity

Logistic regression                               Number of obs   =      13254
                                                  Wald chi2(115)  =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -4510.8829                 Pseudo R2       =     0.2207

(Std. Err. adjusted for 258 clusters in id)
---------------+----------------------------------------------------------------
               |               Robust
         depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
---------------+----------------------------------------------------------------
          date |
           41  |   -1.54e-15           .         .        .             .            .
           42  |   -.6057277    .3776368     -1.60    0.109     -1.345882     .1344268
           43  |   -.6057277    .3776368     -1.60    0.109     -1.345882     .1344268
           44  |   -.1747015    .2467882     -0.71    0.479     -.6583974     .3089944
           45  |   -.1747015    .2467882     -0.71    0.479     -.6583974     .3089944
           46  |   -1.257161    .4341196     -2.90    0.004      -2.10802    -.4063024
           47  |   -1.257161    .4341196     -2.90    0.004      -2.10802    -.4063024
           48  |   -.6057277    .4036792     -1.50    0.133     -1.396924      .185469
           49  |   -.6057277    .4036792     -1.50    0.133     -1.396924      .185469
           50  |   -1.058881    .4605758     -2.30    0.022     -1.961593    -.1561687
           51  |   -1.058881    .4605758     -2.30    0.022     -1.961593    -.1561687
           52  |    1.682442    .6137012      2.74    0.006      .4796101     2.885275
           53  |    1.682442    .6137012      2.74    0.006      .4796101     2.885275
           54  |   -.2839609    .6694551     -0.42    0.671     -1.596069     1.028147
           55  |   -.2839609    .6694551     -0.42    0.671     -1.596069     1.028147
           56  |   -.0604607    .6713377     -0.09    0.928     -1.376258     1.255337
           57  |   -.0604607    .6713377     -0.09    0.928     -1.376258     1.255337
           58  |   -.6518517    .6915503     -0.94    0.346     -2.007265     .7035619
           59  |   -.6518517    .6915503     -0.94    0.346     -2.007265     .7035619
           60  |   -.5384623    .6701537     -0.80    0.422      -1.85194     .7750149
           61  |   -.5384623    .6701537     -0.80    0.422      -1.85194     .7750149
           62  |   -.7116262     .674956     -1.05    0.292     -2.034516     .6112632
           63  |   -.7116262     .674956     -1.05    0.292     -2.034516     .6112632
           64  |   -.1031437    .6615767     -0.16    0.876      -1.39981     1.193523
           65  |   -.1031437    .6615767     -0.16    0.876      -1.39981     1.193523
           66  |   -.2371123    .6711114     -0.35    0.724     -1.552467     1.078242
           67  |   -.2371123    .6711114     -0.35    0.724     -1.552467     1.078242
           68  |   -.0604607    .6469764     -0.09    0.926     -1.328511      1.20759
           69  |   -.0604607    .6469764     -0.09    0.926     -1.328511      1.20759
           70  |   -.1914069    .6510272     -0.29    0.769     -1.467397     1.084583
           71  |   -.1914069    .6510272     -0.29    0.769     -1.467397     1.084583
           72  |    .1405319    .6660986      0.21    0.833     -1.164997     1.446061
           73  |    .1405319    .6660986      0.21    0.833     -1.164997     1.446061
           74  |   -.1897675     .696564     -0.27    0.785     -1.555008     1.175473
           75  |   -.1897675     .696564     -0.27    0.785     -1.555008     1.175473
           76  |    .2951498     .691693      0.43    0.670     -1.060544     1.650843
           77  |    .2951498     .691693      0.43    0.670     -1.060544     1.650843
           78  |    .1846299    .6663484      0.28    0.782     -1.121389     1.490649
           79  |    .1846299    .6663484      0.28    0.782     -1.121389     1.490649
           80  |     .500571    .6756744      0.74    0.459     -.8237266     1.824869
           81  |     .500571    .6756744      0.74    0.459     -.8237266     1.824869
           82  |    .3307405    .6625649      0.50    0.618     -.9678629     1.629344
           83  |    .3307405    .6625649      0.50    0.618     -.9678629     1.629344
           84  |    .1464309     .665669      0.22    0.826     -1.158256     1.451118
           85  |    .1464309     .665669      0.22    0.826     -1.158256     1.451118
           86  |    .1464309     .660838      0.22    0.825     -1.148788      1.44165
           87  |    .1464309     .660838      0.22    0.825     -1.148788      1.44165
           88  |   -.0142009    .6403302     -0.02    0.982     -1.269225     1.240823
           89  |   -.0142009    .6403302     -0.02    0.982     -1.269225     1.240823
           90  |    .4341651    .6493186      0.67    0.504      -.838476     1.706806
           91  |    .4341651    .6493186      0.67    0.504      -.838476     1.706806
           92  |     .500571    .6519079      0.77    0.443     -.7771449     1.778287
           93  |     .500571    .6519079      0.77    0.443     -.7771449     1.778287
           94  |    .7787403     .661439      1.18    0.239     -.5176562     2.075137
           95  |    .7787403     .661439      1.18    0.239     -.5176562     2.075137
           96  |    1.387613    .6605839      2.10    0.036      .0928926     2.682334
           97  |    1.387613    .6605839      2.10    0.036      .0928926     2.682334
           98  |     1.41185    .6536612      2.16    0.031      .1306977     2.693003
           99  |    1.457514    .6546927      2.23    0.026      .1743402     2.740688
          100  |    .7990474    .6830812      1.17    0.242     -.5397671     2.137862
          101  |    1.348821    .7019444      1.92    0.055     -.0269643     2.724607
               |
         agegp |
   43 thru 55  |     .070516    .2895507      0.24    0.808      -.496993     .6380249
   56 thru 84  |    .0050435      .33836      0.01    0.988     -.6581299     .6682168
               |
         marrw |
   3. married  |   -.0738463    .4956326     -0.15    0.882     -1.045268     .8975757
 4. separated  |   -.2686595    1.029639     -0.26    0.794     -2.286715     1.749396
  5. divorced  |   -.1478045    .6030597     -0.25    0.806      -1.32978     1.034171
   6. widowed  |   -.6231806    .5771104     -1.08    0.280     -1.754296      .507935
               |
        childw |   -.1496373    .1077955     -1.39    0.165     -.3609127      .061638
               |
         emplw |
 2. part time  |   -.0907756    .3752044     -0.24    0.809     -.8261627     .6446115
   4. retired  |    .8398213    .4542636      1.85    0.064     -.0505189     1.730162
5. unemployed  |    .6978717    .4996466      1.40    0.162     -.2814177     1.677161
               |
         occ1w |    1.065597     .749992      1.42    0.155     -.4043598     2.535555
         occ2w |    .5578838    .7761609      0.72    0.472     -.9633635     2.079131
         occ3w |    .5596532    .7808685      0.72    0.474     -.9708208     2.090127
         occ4w |   -.1742247    .7954546     -0.22    0.827     -1.733287     1.384838
         occ5w |    .4210129    .8663519      0.49    0.627     -1.277006     2.119031
         occ6w |    .4247979    .9274955      0.46    0.647      -1.39306     2.242656
         occ7w |    .0353196    .7961737      0.04    0.965     -1.525152     1.595791
         occ8w |           0   (omitted)
         inc1w |    .3977725     .455805      0.87    0.383     -.4955889     1.291134
         inc2w |    .0311161    .3961723      0.08    0.937     -.7453674     .8075996
         inc3w |   -.2472416    .4129575     -0.60    0.549     -1.056623     .5621401
         inc4w |           0   (omitted)
           jsw |    .0008558    .0029376      0.29    0.771     -.0049018     .0066133
          deaw |    .1483667    .0814262      1.82    0.068     -.0112256      .307959
         dvcew |    .2432927    .4537068      0.54    0.592     -.6459563     1.132542
         sepaw |   -.0293983    .5523478     -0.05    0.958      -1.11198     1.053184
         accdw |    .4371891    .1755129      2.49    0.013      .0931902      .781188
         cataw |   -.1286599    .5402305     -0.24    0.812     -1.187492     .9301725
          illw |    .1849728    .0897223      2.06    0.039      .0091204     .3608253
         movew |   -.1077385    .1586128     -0.68    0.497     -.4186139      .203137
        shjobw |   -.0030246    .0027528     -1.10    0.272       -.00842     .0023708
        shfamw |   -.0024489    .0025443     -0.96    0.336     -.0074356     .0025378
         shhlw |    .0105784    .0030716      3.44    0.001      .0045582     .0165987
       shfincw |     .001946    .0031872      0.61    0.541     -.0043008     .0081928
       shhousw |    .0033031    .0027088      1.22    0.223      -.002006     .0086122
       shrelaw |   -.0031608    .0031216     -1.01    0.311      -.009279     .0029574
        suprtw |    .0020542    .0028645      0.72    0.473     -.0035601     .0076685
        suchrw |    .0056572    .0024928      2.27    0.023      .0007714      .010543
        dafter |    -.022037     .020964     -1.05    0.293     -.0631257     .0190516
         toxic |    .0047243    .0032185      1.47    0.142     -.0015838     .0110324
        repair |    .0013831    .0025889      0.53    0.593     -.0036911     .0064573
          skin |    -.000188    .0025355     -0.07    0.941     -.0051575     .0047814
          near |    .0039125    .0030815      1.27    0.204     -.0021271     .0099522
         cloud |    .0000102     .002854      0.00    0.997     -.0055835     .0056038
         world |   -.0100317    .0052422     -1.91    0.056     -.0203061     .0002428
      healthef |    .0071007    .0149503      0.47    0.635     -.0222014     .0364029
        carcin |   -.0046156    .0143761     -0.32    0.748     -.0327923     .0235611
         woman |     .001938    .0039581      0.49    0.624     -.0058197     .0096958
       saferad |    .0023309    .0031675      0.74    0.462     -.0038774     .0085391
       goodrad |   -.0011565    .0027711     -0.42    0.676     -.0065878     .0042748
       kzchorn |   -.0013714    .0054476     -0.25    0.801     -.0120485     .0093058
       kzunder |   -.0075408     .004653     -1.62    0.105     -.0166606      .001579
        chsize |    .0014217    .0041073      0.35    0.729     -.0066285     .0094719
       icdxcnt |    .1651177    .0412736      4.00    0.000       .084223     .2460124
         WHPel |    .0105277    .0035812      2.94    0.003      .0035086     .0175467
       WHPpain |    .0016237    .0074225      0.22    0.827     -.0129242     .0161716
         WHPer |    .0081107    .0066848      1.21    0.225     -.0049913     .0212127
      WHPsleep |     .001578    .0038549      0.41    0.682     -.0059775     .0091335
     WHPsociso |   -.0092787    .0056271     -1.65    0.099     -.0203077     .0017502
         WHPpa |   -.0121952    .0081772     -1.49    0.136     -.0282224     .0038319
       HP2work |   -.0522806    .2584665     -0.20    0.840     -.5588656     .4543044
     HP2hmcare |    .1991675    .2272483      0.88    0.381     -.2462311     .6445661
    HP2probsoc |   -.6392614    .3077166     -2.08    0.038     -1.242375     -.036148
      HP2pbfhm |   -.2283635    .3087957     -0.74    0.460     -.8335921      .376865
     HP2sxlife |    .3046157    .3104345      0.98    0.326     -.3038247     .9130561
     HP2inthob |      .59279    .3679461      1.61    0.107     -.1283712     1.313951
     HP2vacatn |    .2562992    .3291862      0.78    0.436     -.3888939     .9014923
        goferw |     .006121    .0051306      1.19    0.233     -.0039348     .0161768
        fdferw |    .0029865    .0039524      0.76    0.450     -.0047601     .0107331
        trgovw |    .0014224    .0033109      0.43    0.667     -.0050669     .0079117
        trrepw |    .0069489    .0031632      2.20    0.028      .0007491     .0131488
         defnw |    .0054164    .0029451      1.84    0.066      -.000356     .0111887
        efradw |   -.0013519    .0028937     -0.47    0.640     -.0070234     .0043197
         ecprw |     .002668    .0028852      0.92    0.355      -.002987     .0083229
        polprw |    .0039995    .0024586      1.63    0.104     -.0008194     .0088183
          airw |   -.0055982     .003023     -1.85    0.064     -.0115232     .0003269
          radw |    .0023594     .002526      0.93    0.350     -.0025914     .0073102
        radchw |    -.000444    .0036687     -0.12    0.904     -.0076346     .0067466
        radtlw |   -.0024177    .0036156     -0.67    0.504      -.009504     .0046687
        radhlw |    .0019322    .0054274      0.36    0.722     -.0087053     .0125698
        radfmw |    -.003995    .0061719     -0.65    0.517     -.0160917     .0081017
        dauthw |    3.64e-06    .0053863      0.00    0.999     -.0105532     .0105605
          medw |    .0023048     .005286      0.44    0.663     -.0080556     .0126651
          neiw |   -.0050631    .0034763     -1.46    0.145     -.0118766     .0017503
   avgcumdosew |   -.0303028    .0416023     -0.73    0.466     -.1118417     .0512362
         _cons |   -4.759782    1.362093     -3.49    0.000     -7.429435    -2.090129
---------------+----------------------------------------------------------------

.
. title female first trimmed model: trimming at .15


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                               female                                *****
*****                               first                                 *****
*****                              trimmed                                *****
*****                               model:                                *****
*****                              trimming                               *****
*****                                 at                                  *****
*****                                .15                                  *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:41:32  *****
*******************************************************************************
*******************************************************************************


. set more off

. logit depind i.date i.agegp widowed i.emplw occ1w-occ7w inc1w-inc4w deaw dvcew accdw illw ///
>     shjobw shhlw shhousw suchrw saferad icdxcnt WHPel WHPpa HP2probsoc HP2inthob ///
>         trrepw defnw  polprw radw if gender==2, vce(cluster id) nolog

Logistic regression                               Number of obs   =      16486
                                                  Wald chi2(64)   =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -5582.9201                 Pseudo R2       =     0.1941

(Std. Err. adjusted for 272 clusters in id)
---------------+----------------------------------------------------------------
               |               Robust
         depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
---------------+----------------------------------------------------------------
          date |
           41  |    5.69e-14           .         .        .             .            .
           42  |   -.6198334    .3107427     -1.99    0.046     -1.228878    -.0107889
           43  |   -.6198334    .3107427     -1.99    0.046     -1.228878    -.0107889
           44  |   -.1291366    .2240666     -0.58    0.564     -.5682992     .3100259
           45  |   -.1291366    .2240666     -0.58    0.564     -.5682992     .3100259
           46  |   -.8397371    .3366631     -2.49    0.013     -1.499585    -.1798896
           47  |   -.8397371    .3366631     -2.49    0.013     -1.499585    -.1798896
           48  |   -.5233769    .3272779     -1.60    0.110      -1.16483      .118076
           49  |   -.5233769    .3272779     -1.60    0.110      -1.16483      .118076
           50  |   -.7246985    .3554083     -2.04    0.041     -1.421286     -.028111
           51  |   -.7246985    .3554083     -2.04    0.041     -1.421286     -.028111
           52  |    1.449418    .2883186      5.03    0.000      .8843236     2.014512
           53  |    1.449418    .2883186      5.03    0.000      .8843236     2.014512
           54  |   -.1948052    .3599318     -0.54    0.588     -.9002585     .5106481
           55  |   -.1948052    .3599318     -0.54    0.588     -.9002585     .5106481
           56  |   -.0185788     .327635     -0.06    0.955     -.6607316      .623574
           57  |   -.0185788     .327635     -0.06    0.955     -.6607316      .623574
           58  |   -.5688955     .384455     -1.48    0.139     -1.322413     .1846226
           59  |   -.5688955     .384455     -1.48    0.139     -1.322413     .1846226
           60  |   -.5226091    .3756632     -1.39    0.164     -1.258895     .2136774
           61  |   -.5226091    .3756632     -1.39    0.164     -1.258895     .2136774
           62  |   -.5226091    .3839788     -1.36    0.174     -1.275194     .2299756
           63  |   -.5226091    .3839788     -1.36    0.174     -1.275194     .2299756
           64  |   -.0869567    .3630653     -0.24    0.811     -.7985516     .6246382
           65  |   -.0869567    .3630653     -0.24    0.811     -.7985516     .6246382
           66  |   -.1580991     .379671     -0.42    0.677     -.9022405     .5860424
           67  |   -.1580991     .379671     -0.42    0.677     -.9022405     .5860424
           68  |    .0793947    .3438505      0.23    0.817     -.5945399     .7533292
           69  |    .0793947    .3438505      0.23    0.817     -.5945399     .7533292
           70  |   -.1580991    .3606281     -0.44    0.661     -.8649172      .548719
           71  |   -.1580991    .3606281     -0.44    0.661     -.8649172      .548719
           72  |    .2026131    .3503567      0.58    0.563     -.4840735     .8892997
           73  |    .2026131    .3503567      0.58    0.563     -.4840735     .8892997
           74  |   -.2642498    .3726838     -0.71    0.478     -.9946967     .4661971
           75  |   -.2642498    .3726838     -0.71    0.478     -.9946967     .4661971
           76  |    .2545321    .3591655      0.71    0.479     -.4494194     .9584836
           77  |    .2545321    .3591655      0.71    0.479     -.4494194     .9584836
           78  |    .1294506    .3582541      0.36    0.718     -.5727145     .8316157
           79  |    .1294506    .3582541      0.36    0.718     -.5727145     .8316157
           80  |    .4569503    .3557059      1.28    0.199     -.2402205     1.154121
           81  |    .4569503    .3557059      1.28    0.199     -.2402205     1.154121
           82  |    .1929603    .3588938      0.54    0.591     -.5104586     .8963793
           83  |    .1929603    .3588938      0.54    0.591     -.5104586     .8963793
           84  |     .063819    .3621786      0.18    0.860      -.646038     .7736761
           85  |     .063819    .3621786      0.18    0.860      -.646038     .7736761
           86  |    .0969125    .3513282      0.28    0.783      -.591678     .7855031
           87  |    .0969125    .3513282      0.28    0.783      -.591678     .7855031
           88  |   -.1110031    .3530635     -0.31    0.753     -.8029948     .5809887
           89  |   -.1110031    .3530635     -0.31    0.753     -.8029948     .5809887
           90  |    .3436053    .3542661      0.97    0.332     -.3507434     1.037954
           91  |    .3436053    .3542661      0.97    0.332     -.3507434     1.037954
           92  |    .4569503    .3518594      1.30    0.194     -.2326815     1.146582
           93  |    .4569503    .3518594      1.30    0.194     -.2326815     1.146582
           94  |    .6682905    .3418342      1.96    0.051     -.0016924     1.338273
           95  |    .6682905    .3418342      1.96    0.051     -.0016924     1.338273
           96  |    1.303355    .3429868      3.80    0.000      .6311127     1.975596
           97  |    1.303355    .3429868      3.80    0.000      .6311127     1.975596
           98  |    1.324021    .3248874      4.08    0.000      .6872537     1.960789
           99  |     1.35159    .3256466      4.15    0.000      .7133339     1.989845
          100  |    .6897534    .3663748      1.88    0.060      -.028328     1.407835
          101  |    1.115694    .4188673      2.66    0.008      .2947295     1.936659
               |
         agegp |
   43 thru 55  |   -.2808031    .2358753     -1.19    0.234     -.7431103      .181504
   56 thru 84  |    -.490186    .2910019     -1.68    0.092     -1.060539     .0801671
               |
       widowed |   -.3815723    .2506887     -1.52    0.128     -.8729132     .1097685
               |
         emplw |
 2. part time  |   -.2455243    .3477032     -0.71    0.480       -.92701     .4359614
 3. voluntary  |    1.223051    .4920619      2.49    0.013       .258627     2.187474
   4. retired  |   -.1186696    .4088504     -0.29    0.772     -.9200016     .6826624
5. unemployed  |   -.0738171     .417851     -0.18    0.860     -.8927901     .7451559
               |
         occ1w |    1.128956    .4457748      2.53    0.011      .2552534     2.002659
         occ2w |    .7988111    .5192608      1.54    0.124     -.2189214     1.816544
         occ3w |    .8766066     .505928      1.73    0.083      -.114994     1.868207
         occ4w |    .1607194    .5453983      0.29    0.768     -.9082416      1.22968
         occ5w |    .3709844    .6979948      0.53    0.595     -.9970602     1.739029
         occ6w |    .5675644    .5435882      1.04    0.296     -.4978488     1.632978
         occ7w |     .785362    .4215847      1.86    0.062     -.0409288     1.611653
         inc1w |    14.42938           .         .        .             .            .
         inc2w |    14.06331    .6378333     22.05    0.000      12.81318     15.31344
         inc3w |    13.75938           .         .        .             .            .
         inc4w |    13.38787           .         .        .             .            .
          deaw |    .1135532    .0662123      1.71    0.086     -.0162206     .2433269
         dvcew |    .5094898    .2785736      1.83    0.067     -.0365045     1.055484
         accdw |    .4291377    .1587557      2.70    0.007      .1179823     .7402931
          illw |    .0968769    .0895725      1.08    0.279      -.078682     .2724358
        shjobw |   -.0063016    .0029276     -2.15    0.031     -.0120396    -.0005637
         shhlw |    .0068344    .0028777      2.37    0.018      .0011942     .0124747
       shhousw |    .0054322     .002387      2.28    0.023      .0007538     .0101106
        suchrw |    .0055883     .002102      2.66    0.008      .0014684     .0097082
       saferad |    .0045371    .0023815      1.91    0.057     -.0001305     .0092047
       icdxcnt |    .1762195    .0389933      4.52    0.000      .0997939      .252645
         WHPel |     .009349    .0031765      2.94    0.003      .0031233     .0155748
         WHPpa |    -.008941    .0060033     -1.49    0.136     -.0207073     .0028252
    HP2probsoc |   -.3563572    .2841396     -1.25    0.210     -.9132607     .2005462
     HP2inthob |    .7911191    .2975212      2.66    0.008      .2079884      1.37425
        trrepw |    .0064644    .0023326      2.77    0.006      .0018927     .0110361
         defnw |     .004061    .0025729      1.58    0.114     -.0009819     .0091039
        polprw |    .0034339    .0024161      1.42    0.155     -.0013015     .0081693
          radw |    .0035486    .0023086      1.54    0.124     -.0009762     .0080734
         _cons |   -19.38808    1.067703    -18.16    0.000     -21.48074    -17.29542
---------------+----------------------------------------------------------------

. cap drop devf

. cap drop fempred

. title female multiple trimming model:  trim anything over .1


*******************************************************************************
*******************************************************************************
*****                                                                     *****
*****                                                                     *****
*****                               female                                *****
*****                              multiple                               *****
*****                              trimming                               *****
*****                               model:                                *****
*****                                trim                                 *****
*****                              anything                               *****
*****                                over                                 *****
*****                                 .1                                  *****
*****                                                                     *****
*****                                                                     *****
*****                                            29 Aug 2013    04:41:35  *****
*******************************************************************************
*******************************************************************************


. set more off

. logit depind i.date i.marrw occ1w inc1w inc3w dvcew accdw ///
>     shjobw shhlw shhousw suchrw saferad icdxcnt WHPel HP2inthob ///
>         trrepw if gender==2, vce(cluster id) nolog

Logistic regression                               Number of obs   =      13329
                                                  Wald chi2(51)   =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -4864.8852                 Pseudo R2       =     0.1659

(Std. Err. adjusted for 259 clusters in id)
--------------+----------------------------------------------------------------
              |               Robust
        depind |      Coef.    Std. Err.       z    P>|z|      [95% Con f. Interval]
--------------+----------------------------------------------------------------
         date |
          41  |    3.30e-15    1.63e-07      0.00    1.000     -3.19e-07     3.19e-07
          42  |     -.59359    .3702172     -1.60    0.109     -1.319202     .1320224
          43  |     -.59359    .3702172     -1.60    0.109     -1.319202     .1320224
          44  |   -.1700887    .2405367     -0.71    0.479     -.6415319     .3013545
          45  |   -.1700887    .2405367     -0.71    0.479     -.6415319     .3013545
          46  |   -1.241132    .4312601     -2.88    0.004     -2.086386    -.3958775
          47  |   -1.241132    .4312601     -2.88    0.004     -2.086386    -.3958775
          48  |     -.59359    .3965934     -1.50    0.134     -1.370899     .1837188
          49  |     -.59359    .3965934     -1.50    0.134     -1.370899     .1837188
          50  |    -1.04335    .4581516     -2.28    0.023      -1.94131    -.1453892
          51  |    -1.04335    .4581516     -2.28    0.023      -1.94131    -.1453892
          52  |    1.381127    .3432504      4.02    0.000      .7083689     2.053886
          53  |    1.381127    .3432504      4.02    0.000      .7083689     2.053886
          54  |   -.1958208    .3714221     -0.53    0.598     -.9237948     .5321531
          55  |   -.1958208    .3714221     -0.53    0.598     -.9237948     .5321531
          56  |    .0096518    .3166724      0.03    0.976     -.6110147     .6303183
          57  |    .0096518    .3166724      0.03    0.976     -.6110147     .6303183
          58  |   -.5365574    .3891379     -1.38    0.168     -1.299254     .2261389
          59  |   -.5365574    .3891379     -1.38    0.168     -1.299254     .2261389
          60  |   -.4311707    .3772407     -1.14    0.253     -1.170549     .3082076
          61  |   -.4311707    .3772407     -1.14    0.253     -1.170549     .3082076
          62  |   -.5365574    .3816544     -1.41    0.160     -1.284586     .2114714
          63  |   -.5365574    .3816544     -1.41    0.160     -1.284586     .2114714
          64  |    .0096518    .3635669      0.03    0.979     -.7029262     .7222297
          65  |    .0096518    .3635669      0.03    0.979     -.7029262     .7222297
          66  |   -.1106063    .3792746     -0.29    0.771     -.8539708     .6327582
          67  |   -.1106063    .3792746     -0.29    0.771     -.8539708     .6327582
          68  |    .0096518    .3594632      0.03    0.979     -.6948832     .7141868
          69  |    .0096518    .3594632      0.03    0.979     -.6948832     .7141868
          70  |   -.1106063    .3633697     -0.30    0.761     -.8227979     .6015853
          71  |   -.1106063    .3633697     -0.30    0.761     -.8227979     .6015853
          72  |    .1936326    .3499673      0.55    0.580     -.4922907     .8795558
          73  |    .1936326    .3499673      0.55    0.580     -.4922907     .8795558
          74  |    .0231917    .3859035      0.06    0.952     -.7331654     .7795487
          75  |    .0231917    .3859035      0.06    0.952     -.7331654     .7795487
          76  |    .4748164    .3728809      1.27    0.203     -.2560167      1.20565
          77  |    .4748164    .3728809      1.27    0.203     -.2560167      1.20565
          78  |    .3720056    .3673717      1.01    0.311     -.3480297     1.092041
          79  |    .3720056    .3673717      1.01    0.311     -.3480297     1.092041
          80  |     .665757    .3718407      1.79    0.073     -.0630374     1.394551
          81  |     .665757    .3718407      1.79    0.073     -.0630374     1.394551
          82  |    .5079116    .3738787      1.36    0.174     -.2248772     1.240701
          83  |    .5079116    .3738787      1.36    0.174     -.2248772     1.240701
          84  |    .3364561    .3805471      0.88    0.377     -.4094026     1.082315
          85  |    .3364561    .3805471      0.88    0.377     -.4094026     1.082315
          86  |    .3364561    .3661776      0.92    0.358     -.3812388     1.054151
          87  |    .3364561    .3661776      0.92    0.358     -.3812388     1.054151
          88  |    .1868726    .3703397      0.50    0.614     -.5389798      .912725
          89  |    .1868726    .3703397      0.50    0.614     -.5389798      .912725
          90  |    .6351289    .3723121      1.71    0.088     -.0945894     1.364847
          91  |    .6351289    .3723121      1.71    0.088     -.0945894     1.364847
          92  |    .6959555     .366557      1.90    0.058      -.022483     1.414394
          93  |    .6959555     .366557      1.90    0.058      -.022483     1.414394
          94  |    .9511256    .3577977      2.66    0.008      .2498549     1.652396
          95  |    .9511256    .3577977      2.66    0.008      .2498549     1.652396
          96  |    1.511759    .3581649      4.22    0.000      .8097687     2.213749
          97  |    1.511759    .3581649      4.22    0.000      .8097687     2.213749
          98  |    1.534142    .3453242      4.44    0.000      .8573185     2.210965
          99  |    1.567271    .3471662      4.51    0.000      .8868379     2.247704
         100  |     .953209    .3805453      2.50    0.012       .207354     1.699064
         101  |    1.376909    .4269657      3.22    0.001      .5400715     2.213746
              |
        marrw |
  3. married  |   -.2682241    .4526376     -0.59    0.553     -1.155378     .6189293
4. separated  |   -.3853718    .7149597     -0.54    0.590     -1.786667     1.015923
 5. divorced  |   -.7495755     .589223     -1.27    0.203     -1.904431     .4052803
  6. widowed  |   -.8299235    .4959571     -1.67    0.094     -1.801982     .1421345
              |
        occ1w |    .3948217    .1849639      2.13    0.033      .0322991     .7573443
        inc1w |    .3541741    .2204866      1.61    0.108     -.0779717     .7863199
        inc3w |   -.2977419    .1911904     -1.56    0.119     -.6724683     .0769845
        dvcew |    .6505435    .3726108      1.75    0.081     -.0797603     1.380847
        accdw |    .4098808     .164205      2.50    0.013      .0880449     .7317166
       shjobw |    -.003349    .0027247     -1.23    0.219     -.0086893     .0019913
        shhlw |    .0096414    .0032937      2.93    0.003      .0031858      .016097
      shhousw |    .0017481    .0028407      0.62    0.538     -.0038195     .0073157
       suchrw |    .0052416    .0020884      2.51    0.012      .0011484     .0093348
      saferad |    .0046429    .0024383      1.90    0.057      -.000136     .0094218
      icdxcnt |    .1916651    .0421351      4.55    0.000      .1090819     .2742483
        WHPel |    .0062197     .002645      2.35    0.019      .0010355     .0114038
    HP2inthob |     .468573    .2276547      2.06    0.040       .022378      .914768
       trrepw |    .0065983    .0025059      2.63    0.008      .0016868     .0115097
        _cons |   -4.290693    .5860464     -7.32    0.000     -5.439323    -3.142064
--------------+----------------------------------------------------------------

. predict devf, deviance
(30195 missing values generated)

. predict fempred, xb
(16040 missing values generated)

. tsline fempred if gender==2, title(Female baseline logits) || lowess fempred date

.
. cap drop ln_one_m_hazf

. cap drop ln_survf

. cap drop survf

.
. gen ln_one_m_hazf = ln(1 - invlogit(fempred))
(16040 missing values generated)

. by id (date), sort: gen ln_survf = sum(ln_one_m_hazf)

. gen survf = exp(ln_survf)

. twoway (line survf date if id==235, connect(stairstep) lpatt(solid)) ///
>  (line survf date if id==265, connect(stairstep) lpatt(dash)), ///
>  xtitle(date) ytitle(Survival probability) tline(1986h1) legend(off) ///
>  title(Comparing id 235 and 265)

.
.
. estat gof


Logistic model for depind, goodness-of-fit test


       number of observations =     13329
 number of covariate patterns =     13329
          Pearson chi2(13249) =     13267.97
                  Prob > chi2 =         0.4520

. estat class

Logistic model for depind

              -------- True --------
Classified |         D            ~D  |      Total
-----------+--------------------------+-----------
     +     |       323           192  |        515
     -     |      1793         11021  |      12814
-----------+--------------------------+-----------
   Total   |      2116         11213  |      13329

Classified + if predicted Pr(D) >= .5
True D defined as depind != 0
--------------------------------------------------
Sensitivity                     Pr( +| D)   15.26%
Specificity                     Pr( -|~D)   98.29%
Positive predictive value       Pr( D| +)   62.72%
Negative predictive value       Pr(~D| -)   86.01%
--------------------------------------------------
False + rate for true ~D        Pr( +|~D)    1.71%
False - rate for true D         Pr( -| D)   84.74%
False + rate for classified +   Pr(~D| +)   37.28%
False - rate for classified -   Pr( D| -)   13.99%
--------------------------------------------------
Correctly classified                        85.11%
--------------------------------------------------

. lroc

Logistic model for depind

number of observations =    13329
area under ROC curve   =   0.7792

.
.