Part A

Descriptive Analysis

#load package
library(haven)
#download datasets - AddHealth
wave1<-read_dta("/projects/add_health/data/11613344/ICPSR_27021/DS0001/da27021p1.dta")
wave3<-read_dta("/projects/add_health/data/11613344/ICPSR_27021/DS0003/da27021p3.dta")
wave4<-read_dta("/projects/add_health/data/11613344/ICPSR_27021/DS0012/da27021p12.dta")
addhealth.wghtW4<-read_dta("/projects/add_health/data/11613344/ICPSR_27021/DS0028/da27021p28.dta")

#addhealth<-merge(wave1,wave3,by="aid")
addhealth<-merge(wave1,wave3,by="aid")
addhealth<-merge(addhealth,wave4,by="aid")
addhealth<-merge(addhealth,addhealth.wghtW4,by="aid")
#install and load packages
install.packages("rlang", repos="http://cran.us.r-project.org", dependencies = TRUE)
## Installing package into '/storage01/users/izf381/R/x86_64-redhat-linux-gnu-library/3.6'
## (as 'lib' is unspecified)
#library(rlang)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
#select variables to use
addhealth<-addhealth%>%
  select(aid,H3ID15,H4SE31,H1GI6A,H1GI6B,H1GI4,H3OD4A,H3OD4B,H3OD2,H1GI1M,H1GI1Y,H3OD1M,H3OD1Y,H4OD1M,H4OD1Y,BIO_SEX,H4ID5H,iyear,imonth,iday,H1FV6,H3DS18F,H3DS18G,H4DS18,H4SE1,H4SE2,H3TO130,H3TO131,IMONTH4,IYEAR4,H3SE13,IYEAR3,IMONTH3,H1SU1,H4HS1,H4HS4,H4ED2,H4EC1,H4EC4,H4MH2,H4MH28,H4SE2,H4SE32,H4SE34,H4DS15,H4DS16,H4DS17,H4DS18,H4TO3,H4TO35,H4TO36,H4TO65B,H4TO65C,H4TO65D,H4MA1,H4MA3,H4MA5,H4PE40,H4ID5H,H4ID5I,H4ID5J,H4EC18,H4OD4,H3HS5,H3HS6,H3OD38,H3ID33,H3SP3,H3EC2,H3DS16,H3DS18B,H3DS18C,H3DS18D,H3DS18E,H3DS18F,H3DS18G,H3TO38,H3TO39,H3MA3,H3MA4,H4TR1,H3SE14,H1GI6D,H1GI6C,H1GI6E,H4OD4,H1PL1,H1WP9,H1WP13,psuscid,region,GSWGT4,H3SP9,H4MH3,H4MH4,H4MH5,H4MH6,H4MH7,H4MH8,H3SP3,H3TO38,H3SP4,H3SP5,H3SP6,H3SP10,H3SP13,H3SP24,H3GH8, H3MN1,H4TO53,H4TO65C,H4TO65D,H4TO65E,H4TO66,H4TO64A,H4TO64B,H4TO64C,H4TO64D,H3TO111,H3SP9,H4TO54,H4TR1,H4SE2,H4LM4,H3LM1,H4ED2,H4MH2,H4WS4,H4GH1,H4CJ1,H3OD31,H4TR1,H4RD6,H4LM17,H3LM3,H4TR3,H4TR10,H4ID1,H4ID4,H4ID5A,H4ID5B,H4ID5C,H4ID5D,H4ID5E,H4ID5F,H4ID5G,H4ID5M,H4TR3,H4TR10,H4SE1,H4SE2,H4CJ17)
#complete cases
addhealth<-addhealth%>%
 filter(complete.cases(.))
#load package
library(car)
## Loading required package: carData
## 
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
## 
##     recode
#code variables
#sexual orientation from wave 3
addhealth$sexorient <- factor(ifelse(addhealth$H3SE13=="(1) 100% heterosexual (straight)",1,
                                       ifelse(addhealth$H3SE13=="(2) Mostly #heterosexual/somewhat attracted to people of own",2, 
                                           ifelse(addhealth$H3SE13=="(3) Bisexual-attracted #to men and women equally",3,
                                                   ifelse(addhealth$H3SE13=="(4) Mostly #homosexual/somewhat attracted to opposite sex",4,
                                                          ifelse(addhealth$H3SE13=="(5) 100% #homosexual (gay)",5,NA))))))

addhealth$sexorient<-Recode(addhealth$H3SE13, recodes="1:2='a_straight'; 3='b_bisexual';4:5='c_LGB';else=NA",as.factor=T)
#code variables
addhealth$social_isolationW4<-Recode(addhealth$H4MH2,recodes="0:1='a_never/rarely';2:3='b_sometimes/often';else=NA")
addhealth$forcedsex_verbalW4<-Recode(addhealth$H4SE32,recodes="0='a_no';1='b_yes';else=NA")
addhealth$forcedsex_physicalW4<-Recode(addhealth$H4SE34,recodes="0='a_no';1='b_yes';else=NA")
addhealth$educ<-Recode(addhealth$H4ED2,recodes="1:2='a_less_highschool';3:6='b_highschool_grad';7:8='c_college_bach';8:13='d_college+';else=NA")
addhealth$depressionW4<-Recode(addhealth$H4ID5H,recodes="0='a_no';1='b_yes';else=NA")
addhealth$anxiety.panic_disorder_W4<-Recode(addhealth$H4ID5J,recodes="0='a_no';1='b_yes';else=NA")
addhealth$things.going.mywayW4<-Recode(addhealth$H4MH5,recodes="0:1='a_no';2='b_sometimes';3:4='c_often';else=NA")
addhealth$unmet_medcareW4 <- Recode(addhealth$H4HS4,recodes="0='a_no';1='b_yes';else=NA")
addhealth$insurance_statusW4 <- Recode(addhealth$H4HS1,recodes="1='a_no_insurance';2:10='b_yes_insurance';else=NA")
addhealth$threatened_gun_knifeW4<-Recode(addhealth$H4DS15,recodes="0='a_no';1='b_yes';else=NA")
addhealth$harmed_gun_knifeW4<-Recode(addhealth$H4DS16,recodes="0='a_no';1='b_yes';else=NA")
addhealth$beaten_upW4<-Recode(addhealth$H4DS18,recodes="0='a_no';1='b_yes';else=NA")
addhealth$lack_autonomyW4<-Recode(addhealth$H4PE40,recodes="1:2='b_lacks_autonomy';3='a_nuetral';4:5='c_has_autonomy';else=NA")
addhealth$alcohol_day_permonthW4<-Recode(addhealth$H4TO35,recodes="0:3='a_>12days/year';4='b_1or2days/week';5='c_3to5days/week';6='d_daily';else=NA")
addhealth$try.cocaineW4<-Recode(addhealth$H4TO65C,recodes="0='a_no';1='b_yes';else=NA")
addhealth$try.methW4<-Recode(addhealth$H4TO65D,recodes="0='a_no';1='b_yes';else=NA")
addhealth$try.herionW4<-Recode(addhealth$H4TO65E,recodes="0='a_no';1='b_yes';7='skip';else=NA")
addhealth$had.injected.drugsW4<-Recode(addhealth$H4TO66,recodes="0='a_no';1='b_yes';7='c_skip';else=NA")
addhealth$sedatives.downersW4<-Recode(addhealth$H4TO64A,recodes="0='a_no';1='b_yes';7='c_skip';else=NA")
addhealth$opioidsW4<-Recode(addhealth$H4TO64D,recodes="0='a_no';1='b_yes';7='c_skip';else=NA")
addhealth$general_health<-Recode(addhealth$H4GH1,recodes="1:3='a_good/excellent';4:5='b_poor/bad';else=NA")
addhealth$friendships<-Recode(addhealth$H4WS4,recodes="1='a_none';2='b_1or2';3:4='c_3to9';5='d_10+';else=NA")
addhealth$arrested<-Recode(addhealth$H4CJ1,recodes="0='a_no';1='b_yes';else=NA")
addhealth$foster_home<-Recode(addhealth$H3OD31,recodes="0='a_no';1='b_yes';else=NA")
addhealth$unloved_bycaretakerW4<-Recode(addhealth$H4MA1,recodes="1:4='b_>10_times';5='c_10+_times';6='a_never';else=NA")
addhealth$hit_kick_thrown_bycaretakerW4<-Recode(addhealth$H4MA3,recodes="1:4='b_>10_times';5='c_10+_times';6='a_never';else=NA")
addhealth$sex_abuse_bycaretakerW4<-Recode(addhealth$H4MA5,recodes="1:4='b_>10_times';5='c_10+_times';6='a_never';else=NA")
addhealth$marriedW4a<-Recode(addhealth$H4TR1,recodes="0='b_married';1:4='a_nevermarried';else=NA")
addhealth$marriedW4b<-Recode(addhealth$H4RD6,recodes="1='a_together';2:3='b_seperated/divorced';7='c_skip';else=NA")
addhealth$incarcerated<-Recode(addhealth$H4CJ17,recodes="0='a_no';1='b_yes';7='skip';else=NA")
addhealth$physical_limitation<-Recode(addhealth$H4ID1,recodes="1='a_not limited';2='b_limited';else=NA")
addhealth$brace_wheelchair<-Recode(addhealth$H4ID4,recodes="0='a_no';1='b_yes';else=NA")
addhealth$cancer<-Recode(addhealth$H4ID5A,recodes="0='a_no';1='b_yes';else=NA")
addhealth$high_chol<-Recode(addhealth$H4ID5B,recodes="0='a_no';1='b_yes';else=NA")
addhealth$high_bp<-Recode(addhealth$H4ID5C,recodes="0='a_no';1='b_yes';else=NA")
addhealth$diabetes<-Recode(addhealth$H4ID5D,recodes="0='a_no';1='b_yes';else=NA")
addhealth$heart_disease<-Recode(addhealth$H4ID5E,recodes="0='a_no';1='b_yes';else=NA")
addhealth$asthm<-Recode(addhealth$H4ID5F,recodes="0='a_no';1='b_yes';else=NA")
addhealth$migrane<-Recode(addhealth$H4ID5G,recodes="0='a_no';1='b_yes';else=NA")
addhealth$HIV<-Recode(addhealth$H4ID5M,recodes="0='a_no';1='b_yes';5='not.asked';else=NA")
addhealth$pregnancy<-Recode(addhealth$H4TR3,recodes="0='a_none';1:15='b_yes';else=NA")
addhealth$births<-Recode(addhealth$H4TR10,recodes="0='a_none';1:7='b_yes';97='skip';else=NA")
addhealth$suicideW4think<-Recode(addhealth$H4SE1,recodes="0='a_no';1='b_yes';7='skip';else=NA")
addhealth$suicideW4attempt<-Recode(addhealth$H4SE2,recodes="0='a_no';1:4='b_yes';7='skip';else=NA")
#Date of birth variables; Wave 1: H1GI1M (month), H1GI1Y (year); Wave 3: H3OD1M (month), H3OD1Y (year); Wave 4: H4OD1M (month), H4OD1Y (year)
#birth year w1
addhealth$birthyearw1 <- factor(ifelse(addhealth$H1GI1Y=="74",1974,
                                             ifelse(addhealth$H1GI1Y=="75",1975,
                                                           ifelse(addhealth$H1GI1Y=="76",1976,
                                                                         ifelse(addhealth$H1GI1Y=="77",1977,
                                                                                       ifelse(addhealth$H1GI1Y=="78",1978,
                                                                                                     ifelse(addhealth$H1GI1Y=="79",1979,
                                                                                                                   ifelse(addhealth$H1GI1Y=="80",1980,
                                                                                                                                ifelse(addhealth$H1GI1Y=="81",1981,
                                                                                                                                               ifelse(addhealth$H1GI1Y=="82",1982,
                                                                                                                                                             ifelse(addhealth$H1GI1Y=="83",1983,1979)))))))))))
#birth month w1
addhealth$birthmonthw1 <- Recode(addhealth$H1GI1M,recodes="1=1;2=2;3=3;4=4;5=5;6=6;7=7;8=8;9=9;10=10;11=11;12=12;else=NA")
#combine year and month for a birth date wave 1
library(zoo)
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
addhealth$birthdatew1 <- as.yearmon(paste(addhealth$birthyearw1, addhealth$birthmonthw1), "%Y %m")
#birth month wave 4
addhealth$birthmonthw4 <- Recode(addhealth$H4OD1M,recodes="1=1;2=2;3=3;4=4;5=5;6=6;7=7;8=8;9=9;10=10;11=11;12=12")
#birth year wave 4
addhealth$birthyearw4<-addhealth$H4OD1Y
addhealth$birthyearw4 <- Recode(addhealth$H4OD1Y,recodes="1974=1974;1975=1975;1976=1976;1977=1977;1978=1978;1979=1979;1980=1980;1981=1981;1982=1982;1983=1983")
#combine year and month for birth date wave 4
addhealth$birthdatew4 <- as.yearmon(paste(addhealth$birthyearw4, addhealth$birthmonthw4), "%Y %m")
#birth date wave 3
addhealth$birthdatew3<-as.yearmon(paste(addhealth$H3OD1Y,addhealth$H3OD1M),"%Y %m")
#interview date w1
addhealth$iyearfix <- Recode(addhealth$iyear,recodes="'94'='1994';'95'='1995'")
addhealth$interviewdatew1 <- as.yearmon(paste(addhealth$iyearfix, addhealth$imonth), "%Y %m")
#interview date w4
addhealth$interviewmonthw4 <- Recode(addhealth$IMONTH4,recodes="1=1;2=2;3=3;4=4;5=5;6=6;7=7;8=8;9=9;10=10;11=11;12=12")
addhealth$interviewyearw4 <- Recode(addhealth$IYEAR4,recodes="2007=2007;2008=2008;2009=2009")
addhealth$interviewdatew4<-as.yearmon(paste(addhealth$interviewyearw4,addhealth$interviewmonthw4),"%Y %m")
#interview date w3
addhealth$interviewdatew3<-as.yearmon(paste(addhealth$IYEAR3,addhealth$IMONTH3 ),"%Y %m")
#age - derived from date of birth subtracted from wave interview date 
addhealth$agew4<-(as.numeric(round(addhealth$interviewdatew4 - addhealth$birthdatew4)))
addhealth$agew3<-(as.numeric(round(addhealth$interviewdatew3 - addhealth$birthdatew3)))
addhealth$agew1<-(as.numeric(round(addhealth$interviewdatew1 - addhealth$birthdatew1)))
#race variables
#nhwhite
addhealth$nhwhite <- ifelse(addhealth$H1GI6A==1,1,0)
addhealth$nhwhite<-Recode(addhealth$nhwhite, recodes="1='nhwhite'; 0='nonnhwhite'; 6:8=NA",as.factor=T)
#nhblack
addhealth$nhblack <- ifelse(addhealth$H1GI6B==1,1,0)
addhealth$nhblack<-Recode(addhealth$nhblack, recodes="1='nhblack'; 0='nonnhblack'; 6:8=NA",as.factor=T)
#Hispanic
addhealth$hispanic <- ifelse(addhealth$H1GI4==1,1,0)
addhealth$hispanic<-Recode(addhealth$hispanic, recodes="1='hispanic'; 0='nonhispanic'; 6:8=NA",as.factor=T)
#Asian
addhealth$asian <- ifelse(addhealth$H1GI6D==1,1,0)
addhealth$asian<-Recode(addhealth$asian, recodes="1='asian'; 0='nonasian'; 6:8=NA",as.factor=T)
#Native American
addhealth$native_american <- ifelse(addhealth$H1GI6C==1,1,0)
addhealth$native_american<-Recode(addhealth$native_american, recodes="1='native_american'; 0='nonnative_american'; 6:8=NA",as.factor=T)
#other
addhealth$other <- ifelse(addhealth$H1GI6E==1,1,0)
addhealth$other<-Recode(addhealth$other, recodes="1='other'; 0='nonother'; 6:8=NA",as.factor=T)
#combine race to one variable
addhealth$racethnic <- factor(ifelse(addhealth$nhwhite=="nhwhite","a-nhwhite", 
                                            ifelse(addhealth$nhblack=="nhblack", "b-nhblack", 
                                            ifelse(addhealth$hispanic=="hispanic", "c-hispanic",
                                                   ifelse(addhealth$asian=="asian","d-asian",
                                                          ifelse(addhealth$native_american=="native_american","e-native_american",
                                                                 ifelse(addhealth$other=="other","f-other",NA)))))))
#sex variable
addhealth$sex <- ifelse(addhealth$BIO_SEX==2,2,1)
addhealth$sex<-Recode(addhealth$sex, recodes="1='a_male'; 2='b_female'",as.factor=T)    
#income variable
addhealth$incomeW4<-Recode(addhealth$H4EC1,recodes="1='a_>$15,000';4:6='b_$15,000<$30,000';7:8='c_$30,000<$50,000';9='d_$50,000<$75,000';10='e_$75,000<$100,000';11='f_$100,000<$150,000';12='g_$150,000+';else=NA")
addhealth$treated_lessrespectW4<-Recode(addhealth$H4MH28,recodes="0:1='a_never/rarely';2:3='b_sometimes/often';else=NA")
addhealth$suicideW4think<-Recode(addhealth$H4SE1, recodes="0='a_no';1='b_yes';else=NA",as.factor=T)
addhealth$suicideW4attempt<-Recode(addhealth$H4SE2, recodes="0='a_no';1='once';2:3='b_2-4_times';4='c_5+times';else=NA",as.factor=T)
#variables for having a job and losing a job
addhealth$joblossW4<-Recode(addhealth$H4LM4,recodes="0='a_no';1:50='b_yes';else=NA")
addhealth$jobW3<-Recode(addhealth$H3LM1,recodes="0='b_not_employeed';1='a_employed';else=NA")

Definitions

1) Define your event variable - The event variable is the transition of employement in Wave 3 to unemployment (fired, layed off, let go) in Wave 4

#transition from job to no job
addhealth$job_transition<-ifelse(addhealth$jobW3=='a_employed'&addhealth$joblossW4=='b_yes',1,0)

2) Define a duration or time variable - If the age at unemployment is censored, then the age at the date of interview is the censored age at unemployment, or if not censored, the actual age at umeployment.

#age at job loss
addhealth$job.loss.age<-ifelse(addhealth$job_transition==1,
                            addhealth$agew3,addhealth$agew4)

3) Define a censoring indicator - If someone has experienced the event the are assigned a ā€œ0ā€, if they experience an event they are assigned a ā€œ1ā€.

#select variables to use
addhealth<-addhealth%>%
  select(psuscid,region,GSWGT4,agew4,agew3,social_isolationW4,forcedsex_verbalW4,forcedsex_physicalW4,educ,depressionW4,anxiety.panic_disorder_W4,things.going.mywayW4,unmet_medcareW4,insurance_statusW4,threatened_gun_knifeW4,harmed_gun_knifeW4,beaten_upW4,lack_autonomyW4,alcohol_day_permonthW4,try.cocaineW4,try.methW4,try.herionW4,had.injected.drugsW4,sedatives.downersW4,opioidsW4,general_health,friendships,arrested,foster_home,unloved_bycaretakerW4,hit_kick_thrown_bycaretakerW4,sex_abuse_bycaretakerW4,racethnic,sex,incomeW4,treated_lessrespectW4,suicideW4attempt,suicideW4think,joblossW4,jobW3,job_transition,sexorient,marriedW4a,marriedW4b,job.loss.age,job_transition,physical_limitation,brace_wheelchair,cancer,high_chol,high_bp,diabetes,heart_disease,asthm,migrane,HIV,pregnancy,births,suicideW4think,suicideW4attempt,incarcerated)
#filter complete cases
addhealth<-addhealth%>%
 filter(complete.cases(.))

Descriptive estimates

#load packages
library(survival)
library(survminer)
## Loading required package: ggplot2
## Registered S3 methods overwritten by 'ggplot2':
##   method         from 
##   [.quosures     rlang
##   c.quosures     rlang
##   print.quosures rlang
## Loading required package: ggpubr
## Loading required package: magrittr

4) Estimate the following functions of survival time for that variable and plot them:

a. Survival

fittt<-survfit(Surv(time = agew3,time2 = agew4,event = job_transition)~1,data=addhealth)
summary(fittt)
## Call: survfit(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     1, data = addhealth)
## 
##  time n.risk n.event censored survival std.err lower 95% CI upper 95% CI
##    25   5763       8       22    0.999 0.00049       0.9977        1.000
##    26   5986     183      559    0.968 0.00227       0.9636        0.973
##    27   5291     282      580    0.916 0.00368       0.9093        0.924
##    28   4431     334      898    0.847 0.00498       0.8377        0.857
##    29   3199     344      884    0.756 0.00643       0.7438        0.769
##    30   1971     366      960    0.616 0.00844       0.5995        0.633
##    31    645     126      380    0.496 0.01177       0.4730        0.519
##    32    139      44       83    0.339 0.02114       0.2997        0.383
##    33     12       6        6    0.169 0.05001       0.0949        0.302
ggsurvplot(fittt,data = addhealth,risk.table = T,title="Survival function for job transition",xlim=c(20,35))

library(muhaz)

b. Hazard

haz<-kphaz.fit(time=addhealth$job.loss.age,status = addhealth$job_transition,method = "product-limit")
haz
## $time
## [1] 19.5 20.5 21.5 22.5 23.5 24.5 25.5
## 
## $haz
## [1] 0.046535937 0.048623803 0.071241083 0.068640374 0.058342355 0.015398618
## [7] 0.005153801
## 
## $var
## [1] 7.963177e-06 8.725978e-06 1.357604e-05 1.402783e-05 1.270448e-05
## [6] 3.487141e-06 1.266909e-06
kphaz.plot(haz,main="Hazard Function Plot")

data.frame(haz)

c. Cumulative Hazard

ggsurvplot(fittt,data = addhealth,risk.table = T,fun="cumhaz",title="Cumulative Hazard function for job transition",xlim=c(20,35))

plot(cumsum(haz$haz)~haz$time,
     main="Cumulative Hazard Function",
     ylab="H(t)",xlab="Time in Years",
     type=NULL,lwd=2,col=3)

5) Carry out the following analysis

a. Kaplan-Meier survival analysis of the outcome

fit.kaplan<-survfit(Surv(job.loss.age,job_transition)~1,data=addhealth)
summary(fit.kaplan)
## Call: survfit(formula = Surv(job.loss.age, job_transition) ~ 1, data = addhealth)
## 
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    19   6065      83    0.986 0.00149        0.983        0.989
##    20   5982     272    0.941 0.00301        0.936        0.947
##    21   5710     271    0.897 0.00391        0.889        0.904
##    22   5439     374    0.835 0.00476        0.826        0.845
##    23   5065     336    0.780 0.00532        0.769        0.790
##    24   4729     268    0.736 0.00566        0.725        0.747
##    25   4460      68    0.724 0.00574        0.713        0.736
##    26   4371      21    0.721 0.00576        0.710        0.732

b. Define a grouping variable, this can be dichotomous or categorical.

The grouping variabe is sexual orientation

c. Do you have a research hypothesis about the survival patterns for the levels of the categorical variable? State it. LGB individuals experience a higher rate of job loss that results from employer discrimination due to social stigma.

d. Comparison of Kaplan-Meier survival across grouping variable in your data. Interpret your results. It would appear across all groups that the age at highest risk is around 22-23 years old.

fit.kaplan.LGB<-survfit(Surv(job.loss.age,job_transition)~sexorient,data=addhealth)
summary(fit.kaplan.LGB)
## Call: survfit(formula = Surv(job.loss.age, job_transition) ~ sexorient, 
##     data = addhealth)
## 
##                 sexorient=a_straight 
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    19   5870      81    0.986 0.00152        0.983        0.989
##    20   5789     257    0.942 0.00304        0.936        0.948
##    21   5532     262    0.898 0.00395        0.890        0.906
##    22   5270     359    0.837 0.00483        0.827        0.846
##    23   4911     325    0.781 0.00540        0.771        0.792
##    24   4586     255    0.738 0.00574        0.727        0.749
##    25   4330      63    0.727 0.00581        0.716        0.739
##    26   4247      20    0.724 0.00584        0.712        0.735
## 
##                 sexorient=b_bisexual 
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    19    100       2     0.98  0.0140        0.953        1.000
##    20     98       8     0.90  0.0300        0.843        0.961
##    21     90       8     0.82  0.0384        0.748        0.899
##    22     82      13     0.69  0.0462        0.605        0.787
##    23     69       1     0.68  0.0466        0.594        0.778
##    24     68       5     0.63  0.0483        0.542        0.732
##    25     63       3     0.60  0.0490        0.511        0.704
##    26     60       1     0.59  0.0492        0.501        0.695
## 
##                 sexorient=c_LGB 
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    20     95       7    0.926  0.0268        0.875        0.980
##    21     88       1    0.916  0.0285        0.862        0.973
##    22     87       2    0.895  0.0315        0.835        0.959
##    23     85      10    0.789  0.0418        0.712        0.876
##    24     75       8    0.705  0.0468        0.619        0.803
##    25     67       2    0.684  0.0477        0.597        0.784
ggsurvplot(fit.kaplan.LGB,conf.int = T,risk.table = F,title="Survivorship Function for Job Transition",xlab="Wave of Survey",ylim=c(.50,1),xlim=c(15,35))

coxph(Surv(time=agew3,time2 = agew4 , event = job_transition) ~ factor(sexorient), data=addhealth) 
## Call:
## coxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     factor(sexorient), data = addhealth)
## 
##                                coef exp(coef) se(coef)     z        p
## factor(sexorient)b_bisexual 0.58826   1.80084  0.15821 3.718 0.000201
## factor(sexorient)c_LGB      0.05563   1.05721  0.18427 0.302 0.762731
## 
## Likelihood ratio test=11.62  on 2 df, p=0.002997
## n= 6065, number of events= 1693
  fit0 <- coxph(Surv(time=agew3, time2 = agew4, event = job_transition) ~ factor(sexorient), data=addhealth,
  iter=0, na.action=na.exclude)
  o.minus.e <- tapply(resid(fit0), addhealth$sexorient, sum)
  obs       <- tapply(addhealth$job_transition, addhealth$sexorient, sum)
  cbind(observed=obs, expected= obs- o.minus.e, "o-e"=o.minus.e) 
##            observed   expected        o-e
## a_straight     1622 1641.24159 -19.241591
## b_bisexual       41   23.04697  17.953025
## c_LGB            30   28.71143   1.288566
fit00<-survfit(Surv(time = agew3,time2 = agew4,event = job_transition)~sexorient+sex,addhealth)
summary(fit00)
## Call: survfit(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sexorient + sex, data = addhealth)
## 
##                 sexorient=a_straight, sex=a_male   
##  time n.risk n.event survival  std.err lower 95% CI upper 95% CI
##    25   2639       3    0.999 0.000656       0.9976        1.000
##    26   2773      96    0.964 0.003525       0.9574        0.971
##    27   2491     147    0.907 0.005633       0.8964        0.918
##    28   2119     172    0.834 0.007468       0.8192        0.848
##    29   1602     178    0.741 0.009323       0.7230        0.760
##    30   1030     213    0.588 0.011923       0.5649        0.612
##    31    358      74    0.466 0.015740       0.4365        0.498
##    32     94      32    0.308 0.025044       0.2622        0.361
##    33      9       4    0.171 0.052811       0.0932        0.313
## 
##                 sexorient=a_straight, sex=b_female 
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    25   2941       5    0.998 0.00076       0.9968        1.000
##    26   3022      80    0.972 0.00301       0.9660        0.978
##    27   2621     122    0.927 0.00492       0.9170        0.936
##    28   2173     147    0.864 0.00678       0.8508        0.877
##    29   1503     152    0.777 0.00907       0.7590        0.795
##    30    880     139    0.654 0.01223       0.6304        0.678
##    31    266      46    0.541 0.01823       0.5063        0.578
##    32     41      10    0.409 0.03880       0.3395        0.493
##    33      3       2    0.136 0.11204       0.0272        0.683
## 
##                 sexorient=b_bisexual, sex=a_male   
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    26     15       1    0.933  0.0644        0.815            1
##    27     12       1    0.856  0.0950        0.688            1
##    28      9       1    0.760  0.1232        0.554            1
##    30      4       1    0.570  0.1888        0.298            1
## 
##                 sexorient=b_bisexual, sex=b_female 
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    26     84       3    0.964  0.0202        0.925        1.000
##    27     79       8    0.867  0.0374        0.796        0.943
##    28     60      12    0.693  0.0539        0.595        0.807
##    29     35       6    0.574  0.0628        0.464        0.712
##    30     21       4    0.465  0.0708        0.345        0.627
##    31      7       3    0.266  0.0959        0.131        0.539
##    32      1       1    0.000     NaN           NA           NA
## 
##                 sexorient=c_LGB, sex=a_male   
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    26     58       2    0.966  0.0240        0.920        1.000
##    27     57       1    0.949  0.0289        0.894        1.000
##    28     48       1    0.929  0.0344        0.864        0.999
##    29     38       6    0.782  0.0621        0.669        0.914
##    30     24       7    0.554  0.0849        0.410        0.748
##    31      9       1    0.492  0.0952        0.337        0.719
##    32      3       1    0.328  0.1483        0.135        0.796
## 
##                 sexorient=c_LGB, sex=b_female 
##  time n.risk n.event survival std.err lower 95% CI upper 95% CI
##    26     34       1    0.971  0.0290        0.915        1.000
##    27     31       3    0.877  0.0578        0.770        0.998
##    28     22       1    0.837  0.0675        0.714        0.980
##    29     17       2    0.738  0.0885        0.584        0.934
##    30     12       2    0.615  0.1084        0.436        0.869
##    31      4       2    0.308  0.1631        0.109        0.870
#let's briefly explore parametric hazard models
#install.packages("eha")
library(eha)
#exponential model
#interval censored
fitl1<-phreg(Surv(time=agew3,time2 = agew4,event = job_transition)~sex+sexorient,data=addhealth,dist="weibull",shape=1)
summary(fitl1)
## Call:
## phreg(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + sexorient, data = addhealth, dist = "weibull", shape = 1)
## 
## Covariate          W.mean      Coef Exp(Coef)  se(Coef)    Wald p
## sex 
##           a_male    0.477     0         1           (reference)
##         b_female    0.523    -0.330     0.719     0.049     0.000 
## sexorient 
##       a_straight    0.968     0         1           (reference)
##       b_bisexual    0.016     0.516     1.676     0.159     0.001 
##            c_LGB    0.015     0.099     1.104     0.184     0.592 
## 
## log(scale)                    3.002               0.033     0.000 
## 
##  Shape is fixed at  1 
## 
## Events                    1693 
## Total time at risk         39477 
## Max. log. likelihood      -6998.9 
## LR test statistic         51.48 
## Degrees of freedom        3 
## Overall p-value           3.8583e-11
#weibull model
fitl1a<-phreg(Surv(time=agew3,time2 = agew4,event = job_transition)~sex+sexorient,data=addhealth,dist="weibull")
summary(fitl1a)
## Call:
## phreg(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + sexorient, data = addhealth, dist = "weibull")
## 
## Covariate          W.mean      Coef Exp(Coef)  se(Coef)    Wald p
## sex 
##           a_male    0.477     0         1           (reference)
##         b_female    0.523    -0.129     0.879     0.050     0.009 
## sexorient 
##       a_straight    0.968     0         1           (reference)
##       b_bisexual    0.016     0.658     1.931     0.159     0.000 
##            c_LGB    0.015     0.002     1.002     0.184     0.990 
## 
## log(scale)                    3.442               0.002     0.000 
## log(shape)                    2.941               0.020     0.000 
## 
## Events                    1693 
## Total time at risk         39477 
## Max. log. likelihood      -5382.2 
## LR test statistic         19.07 
## Degrees of freedom        3 
## Overall p-value           0.000264868
#piecewise constant
fitl1b<-phreg(Surv(time=agew3,time2 = agew4,event = job_transition)~sex+sexorient,data=addhealth,dist="pch")
summary(fitl1b)
## Call:
## phreg(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + sexorient, data = addhealth, dist = "pch")
## 
## Covariate          W.mean      Coef Exp(Coef)  se(Coef)    Wald p
## sex 
##           a_male    0.477     0         1           (reference)
##         b_female    0.523    -0.330     0.719     0.049     0.000 
## sexorient 
##       a_straight    0.968     0         1           (reference)
##       b_bisexual    0.016     0.516     1.676     0.159     0.001 
##            c_LGB    0.015     0.099     1.104     0.184     0.592 
## 
## 
## Events                    1693 
## Total time at risk         39477 
## Max. log. likelihood      -6998.9 
## LR test statistic         51.48 
## Degrees of freedom        3 
## Overall p-value           3.8583e-11
#AIC for exponential
-2*fitl1$loglik[2]+2*length(fitl1$coefficients)
## [1] 14005.76
#AIC for weibull
-2*fitl1a$loglik[2]+2*length(fitl1a$coefficients)
## [1] 10774.36
#AIC for piecewise constant
-2*fitl1b$loglik[2]+2*length(fitl1b$coefficients)
## [1] 14003.76
#plot parametric hazard models
fitl1c<-coxreg(Surv(time = agew3,time2 = agew4,event = job_transition)~sex+sexorient,data=addhealth)
check.dist(fitl1c,fitl1, main="Exponential")

check.dist(fitl1c,fitl1a,main = "Weibull")

check.dist(fitl1c,fitl1b,main="Piecewise Exponential")

e. Plot the hazard function for the analysis for each level of the group variable (continued assignment from part d)

fit.haz<-survfit(Surv(time = agew3,time2 = agew4,event = job_transition)~sexorient,data=addhealth)
ggsurvplot(fit.haz,data = addhealth,risk.table=T,fun="cumhaz",title="Hazard Function for Job Transition",xlim=c(20,35))

#Part B #Parametric models ### 1) Carry out the following analysis: Define your outcome as in part A. Also consider what covariates are hypothesized to affect the outcome variable. Define these and construct a parametric model for your outcome. Fit the parametric model of your choosing to the data. #### a. Did you choose an AFT or PH model and why? I chose a Cox Proportional Hazard Model to analyzing the effect of several covariates #### b. Justify what parametric distribution you choose #### c. Carry out model fit diagnostics for the model #### d. Include all main effects in the model #### e. Test for an interaction between at least two of the predictors #### f. Interpret your results and write them up

#job transition based on sexual orientation
fit<-survfit(Surv(time=agew3,time2 = agew4,  event=job_transition)~sexorient,addhealth)
ggsurvplot(fit,data = addhealth,risk.table=T,title="Survivorship Function for LGB job retention",xlim=c(20,35))

#Survey design
library(survey)
## Loading required package: grid
## Loading required package: Matrix
## 
## Attaching package: 'survey'
## The following object is masked from 'package:graphics':
## 
##     dotchart
des2<-svydesign(ids=~psuscid,
                strata = ~region,
                weights=~GSWGT4,
                data=addhealth,
                nest=T)
fit.cox<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+sexorient,design=des2)
summary(fit.cox)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + sexorient, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                         coef exp(coef) se(coef)      z Pr(>|z|)    
## sexb_female         -0.31092   0.73277  0.06242 -4.981 6.33e-07 ***
## sexorientb_bisexual  0.77158   2.16319  0.19879  3.881 0.000104 ***
## sexorientc_LGB      -0.21242   0.80863  0.24960 -0.851 0.394752    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                     exp(coef) exp(-coef) lower .95 upper .95
## sexb_female            0.7328     1.3647    0.6484    0.8281
## sexorientb_bisexual    2.1632     0.4623    1.4652    3.1938
## sexorientc_LGB         0.8086     1.2367    0.4958    1.3189
## 
## Concordance= 0.552  (se = 0.009 )
## Likelihood ratio test= NA  on 3 df,   p=NA
## Wald test            = 37.42  on 3 df,   p=4e-08
## Score (logrank) test = NA  on 3 df,   p=NA
plot(survfit(fit.cox,conf.int = F),ylab = "S(t)",xlab="Age",xlim=c(20,35))

#model with demographic variables
fit1a<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+racethnic+sexorient,design=des2)
summary(fit1a)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                coef exp(coef) se(coef)      z Pr(>|z|)    
## sexb_female                -0.31108   0.73266  0.06224 -4.998 5.78e-07 ***
## racethnicb-nhblack          0.19136   1.21090  0.11862  1.613  0.10669    
## racethnicc-hispanic        -0.03207   0.96844  0.16656 -0.193  0.84731    
## racethnicd-asian           -0.38944   0.67744  0.14946 -2.606  0.00917 ** 
## racethnice-native_american  0.40497   1.49925  0.35379  1.145  0.25236    
## racethnicf-other            0.31728   1.37338  0.42782  0.742  0.45833    
## sexorientb_bisexual         0.76723   2.15379  0.19952  3.845  0.00012 ***
## sexorientc_LGB             -0.20571   0.81407  0.25074 -0.820  0.41197    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                            exp(coef) exp(-coef) lower .95 upper .95
## sexb_female                   0.7327     1.3649    0.6485    0.8277
## racethnicb-nhblack            1.2109     0.8258    0.9597    1.5278
## racethnicc-hispanic           0.9684     1.0326    0.6987    1.3423
## racethnicd-asian              0.6774     1.4761    0.5054    0.9080
## racethnice-native_american    1.4993     0.6670    0.7494    2.9993
## racethnicf-other              1.3734     0.7281    0.5938    3.1765
## sexorientb_bisexual           2.1538     0.4643    1.4567    3.1845
## sexorientc_LGB                0.8141     1.2284    0.4980    1.3307
## 
## Concordance= 0.562  (se = 0.01 )
## Likelihood ratio test= NA  on 8 df,   p=NA
## Wald test            = 47.36  on 8 df,   p=1e-07
## Score (logrank) test = NA  on 8 df,   p=NA
#model with demographic variables, plus social demographic variables
fit1b<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+racethnic+sexorient+educ+incomeW4,design=des2)
summary(fit1b)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient + educ + incomeW4, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                 coef exp(coef) se(coef)      z Pr(>|z|)
## sexb_female                 -0.26169   0.76975  0.06495 -4.029 5.60e-05
## racethnicb-nhblack           0.06211   1.06408  0.11363  0.547 0.584666
## racethnicc-hispanic         -0.11656   0.88997  0.15910 -0.733 0.463769
## racethnicd-asian            -0.18463   0.83141  0.13187 -1.400 0.161507
## racethnice-native_american   0.27289   1.31376  0.34374  0.794 0.427266
## racethnicf-other             0.31860   1.37521  0.40722  0.782 0.433992
## sexorientb_bisexual          0.64966   1.91489  0.18153  3.579 0.000345
## sexorientc_LGB              -0.13175   0.87656  0.24318 -0.542 0.587977
## educb_highschool_grad       -0.08864   0.91518  0.10142 -0.874 0.382139
## educc_college_bach          -0.39819   0.67153  0.14167 -2.811 0.004942
## educd_college+              -1.35634   0.25760  0.20007 -6.779 1.21e-11
## incomeW4b_$15,000<$30,000    0.15776   1.17088  0.23769  0.664 0.506868
## incomeW4c_$30,000<$50,000   -0.14521   0.86484  0.23602 -0.615 0.538380
## incomeW4d_$50,000<$75,000   -0.42673   0.65264  0.24205 -1.763 0.077899
## incomeW4e_$75,000<$100,000  -0.48228   0.61737  0.23275 -2.072 0.038253
## incomeW4f_$100,000<$150,000 -0.66945   0.51199  0.26669 -2.510 0.012065
## incomeW4g_$150,000+         -0.58034   0.55971  0.28256 -2.054 0.039993
##                                
## sexb_female                 ***
## racethnicb-nhblack             
## racethnicc-hispanic            
## racethnicd-asian               
## racethnice-native_american     
## racethnicf-other               
## sexorientb_bisexual         ***
## sexorientc_LGB                 
## educb_highschool_grad          
## educc_college_bach          ** 
## educd_college+              ***
## incomeW4b_$15,000<$30,000      
## incomeW4c_$30,000<$50,000      
## incomeW4d_$50,000<$75,000   .  
## incomeW4e_$75,000<$100,000  *  
## incomeW4f_$100,000<$150,000 *  
## incomeW4g_$150,000+         *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                             exp(coef) exp(-coef) lower .95 upper .95
## sexb_female                    0.7698     1.2991    0.6777    0.8743
## racethnicb-nhblack             1.0641     0.9398    0.8516    1.3295
## racethnicc-hispanic            0.8900     1.1236    0.6516    1.2156
## racethnicd-asian               0.8314     1.2028    0.6420    1.0766
## racethnice-native_american     1.3138     0.7612    0.6698    2.5770
## racethnicf-other               1.3752     0.7272    0.6191    3.0549
## sexorientb_bisexual            1.9149     0.5222    1.3416    2.7332
## sexorientc_LGB                 0.8766     1.1408    0.5442    1.4118
## educb_highschool_grad          0.9152     1.0927    0.7502    1.1164
## educc_college_bach             0.6715     1.4891    0.5087    0.8864
## educd_college+                 0.2576     3.8820    0.1740    0.3813
## incomeW4b_$15,000<$30,000      1.1709     0.8541    0.7348    1.8657
## incomeW4c_$30,000<$50,000      0.8648     1.1563    0.5445    1.3735
## incomeW4d_$50,000<$75,000      0.6526     1.5322    0.4061    1.0488
## incomeW4e_$75,000<$100,000     0.6174     1.6198    0.3912    0.9742
## incomeW4f_$100,000<$150,000    0.5120     1.9532    0.3036    0.8635
## incomeW4g_$150,000+            0.5597     1.7866    0.3217    0.9738
## 
## Concordance= 0.638  (se = 0.01 )
## Likelihood ratio test= NA  on 17 df,   p=NA
## Wald test            = 206.3  on 17 df,   p=<2e-16
## Score (logrank) test = NA  on 17 df,   p=NA
#model with demographic variables, plus social demographic variables, plus family circumstances, 
fit1c<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+racethnic+sexorient+educ+incomeW4+pregnancy+births+foster_home,design=des2)
summary(fit1c)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient + educ + incomeW4 + pregnancy + 
##         births + foster_home, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                 coef exp(coef) se(coef)      z Pr(>|z|)
## sexb_female                 -0.18015   0.83514  0.06605 -2.728 0.006379
## racethnicb-nhblack           0.09293   1.09738  0.11317  0.821 0.411569
## racethnicc-hispanic         -0.12452   0.88292  0.16757 -0.743 0.457417
## racethnicd-asian            -0.25879   0.77199  0.13352 -1.938 0.052598
## racethnice-native_american   0.23833   1.26913  0.37477  0.636 0.524826
## racethnicf-other             0.33342   1.39573  0.40009  0.833 0.404644
## sexorientb_bisexual          0.58657   1.79781  0.17626  3.328 0.000875
## sexorientc_LGB              -0.31139   0.73243  0.24352 -1.279 0.201010
## educb_highschool_grad       -0.17313   0.84102  0.09811 -1.765 0.077615
## educc_college_bach          -0.61664   0.53975  0.14020 -4.398 1.09e-05
## educd_college+              -1.59084   0.20375  0.20383 -7.805 5.97e-15
## incomeW4b_$15,000<$30,000    0.09128   1.09557  0.23931  0.381 0.702884
## incomeW4c_$30,000<$50,000   -0.19792   0.82043  0.23904 -0.828 0.407679
## incomeW4d_$50,000<$75,000   -0.48579   0.61521  0.24508 -1.982 0.047458
## incomeW4e_$75,000<$100,000  -0.54756   0.57836  0.23180 -2.362 0.018168
## incomeW4f_$100,000<$150,000 -0.76776   0.46405  0.26754 -2.870 0.004109
## incomeW4g_$150,000+         -0.69597   0.49859  0.27981 -2.487 0.012872
## pregnancyb_yes               0.02218   1.02243  0.09782  0.227 0.820630
## birthsb_yes                 -0.45580   0.63394  0.10912 -4.177 2.95e-05
## birthsskip                   0.01741   1.01756  0.10545  0.165 0.868872
## foster_homeb_yes            -0.20105   0.81787  0.23936 -0.840 0.400926
##                                
## sexb_female                 ** 
## racethnicb-nhblack             
## racethnicc-hispanic            
## racethnicd-asian            .  
## racethnice-native_american     
## racethnicf-other               
## sexorientb_bisexual         ***
## sexorientc_LGB                 
## educb_highschool_grad       .  
## educc_college_bach          ***
## educd_college+              ***
## incomeW4b_$15,000<$30,000      
## incomeW4c_$30,000<$50,000      
## incomeW4d_$50,000<$75,000   *  
## incomeW4e_$75,000<$100,000  *  
## incomeW4f_$100,000<$150,000 ** 
## incomeW4g_$150,000+         *  
## pregnancyb_yes                 
## birthsb_yes                 ***
## birthsskip                     
## foster_homeb_yes               
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                             exp(coef) exp(-coef) lower .95 upper .95
## sexb_female                    0.8351     1.1974    0.7337    0.9506
## racethnicb-nhblack             1.0974     0.9113    0.8791    1.3699
## racethnicc-hispanic            0.8829     1.1326    0.6358    1.2262
## racethnicd-asian               0.7720     1.2954    0.5942    1.0029
## racethnice-native_american     1.2691     0.7879    0.6088    2.6455
## racethnicf-other               1.3957     0.7165    0.6372    3.0575
## sexorientb_bisexual            1.7978     0.5562    1.2727    2.5397
## sexorientc_LGB                 0.7324     1.3653    0.4544    1.1805
## educb_highschool_grad          0.8410     1.1890    0.6939    1.0193
## educc_college_bach             0.5398     1.8527    0.4101    0.7104
## educd_college+                 0.2038     4.9079    0.1366    0.3038
## incomeW4b_$15,000<$30,000      1.0956     0.9128    0.6854    1.7512
## incomeW4c_$30,000<$50,000      0.8204     1.2189    0.5135    1.3107
## incomeW4d_$50,000<$75,000      0.6152     1.6255    0.3806    0.9946
## incomeW4e_$75,000<$100,000     0.5784     1.7290    0.3672    0.9110
## incomeW4f_$100,000<$150,000    0.4641     2.1549    0.2747    0.7840
## incomeW4g_$150,000+            0.4986     2.0057    0.2881    0.8628
## pregnancyb_yes                 1.0224     0.9781    0.8440    1.2385
## birthsb_yes                    0.6339     1.5774    0.5119    0.7851
## birthsskip                     1.0176     0.9827    0.8276    1.2512
## foster_homeb_yes               0.8179     1.2227    0.5116    1.3075
## 
## Concordance= 0.654  (se = 0.01 )
## Likelihood ratio test= NA  on 21 df,   p=NA
## Wald test            = 318.8  on 21 df,   p=<2e-16
## Score (logrank) test = NA  on 21 df,   p=NA
#model with demographic variables, plus social demographic variables, plus family circumstances, plus structural bias variables
fit1d<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+racethnic+sexorient+educ+incomeW4+pregnancy+births+foster_home+marriedW4a+marriedW4b+insurance_statusW4+unmet_medcareW4+incarcerated,design=des2)
summary(fit1d)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient + educ + incomeW4 + pregnancy + 
##         births + foster_home + marriedW4a + marriedW4b + insurance_statusW4 + 
##         unmet_medcareW4 + incarcerated, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                        coef exp(coef)  se(coef)      z
## sexb_female                       -0.055512  0.946001  0.066519 -0.835
## racethnicb-nhblack                 0.043374  1.044328  0.112033  0.387
## racethnicc-hispanic               -0.114436  0.891869  0.159874 -0.716
## racethnicd-asian                  -0.253826  0.775826  0.133622 -1.900
## racethnice-native_american         0.267135  1.306217  0.348141  0.767
## racethnicf-other                   0.233797  1.263388  0.427399  0.547
## sexorientb_bisexual                0.515939  1.675211  0.189714  2.720
## sexorientc_LGB                    -0.423826  0.654538  0.250698 -1.691
## educb_highschool_grad             -0.054467  0.946990  0.108777 -0.501
## educc_college_bach                -0.433585  0.648181  0.149685 -2.897
## educd_college+                    -1.352682  0.258546  0.206849 -6.539
## incomeW4b_$15,000<$30,000          0.048464  1.049658  0.238873  0.203
## incomeW4c_$30,000<$50,000         -0.145553  0.864544  0.238849 -0.609
## incomeW4d_$50,000<$75,000         -0.364665  0.694429  0.245620 -1.485
## incomeW4e_$75,000<$100,000        -0.355227  0.701014  0.236906 -1.499
## incomeW4f_$100,000<$150,000       -0.608297  0.544277  0.271021 -2.244
## incomeW4g_$150,000+               -0.561173  0.570539  0.286475 -1.959
## pregnancyb_yes                    -0.128192  0.879684  0.100108 -1.281
## birthsb_yes                       -0.338741  0.712667  0.116344 -2.912
## birthsskip                        -0.028690  0.971718  0.110036 -0.261
## foster_homeb_yes                  -0.292761  0.746200  0.234770 -1.247
## marriedW4ab_married                0.309016  1.362084  0.135823  2.275
## marriedW4bb_seperated/divorced     0.007701  1.007731  0.192431  0.040
## marriedW4bc_skip                   0.092757  1.097195  0.137411  0.675
## insurance_statusW4b_yes_insurance -0.225975  0.797738  0.077444 -2.918
## unmet_medcareW4b_yes               0.096451  1.101255  0.073721  1.308
## incarceratedb_yes                 -0.002233  0.997770  0.105609 -0.021
## incarceratedskip                  -0.269455  0.763796  0.089524 -3.010
##                                   Pr(>|z|)    
## sexb_female                        0.40398    
## racethnicb-nhblack                 0.69865    
## racethnicc-hispanic                0.47412    
## racethnicd-asian                   0.05749 .  
## racethnice-native_american         0.44289    
## racethnicf-other                   0.58436    
## sexorientb_bisexual                0.00654 ** 
## sexorientc_LGB                     0.09092 .  
## educb_highschool_grad              0.61657    
## educc_college_bach                 0.00377 ** 
## educd_college+                    6.17e-11 ***
## incomeW4b_$15,000<$30,000          0.83922    
## incomeW4c_$30,000<$50,000          0.54226    
## incomeW4d_$50,000<$75,000          0.13763    
## incomeW4e_$75,000<$100,000         0.13376    
## incomeW4f_$100,000<$150,000        0.02480 *  
## incomeW4g_$150,000+                0.05013 .  
## pregnancyb_yes                     0.20036    
## birthsb_yes                        0.00360 ** 
## birthsskip                         0.79430    
## foster_homeb_yes                   0.21239    
## marriedW4ab_married                0.02290 *  
## marriedW4bb_seperated/divorced     0.96808    
## marriedW4bc_skip                   0.49965    
## insurance_statusW4b_yes_insurance  0.00352 ** 
## unmet_medcareW4b_yes               0.19076    
## incarceratedb_yes                  0.98313    
## incarceratedskip                   0.00261 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                   exp(coef) exp(-coef) lower .95 upper .95
## sexb_female                          0.9460     1.0571    0.8304    1.0777
## racethnicb-nhblack                   1.0443     0.9576    0.8384    1.3008
## racethnicc-hispanic                  0.8919     1.1212    0.6520    1.2201
## racethnicd-asian                     0.7758     1.2889    0.5971    1.0081
## racethnice-native_american           1.3062     0.7656    0.6602    2.5844
## racethnicf-other                     1.2634     0.7915    0.5467    2.9197
## sexorientb_bisexual                  1.6752     0.5969    1.1550    2.4297
## sexorientc_LGB                       0.6545     1.5278    0.4004    1.0699
## educb_highschool_grad                0.9470     1.0560    0.7652    1.1720
## educc_college_bach                   0.6482     1.5428    0.4834    0.8692
## educd_college+                       0.2585     3.8678    0.1724    0.3878
## incomeW4b_$15,000<$30,000            1.0497     0.9527    0.6572    1.6764
## incomeW4c_$30,000<$50,000            0.8645     1.1567    0.5414    1.3807
## incomeW4d_$50,000<$75,000            0.6944     1.4400    0.4291    1.1238
## incomeW4e_$75,000<$100,000           0.7010     1.4265    0.4406    1.1153
## incomeW4f_$100,000<$150,000          0.5443     1.8373    0.3200    0.9258
## incomeW4g_$150,000+                  0.5705     1.7527    0.3254    1.0003
## pregnancyb_yes                       0.8797     1.1368    0.7230    1.0704
## birthsb_yes                          0.7127     1.4032    0.5674    0.8952
## birthsskip                           0.9717     1.0291    0.7832    1.2056
## foster_homeb_yes                     0.7462     1.3401    0.4710    1.1822
## marriedW4ab_married                  1.3621     0.7342    1.0437    1.7775
## marriedW4bb_seperated/divorced       1.0077     0.9923    0.6911    1.4694
## marriedW4bc_skip                     1.0972     0.9114    0.8381    1.4363
## insurance_statusW4b_yes_insurance    0.7977     1.2535    0.6854    0.9285
## unmet_medcareW4b_yes                 1.1013     0.9081    0.9531    1.2724
## incarceratedb_yes                    0.9978     1.0022    0.8112    1.2272
## incarceratedskip                     0.7638     1.3093    0.6409    0.9103
## 
## Concordance= 0.682  (se = 0.009 )
## Likelihood ratio test= NA  on 28 df,   p=NA
## Wald test            = 415.9  on 28 df,   p=<2e-16
## Score (logrank) test = NA  on 28 df,   p=NA
#model with demographic variables, plus social demographic variables, plus family circumstances, plus structural bias variables, plus health variables,
fit1e<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+racethnic+sexorient+educ+incomeW4+pregnancy+births+foster_home+marriedW4a+marriedW4b+insurance_statusW4+unmet_medcareW4+incarcerated+general_health+social_isolationW4+things.going.mywayW4+depressionW4+suicideW4think+physical_limitation+cancer+high_bp+high_chol+diabetes+heart_disease+asthm+migrane+HIV,design=des2)
summary(fit1e)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient + educ + incomeW4 + pregnancy + 
##         births + foster_home + marriedW4a + marriedW4b + insurance_statusW4 + 
##         unmet_medcareW4 + incarcerated + general_health + social_isolationW4 + 
##         things.going.mywayW4 + depressionW4 + suicideW4think + 
##         physical_limitation + cancer + high_bp + high_chol + 
##         diabetes + heart_disease + asthm + migrane + HIV, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                          coef exp(coef)  se(coef)      z
## sexb_female                         -0.113209  0.892964  0.072565 -1.560
## racethnicb-nhblack                   0.065711  1.067918  0.109879  0.598
## racethnicc-hispanic                 -0.106173  0.899269  0.159924 -0.664
## racethnicd-asian                    -0.227081  0.796856  0.135922 -1.671
## racethnice-native_american           0.255670  1.291326  0.368383  0.694
## racethnicf-other                     0.172826  1.188659  0.428207  0.404
## sexorientb_bisexual                  0.469650  1.599434  0.199968  2.349
## sexorientc_LGB                      -0.485992  0.615086  0.245567 -1.979
## educb_highschool_grad               -0.044804  0.956185  0.106897 -0.419
## educc_college_bach                  -0.398449  0.671360  0.151233 -2.635
## educd_college+                      -1.310448  0.269699  0.205313 -6.383
## incomeW4b_$15,000<$30,000            0.093884  1.098432  0.227179  0.413
## incomeW4c_$30,000<$50,000           -0.106907  0.898609  0.223497 -0.478
## incomeW4d_$50,000<$75,000           -0.324193  0.723110  0.231500 -1.400
## incomeW4e_$75,000<$100,000          -0.302302  0.739115  0.224422 -1.347
## incomeW4f_$100,000<$150,000         -0.525941  0.590999  0.256325 -2.052
## incomeW4g_$150,000+                 -0.491393  0.611773  0.270483 -1.817
## pregnancyb_yes                      -0.149090  0.861492  0.101588 -1.468
## birthsb_yes                         -0.314916  0.729850  0.118450 -2.659
## birthsskip                          -0.006176  0.993843  0.110532 -0.056
## foster_homeb_yes                    -0.316110  0.728980  0.231011 -1.368
## marriedW4ab_married                  0.337446  1.401365  0.133201  2.533
## marriedW4bb_seperated/divorced      -0.033783  0.966782  0.193598 -0.174
## marriedW4bc_skip                     0.055590  1.057164  0.135694  0.410
## insurance_statusW4b_yes_insurance   -0.214159  0.807220  0.081073 -2.642
## unmet_medcareW4b_yes                 0.045797  1.046862  0.078037  0.587
## incarceratedb_yes                   -0.012659  0.987421  0.101366 -0.125
## incarceratedskip                    -0.281066  0.754978  0.087955 -3.196
## general_healthb_poor/bad            -0.052885  0.948489  0.115822 -0.457
## social_isolationW4b_sometimes/often  0.049389  1.050629  0.068078  0.725
## things.going.mywayW4b_sometimes     -0.173836  0.840435  0.104452 -1.664
## things.going.mywayW4c_often         -0.258579  0.772148  0.108510 -2.383
## depressionW4b_yes                    0.057417  1.059097  0.094699  0.606
## suicideW4thinkb_yes                  0.013442  1.013532  0.109607  0.123
## physical_limitationb_limited         0.186552  1.205087  0.124455  1.499
## cancerb_yes                          0.368466  1.445515  0.273108  1.349
## high_bpb_yes                         0.021540  1.021774  0.114493  0.188
## high_cholb_yes                       0.036325  1.036993  0.101376  0.358
## diabetesb_yes                       -0.088387  0.915406  0.202042 -0.437
## heart_diseaseb_yes                  -0.042183  0.958694  0.258643 -0.163
## asthmb_yes                           0.201559  1.223309  0.081770  2.465
## migraneb_yes                         0.173226  1.189135  0.098193  1.764
## HIVb_yes                             0.619510  1.858018  0.760346  0.815
##                                     Pr(>|z|)    
## sexb_female                          0.11874    
## racethnicb-nhblack                   0.54982    
## racethnicc-hispanic                  0.50676    
## racethnicd-asian                     0.09479 .  
## racethnice-native_american           0.48766    
## racethnicf-other                     0.68650    
## sexorientb_bisexual                  0.01884 *  
## sexorientc_LGB                       0.04781 *  
## educb_highschool_grad                0.67512    
## educc_college_bach                   0.00842 ** 
## educd_college+                      1.74e-10 ***
## incomeW4b_$15,000<$30,000            0.67942    
## incomeW4c_$30,000<$50,000            0.63241    
## incomeW4d_$50,000<$75,000            0.16139    
## incomeW4e_$75,000<$100,000           0.17797    
## incomeW4f_$100,000<$150,000          0.04018 *  
## incomeW4g_$150,000+                  0.06926 .  
## pregnancyb_yes                       0.14221    
## birthsb_yes                          0.00785 ** 
## birthsskip                           0.95544    
## foster_homeb_yes                     0.17119    
## marriedW4ab_married                  0.01130 *  
## marriedW4bb_seperated/divorced       0.86147    
## marriedW4bc_skip                     0.68205    
## insurance_statusW4b_yes_insurance    0.00825 ** 
## unmet_medcareW4b_yes                 0.55729    
## incarceratedb_yes                    0.90062    
## incarceratedskip                     0.00140 ** 
## general_healthb_poor/bad             0.64796    
## social_isolationW4b_sometimes/often  0.46816    
## things.going.mywayW4b_sometimes      0.09606 .  
## things.going.mywayW4c_often          0.01717 *  
## depressionW4b_yes                    0.54431    
## suicideW4thinkb_yes                  0.90240    
## physical_limitationb_limited         0.13389    
## cancerb_yes                          0.17729    
## high_bpb_yes                         0.85077    
## high_cholb_yes                       0.72010    
## diabetesb_yes                        0.66177    
## heart_diseaseb_yes                   0.87044    
## asthmb_yes                           0.01370 *  
## migraneb_yes                         0.07771 .  
## HIVb_yes                             0.41520    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                     exp(coef) exp(-coef) lower .95
## sexb_female                            0.8930     1.1199    0.7746
## racethnicb-nhblack                     1.0679     0.9364    0.8610
## racethnicc-hispanic                    0.8993     1.1120    0.6573
## racethnicd-asian                       0.7969     1.2549    0.6105
## racethnice-native_american             1.2913     0.7744    0.6273
## racethnicf-other                       1.1887     0.8413    0.5135
## sexorientb_bisexual                    1.5994     0.6252    1.0808
## sexorientc_LGB                         0.6151     1.6258    0.3801
## educb_highschool_grad                  0.9562     1.0458    0.7754
## educc_college_bach                     0.6714     1.4895    0.4991
## educd_college+                         0.2697     3.7078    0.1804
## incomeW4b_$15,000<$30,000              1.0984     0.9104    0.7037
## incomeW4c_$30,000<$50,000              0.8986     1.1128    0.5799
## incomeW4d_$50,000<$75,000              0.7231     1.3829    0.4594
## incomeW4e_$75,000<$100,000             0.7391     1.3530    0.4761
## incomeW4f_$100,000<$150,000            0.5910     1.6921    0.3576
## incomeW4g_$150,000+                    0.6118     1.6346    0.3600
## pregnancyb_yes                         0.8615     1.1608    0.7060
## birthsb_yes                            0.7299     1.3701    0.5786
## birthsskip                             0.9938     1.0062    0.8003
## foster_homeb_yes                       0.7290     1.3718    0.4635
## marriedW4ab_married                    1.4014     0.7136    1.0794
## marriedW4bb_seperated/divorced         0.9668     1.0344    0.6615
## marriedW4bc_skip                       1.0572     0.9459    0.8103
## insurance_statusW4b_yes_insurance      0.8072     1.2388    0.6886
## unmet_medcareW4b_yes                   1.0469     0.9552    0.8984
## incarceratedb_yes                      0.9874     1.0127    0.8095
## incarceratedskip                       0.7550     1.3245    0.6354
## general_healthb_poor/bad               0.9485     1.0543    0.7559
## social_isolationW4b_sometimes/often    1.0506     0.9518    0.9194
## things.going.mywayW4b_sometimes        0.8404     1.1899    0.6848
## things.going.mywayW4c_often            0.7721     1.2951    0.6242
## depressionW4b_yes                      1.0591     0.9442    0.8797
## suicideW4thinkb_yes                    1.0135     0.9866    0.8176
## physical_limitationb_limited           1.2051     0.8298    0.9442
## cancerb_yes                            1.4455     0.6918    0.8464
## high_bpb_yes                           1.0218     0.9787    0.8164
## high_cholb_yes                         1.0370     0.9643    0.8501
## diabetesb_yes                          0.9154     1.0924    0.6161
## heart_diseaseb_yes                     0.9587     1.0431    0.5775
## asthmb_yes                             1.2233     0.8175    1.0422
## migraneb_yes                           1.1891     0.8409    0.9810
## HIVb_yes                               1.8580     0.5382    0.4186
##                                     upper .95
## sexb_female                            1.0294
## racethnicb-nhblack                     1.3245
## racethnicc-hispanic                    1.2303
## racethnicd-asian                       1.0401
## racethnice-native_american             2.6583
## racethnicf-other                       2.7514
## sexorientb_bisexual                    2.3669
## sexorientc_LGB                         0.9953
## educb_highschool_grad                  1.1791
## educc_college_bach                     0.9030
## educd_college+                         0.4033
## incomeW4b_$15,000<$30,000              1.7145
## incomeW4c_$30,000<$50,000              1.3926
## incomeW4d_$50,000<$75,000              1.1383
## incomeW4e_$75,000<$100,000             1.1475
## incomeW4f_$100,000<$150,000            0.9767
## incomeW4g_$150,000+                    1.0395
## pregnancyb_yes                         1.0513
## birthsb_yes                            0.9206
## birthsskip                             1.2342
## foster_homeb_yes                       1.1464
## marriedW4ab_married                    1.8194
## marriedW4bb_seperated/divorced         1.4129
## marriedW4bc_skip                       1.3793
## insurance_statusW4b_yes_insurance      0.9462
## unmet_medcareW4b_yes                   1.2199
## incarceratedb_yes                      1.2044
## incarceratedskip                       0.8970
## general_healthb_poor/bad               1.1902
## social_isolationW4b_sometimes/often    1.2006
## things.going.mywayW4b_sometimes        1.0314
## things.going.mywayW4c_often            0.9551
## depressionW4b_yes                      1.2751
## suicideW4thinkb_yes                    1.2564
## physical_limitationb_limited           1.5380
## cancerb_yes                            2.4688
## high_bpb_yes                           1.2788
## high_cholb_yes                         1.2649
## diabetesb_yes                          1.3602
## heart_diseaseb_yes                     1.5916
## asthmb_yes                             1.4359
## migraneb_yes                           1.4415
## HIVb_yes                               8.2463
## 
## Concordance= 0.689  (se = 0.009 )
## Likelihood ratio test= NA  on 43 df,   p=NA
## Wald test            = 573.6  on 43 df,   p=<2e-16
## Score (logrank) test = NA  on 43 df,   p=NA
#model with demographic variables, plus social demographic variables, plus family circumstances, plus structural bias variables, plus health variables, plus discrimination/victimization
fit1f<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+racethnic+sexorient+educ+incomeW4+pregnancy+births+foster_home+marriedW4a+marriedW4b+insurance_statusW4+unmet_medcareW4+incarcerated+general_health+social_isolationW4+things.going.mywayW4+depressionW4+suicideW4think+physical_limitation+cancer+high_bp+high_chol+diabetes+heart_disease+asthm+migrane+HIV+threatened_gun_knifeW4+forcedsex_physicalW4+beaten_upW4+sex_abuse_bycaretakerW4,design=des2)
summary(fit1f)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient + educ + incomeW4 + pregnancy + 
##         births + foster_home + marriedW4a + marriedW4b + insurance_statusW4 + 
##         unmet_medcareW4 + incarcerated + general_health + social_isolationW4 + 
##         things.going.mywayW4 + depressionW4 + suicideW4think + 
##         physical_limitation + cancer + high_bp + high_chol + 
##         diabetes + heart_disease + asthm + migrane + HIV + threatened_gun_knifeW4 + 
##         forcedsex_physicalW4 + beaten_upW4 + sex_abuse_bycaretakerW4, 
##     design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                          coef exp(coef)  se(coef)      z
## sexb_female                         -0.139113  0.870129  0.071060 -1.958
## racethnicb-nhblack                   0.072408  1.075094  0.110433  0.656
## racethnicc-hispanic                 -0.101146  0.903801  0.159193 -0.635
## racethnicd-asian                    -0.223741  0.799522  0.135018 -1.657
## racethnice-native_american           0.245037  1.277668  0.377602  0.649
## racethnicf-other                     0.173067  1.188945  0.429645  0.403
## sexorientb_bisexual                  0.444968  1.560441  0.201915  2.204
## sexorientc_LGB                      -0.500335  0.606327  0.247421 -2.022
## educb_highschool_grad               -0.042432  0.958456  0.108187 -0.392
## educc_college_bach                  -0.393251  0.674860  0.152439 -2.580
## educd_college+                      -1.304080  0.271422  0.206033 -6.329
## incomeW4b_$15,000<$30,000            0.085906  1.089703  0.228396  0.376
## incomeW4c_$30,000<$50,000           -0.110586  0.895309  0.223946 -0.494
## incomeW4d_$50,000<$75,000           -0.330238  0.718753  0.231699 -1.425
## incomeW4e_$75,000<$100,000          -0.307812  0.735054  0.224923 -1.369
## incomeW4f_$100,000<$150,000         -0.532172  0.587328  0.258108 -2.062
## incomeW4g_$150,000+                 -0.501386  0.605690  0.270928 -1.851
## pregnancyb_yes                      -0.161721  0.850678  0.102227 -1.582
## birthsb_yes                         -0.318517  0.727226  0.120314 -2.647
## birthsskip                          -0.011160  0.988902  0.111518 -0.100
## foster_homeb_yes                    -0.384589  0.680730  0.253762 -1.516
## marriedW4ab_married                  0.344118  1.410745  0.132529  2.597
## marriedW4bb_seperated/divorced      -0.036646  0.964017  0.191736 -0.191
## marriedW4bc_skip                     0.053402  1.054854  0.135591  0.394
## insurance_statusW4b_yes_insurance   -0.218108  0.804039  0.081517 -2.676
## unmet_medcareW4b_yes                 0.043725  1.044696  0.077720  0.563
## incarceratedb_yes                   -0.013665  0.986428  0.101778 -0.134
## incarceratedskip                    -0.275591  0.759123  0.086872 -3.172
## general_healthb_poor/bad            -0.053113  0.948273  0.116461 -0.456
## social_isolationW4b_sometimes/often  0.044614  1.045624  0.068454  0.652
## things.going.mywayW4b_sometimes     -0.173651  0.840590  0.106738 -1.627
## things.going.mywayW4c_often         -0.256672  0.773622  0.108726 -2.361
## depressionW4b_yes                    0.046187  1.047270  0.097205  0.475
## suicideW4thinkb_yes                  0.006608  1.006630  0.108634  0.061
## physical_limitationb_limited         0.172787  1.188613  0.126604  1.365
## cancerb_yes                          0.362054  1.436276  0.272090  1.331
## high_bpb_yes                         0.019421  1.019611  0.117472  0.165
## high_cholb_yes                       0.038627  1.039383  0.101182  0.382
## diabetesb_yes                       -0.086581  0.917061  0.204061 -0.424
## heart_diseaseb_yes                  -0.061872  0.940004  0.257714 -0.240
## asthmb_yes                           0.197250  1.218048  0.081355  2.425
## migraneb_yes                         0.168502  1.183530  0.098743  1.706
## HIVb_yes                             0.577934  1.782353  0.731429  0.790
## threatened_gun_knifeW4b_yes         -0.085341  0.918199  0.162412 -0.525
## forcedsex_physicalW4b_yes            0.120726  1.128316  0.107670  1.121
## beaten_upW4b_yes                     0.086408  1.090251  0.162726  0.531
## sex_abuse_bycaretakerW4b_>10_times   0.043489  1.044448  0.156387  0.278
## sex_abuse_bycaretakerW4c_10+_times   0.083480  1.087064  0.240808  0.347
##                                     Pr(>|z|)    
## sexb_female                          0.05027 .  
## racethnicb-nhblack                   0.51203    
## racethnicc-hispanic                  0.52519    
## racethnicd-asian                     0.09749 .  
## racethnice-native_american           0.51638    
## racethnicf-other                     0.68709    
## sexorientb_bisexual                  0.02754 *  
## sexorientc_LGB                       0.04316 *  
## educb_highschool_grad                0.69491    
## educc_college_bach                   0.00989 ** 
## educd_college+                      2.46e-10 ***
## incomeW4b_$15,000<$30,000            0.70682    
## incomeW4c_$30,000<$50,000            0.62144    
## incomeW4d_$50,000<$75,000            0.15407    
## incomeW4e_$75,000<$100,000           0.17115    
## incomeW4f_$100,000<$150,000          0.03922 *  
## incomeW4g_$150,000+                  0.06422 .  
## pregnancyb_yes                       0.11365    
## birthsb_yes                          0.00811 ** 
## birthsskip                           0.92029    
## foster_homeb_yes                     0.12963    
## marriedW4ab_married                  0.00942 ** 
## marriedW4bb_seperated/divorced       0.84842    
## marriedW4bc_skip                     0.69369    
## insurance_statusW4b_yes_insurance    0.00746 ** 
## unmet_medcareW4b_yes                 0.57371    
## incarceratedb_yes                    0.89320    
## incarceratedskip                     0.00151 ** 
## general_healthb_poor/bad             0.64835    
## social_isolationW4b_sometimes/often  0.51457    
## things.going.mywayW4b_sometimes      0.10376    
## things.going.mywayW4c_often          0.01824 *  
## depressionW4b_yes                    0.63468    
## suicideW4thinkb_yes                  0.95149    
## physical_limitationb_limited         0.17232    
## cancerb_yes                          0.18331    
## high_bpb_yes                         0.86869    
## high_cholb_yes                       0.70264    
## diabetesb_yes                        0.67135    
## heart_diseaseb_yes                   0.81027    
## asthmb_yes                           0.01533 *  
## migraneb_yes                         0.08792 .  
## HIVb_yes                             0.42944    
## threatened_gun_knifeW4b_yes          0.59926    
## forcedsex_physicalW4b_yes            0.26218    
## beaten_upW4b_yes                     0.59542    
## sex_abuse_bycaretakerW4b_>10_times   0.78095    
## sex_abuse_bycaretakerW4c_10+_times   0.72884    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                     exp(coef) exp(-coef) lower .95
## sexb_female                            0.8701     1.1493    0.7570
## racethnicb-nhblack                     1.0751     0.9302    0.8659
## racethnicc-hispanic                    0.9038     1.1064    0.6616
## racethnicd-asian                       0.7995     1.2507    0.6136
## racethnice-native_american             1.2777     0.7827    0.6095
## racethnicf-other                       1.1889     0.8411    0.5122
## sexorientb_bisexual                    1.5604     0.6408    1.0505
## sexorientc_LGB                         0.6063     1.6493    0.3733
## educb_highschool_grad                  0.9585     1.0433    0.7753
## educc_college_bach                     0.6749     1.4818    0.5006
## educd_college+                         0.2714     3.6843    0.1812
## incomeW4b_$15,000<$30,000              1.0897     0.9177    0.6965
## incomeW4c_$30,000<$50,000              0.8953     1.1169    0.5772
## incomeW4d_$50,000<$75,000              0.7188     1.3913    0.4564
## incomeW4e_$75,000<$100,000             0.7351     1.3604    0.4730
## incomeW4f_$100,000<$150,000            0.5873     1.7026    0.3541
## incomeW4g_$150,000+                    0.6057     1.6510    0.3562
## pregnancyb_yes                         0.8507     1.1755    0.6962
## birthsb_yes                            0.7272     1.3751    0.5745
## birthsskip                             0.9889     1.0112    0.7947
## foster_homeb_yes                       0.6807     1.4690    0.4140
## marriedW4ab_married                    1.4107     0.7088    1.0880
## marriedW4bb_seperated/divorced         0.9640     1.0373    0.6620
## marriedW4bc_skip                       1.0549     0.9480    0.8087
## insurance_statusW4b_yes_insurance      0.8040     1.2437    0.6853
## unmet_medcareW4b_yes                   1.0447     0.9572    0.8971
## incarceratedb_yes                      0.9864     1.0138    0.8080
## incarceratedskip                       0.7591     1.3173    0.6403
## general_healthb_poor/bad               0.9483     1.0545    0.7547
## social_isolationW4b_sometimes/often    1.0456     0.9564    0.9143
## things.going.mywayW4b_sometimes        0.8406     1.1896    0.6819
## things.going.mywayW4c_often            0.7736     1.2926    0.6251
## depressionW4b_yes                      1.0473     0.9549    0.8656
## suicideW4thinkb_yes                    1.0066     0.9934    0.8136
## physical_limitationb_limited           1.1886     0.8413    0.9274
## cancerb_yes                            1.4363     0.6962    0.8426
## high_bpb_yes                           1.0196     0.9808    0.8099
## high_cholb_yes                         1.0394     0.9621    0.8524
## diabetesb_yes                          0.9171     1.0904    0.6148
## heart_diseaseb_yes                     0.9400     1.0638    0.5672
## asthmb_yes                             1.2180     0.8210    1.0385
## migraneb_yes                           1.1835     0.8449    0.9753
## HIVb_yes                               1.7824     0.5611    0.4250
## threatened_gun_knifeW4b_yes            0.9182     1.0891    0.6679
## forcedsex_physicalW4b_yes              1.1283     0.8863    0.9137
## beaten_upW4b_yes                       1.0903     0.9172    0.7925
## sex_abuse_bycaretakerW4b_>10_times     1.0444     0.9574    0.7687
## sex_abuse_bycaretakerW4c_10+_times     1.0871     0.9199    0.6781
##                                     upper .95
## sexb_female                            1.0002
## racethnicb-nhblack                     1.3349
## racethnicc-hispanic                    1.2347
## racethnicd-asian                       1.0417
## racethnice-native_american             2.6781
## racethnicf-other                       2.7598
## sexorientb_bisexual                    2.3180
## sexorientc_LGB                         0.9847
## educb_highschool_grad                  1.1848
## educc_college_bach                     0.9098
## educd_college+                         0.4065
## incomeW4b_$15,000<$30,000              1.7050
## incomeW4c_$30,000<$50,000              1.3887
## incomeW4d_$50,000<$75,000              1.1319
## incomeW4e_$75,000<$100,000             1.1423
## incomeW4f_$100,000<$150,000            0.9741
## incomeW4g_$150,000+                    1.0301
## pregnancyb_yes                         1.0394
## birthsb_yes                            0.9206
## birthsskip                             1.2305
## foster_homeb_yes                       1.1194
## marriedW4ab_married                    1.8292
## marriedW4bb_seperated/divorced         1.4038
## marriedW4bc_skip                       1.3760
## insurance_statusW4b_yes_insurance      0.9433
## unmet_medcareW4b_yes                   1.2166
## incarceratedb_yes                      1.2042
## incarceratedskip                       0.9000
## general_healthb_poor/bad               1.1914
## social_isolationW4b_sometimes/often    1.1958
## things.going.mywayW4b_sometimes        1.0362
## things.going.mywayW4c_often            0.9574
## depressionW4b_yes                      1.2671
## suicideW4thinkb_yes                    1.2455
## physical_limitationb_limited           1.5234
## cancerb_yes                            2.4482
## high_bpb_yes                           1.2836
## high_cholb_yes                         1.2674
## diabetesb_yes                          1.3680
## heart_diseaseb_yes                     1.5577
## asthmb_yes                             1.4286
## migraneb_yes                           1.4362
## HIVb_yes                               7.4746
## threatened_gun_knifeW4b_yes            1.2624
## forcedsex_physicalW4b_yes              1.3934
## beaten_upW4b_yes                       1.4998
## sex_abuse_bycaretakerW4b_>10_times     1.4191
## sex_abuse_bycaretakerW4c_10+_times     1.7427
## 
## Concordance= 0.689  (se = 0.009 )
## Likelihood ratio test= NA  on 48 df,   p=NA
## Wald test            = 663  on 48 df,   p=<2e-16
## Score (logrank) test = NA  on 48 df,   p=NA
#model with demographic variables, plus social demographic variables, plus family circumstances, plus structural bias variables, plus health variables, plus discrimination/victimization, plus subatance abuse
fit1g<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~sex+racethnic+sexorient+educ+incomeW4+pregnancy+births+foster_home+marriedW4a+marriedW4b+insurance_statusW4+unmet_medcareW4+incarcerated+general_health+social_isolationW4+things.going.mywayW4+depressionW4+suicideW4think+physical_limitation+cancer+high_bp+high_chol+diabetes+heart_disease+asthm+migrane+HIV+threatened_gun_knifeW4+forcedsex_physicalW4+beaten_upW4+sex_abuse_bycaretakerW4+alcohol_day_permonthW4+try.cocaineW4+try.methW4+try.herionW4,design=des2)
summary(fit1g)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient + educ + incomeW4 + pregnancy + 
##         births + foster_home + marriedW4a + marriedW4b + insurance_statusW4 + 
##         unmet_medcareW4 + incarcerated + general_health + social_isolationW4 + 
##         things.going.mywayW4 + depressionW4 + suicideW4think + 
##         physical_limitation + cancer + high_bp + high_chol + 
##         diabetes + heart_disease + asthm + migrane + HIV + threatened_gun_knifeW4 + 
##         forcedsex_physicalW4 + beaten_upW4 + sex_abuse_bycaretakerW4 + 
##         alcohol_day_permonthW4 + try.cocaineW4 + try.methW4 + 
##         try.herionW4, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                            coef exp(coef)  se(coef)      z
## sexb_female                           -0.130391  0.877752  0.070606 -1.847
## racethnicb-nhblack                     0.147821  1.159305  0.117438  1.259
## racethnicc-hispanic                   -0.086811  0.916851  0.156839 -0.554
## racethnicd-asian                      -0.203657  0.815742  0.136945 -1.487
## racethnice-native_american             0.311910  1.366031  0.381457  0.818
## racethnicf-other                       0.241930  1.273706  0.417471  0.580
## sexorientb_bisexual                    0.424368  1.528624  0.203621  2.084
## sexorientc_LGB                        -0.513684  0.598287  0.252170 -2.037
## educb_highschool_grad                 -0.057934  0.943712  0.106841 -0.542
## educc_college_bach                    -0.393456  0.674721  0.150865 -2.608
## educd_college+                        -1.301084  0.272237  0.202378 -6.429
## incomeW4b_$15,000<$30,000              0.071578  1.074202  0.225494  0.317
## incomeW4c_$30,000<$50,000             -0.142900  0.866840  0.218534 -0.654
## incomeW4d_$50,000<$75,000             -0.362505  0.695931  0.227371 -1.594
## incomeW4e_$75,000<$100,000            -0.338210  0.713046  0.218286 -1.549
## incomeW4f_$100,000<$150,000           -0.576720  0.561738  0.254121 -2.269
## incomeW4g_$150,000+                   -0.544870  0.579917  0.265716 -2.051
## pregnancyb_yes                        -0.166648  0.846498  0.101719 -1.638
## birthsb_yes                           -0.305357  0.736861  0.119671 -2.552
## birthsskip                            -0.010238  0.989815  0.112149 -0.091
## foster_homeb_yes                      -0.392916  0.675086  0.263127 -1.493
## marriedW4ab_married                    0.337182  1.400994  0.129448  2.605
## marriedW4bb_seperated/divorced        -0.037515  0.963180  0.193694 -0.194
## marriedW4bc_skip                       0.034226  1.034818  0.136067  0.252
## insurance_statusW4b_yes_insurance     -0.198228  0.820182  0.082619 -2.399
## unmet_medcareW4b_yes                   0.024900  1.025212  0.078013  0.319
## incarceratedb_yes                     -0.043464  0.957467  0.103064 -0.422
## incarceratedskip                      -0.226337  0.797449  0.087219 -2.595
## general_healthb_poor/bad              -0.049484  0.951721  0.116621 -0.424
## social_isolationW4b_sometimes/often    0.031285  1.031780  0.068893  0.454
## things.going.mywayW4b_sometimes       -0.181113  0.834341  0.108337 -1.672
## things.going.mywayW4c_often           -0.270520  0.762983  0.109969 -2.460
## depressionW4b_yes                      0.036897  1.037587  0.095555  0.386
## suicideW4thinkb_yes                   -0.020160  0.980042  0.108581 -0.186
## physical_limitationb_limited           0.165053  1.179456  0.125272  1.318
## cancerb_yes                            0.389752  1.476615  0.270877  1.439
## high_bpb_yes                           0.009657  1.009704  0.115283  0.084
## high_cholb_yes                         0.032901  1.033449  0.100670  0.327
## diabetesb_yes                         -0.063213  0.938743  0.200351 -0.316
## heart_diseaseb_yes                    -0.108977  0.896751  0.265839 -0.410
## asthmb_yes                             0.194792  1.215059  0.080260  2.427
## migraneb_yes                           0.156354  1.169240  0.099938  1.565
## HIVb_yes                               0.659842  1.934487  0.711842  0.927
## threatened_gun_knifeW4b_yes           -0.072144  0.930397  0.159115 -0.453
## forcedsex_physicalW4b_yes              0.115355  1.122272  0.107814  1.070
## beaten_upW4b_yes                       0.070952  1.073529  0.158447  0.448
## sex_abuse_bycaretakerW4b_>10_times     0.052262  1.053652  0.153237  0.341
## sex_abuse_bycaretakerW4c_10+_times     0.082059  1.085520  0.232424  0.353
## alcohol_day_permonthW4b_1or2days/week -0.011308  0.988756  0.087053 -0.130
## alcohol_day_permonthW4c_3to5days/week -0.100543  0.904346  0.098232 -1.024
## alcohol_day_permonthW4d_daily          0.087205  1.091120  0.143236  0.609
## try.cocaineW4b_yes                     0.019990  1.020191  0.118370  0.169
## try.methW4b_yes                        0.063723  1.065797  0.112073  0.569
## try.herionW4b_yes                      0.243196  1.275319  0.087458  2.781
##                                       Pr(>|z|)    
## sexb_female                            0.06479 .  
## racethnicb-nhblack                     0.20814    
## racethnicc-hispanic                    0.57992    
## racethnicd-asian                       0.13698    
## racethnice-native_american             0.41354    
## racethnicf-other                       0.56224    
## sexorientb_bisexual                    0.03715 *  
## sexorientc_LGB                         0.04164 *  
## educb_highschool_grad                  0.58765    
## educc_college_bach                     0.00911 ** 
## educd_college+                        1.28e-10 ***
## incomeW4b_$15,000<$30,000              0.75092    
## incomeW4c_$30,000<$50,000              0.51317    
## incomeW4d_$50,000<$75,000              0.11086    
## incomeW4e_$75,000<$100,000             0.12129    
## incomeW4f_$100,000<$150,000            0.02324 *  
## incomeW4g_$150,000+                    0.04031 *  
## pregnancyb_yes                         0.10135    
## birthsb_yes                            0.01072 *  
## birthsskip                             0.92727    
## foster_homeb_yes                       0.13537    
## marriedW4ab_married                    0.00919 ** 
## marriedW4bb_seperated/divorced         0.84643    
## marriedW4bc_skip                       0.80140    
## insurance_statusW4b_yes_insurance      0.01643 *  
## unmet_medcareW4b_yes                   0.74959    
## incarceratedb_yes                      0.67323    
## incarceratedskip                       0.00946 ** 
## general_healthb_poor/bad               0.67134    
## social_isolationW4b_sometimes/often    0.64975    
## things.going.mywayW4b_sometimes        0.09457 .  
## things.going.mywayW4c_often            0.01390 *  
## depressionW4b_yes                      0.69939    
## suicideW4thinkb_yes                    0.85271    
## physical_limitationb_limited           0.18765    
## cancerb_yes                            0.15019    
## high_bpb_yes                           0.93324    
## high_cholb_yes                         0.74380    
## diabetesb_yes                          0.75237    
## heart_diseaseb_yes                     0.68185    
## asthmb_yes                             0.01522 *  
## migraneb_yes                           0.11770    
## HIVb_yes                               0.35395    
## threatened_gun_knifeW4b_yes            0.65026    
## forcedsex_physicalW4b_yes              0.28465    
## beaten_upW4b_yes                       0.65430    
## sex_abuse_bycaretakerW4b_>10_times     0.73306    
## sex_abuse_bycaretakerW4c_10+_times     0.72404    
## alcohol_day_permonthW4b_1or2days/week  0.89665    
## alcohol_day_permonthW4c_3to5days/week  0.30606    
## alcohol_day_permonthW4d_daily          0.54264    
## try.cocaineW4b_yes                     0.86589    
## try.methW4b_yes                        0.56964    
## try.herionW4b_yes                      0.00542 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                       exp(coef) exp(-coef) lower .95
## sexb_female                              0.8778     1.1393    0.7643
## racethnicb-nhblack                       1.1593     0.8626    0.9209
## racethnicc-hispanic                      0.9169     1.0907    0.6742
## racethnicd-asian                         0.8157     1.2259    0.6237
## racethnice-native_american               1.3660     0.7320    0.6468
## racethnicf-other                         1.2737     0.7851    0.5620
## sexorientb_bisexual                      1.5286     0.6542    1.0256
## sexorientc_LGB                           0.5983     1.6714    0.3650
## educb_highschool_grad                    0.9437     1.0596    0.7654
## educc_college_bach                       0.6747     1.4821    0.5020
## educd_college+                           0.2722     3.6733    0.1831
## incomeW4b_$15,000<$30,000                1.0742     0.9309    0.6905
## incomeW4c_$30,000<$50,000                0.8668     1.1536    0.5648
## incomeW4d_$50,000<$75,000                0.6959     1.4369    0.4457
## incomeW4e_$75,000<$100,000               0.7130     1.4024    0.4648
## incomeW4f_$100,000<$150,000              0.5617     1.7802    0.3414
## incomeW4g_$150,000+                      0.5799     1.7244    0.3445
## pregnancyb_yes                           0.8465     1.1813    0.6935
## birthsb_yes                              0.7369     1.3571    0.5828
## birthsskip                               0.9898     1.0103    0.7945
## foster_homeb_yes                         0.6751     1.4813    0.4031
## marriedW4ab_married                      1.4010     0.7138    1.0871
## marriedW4bb_seperated/divorced           0.9632     1.0382    0.6589
## marriedW4bc_skip                         1.0348     0.9664    0.7926
## insurance_statusW4b_yes_insurance        0.8202     1.2192    0.6976
## unmet_medcareW4b_yes                     1.0252     0.9754    0.8799
## incarceratedb_yes                        0.9575     1.0444    0.7823
## incarceratedskip                         0.7974     1.2540    0.6721
## general_healthb_poor/bad                 0.9517     1.0507    0.7573
## social_isolationW4b_sometimes/often      1.0318     0.9692    0.9015
## things.going.mywayW4b_sometimes          0.8343     1.1986    0.6747
## things.going.mywayW4c_often              0.7630     1.3106    0.6150
## depressionW4b_yes                        1.0376     0.9638    0.8604
## suicideW4thinkb_yes                      0.9800     1.0204    0.7922
## physical_limitationb_limited             1.1795     0.8478    0.9227
## cancerb_yes                              1.4766     0.6772    0.8684
## high_bpb_yes                             1.0097     0.9904    0.8055
## high_cholb_yes                           1.0334     0.9676    0.8484
## diabetesb_yes                            0.9387     1.0653    0.6339
## heart_diseaseb_yes                       0.8968     1.1151    0.5326
## asthmb_yes                               1.2151     0.8230    1.0382
## migraneb_yes                             1.1692     0.8553    0.9612
## HIVb_yes                                 1.9345     0.5169    0.4793
## threatened_gun_knifeW4b_yes              0.9304     1.0748    0.6811
## forcedsex_physicalW4b_yes                1.1223     0.8910    0.9085
## beaten_upW4b_yes                         1.0735     0.9315    0.7869
## sex_abuse_bycaretakerW4b_>10_times       1.0537     0.9491    0.7803
## sex_abuse_bycaretakerW4c_10+_times       1.0855     0.9212    0.6883
## alcohol_day_permonthW4b_1or2days/week    0.9888     1.0114    0.8337
## alcohol_day_permonthW4c_3to5days/week    0.9043     1.1058    0.7460
## alcohol_day_permonthW4d_daily            1.0911     0.9165    0.8240
## try.cocaineW4b_yes                       1.0202     0.9802    0.8090
## try.methW4b_yes                          1.0658     0.9383    0.8556
## try.herionW4b_yes                        1.2753     0.7841    1.0744
##                                       upper .95
## sexb_female                              1.0080
## racethnicb-nhblack                       1.4594
## racethnicc-hispanic                      1.2468
## racethnicd-asian                         1.0669
## racethnice-native_american               2.8851
## racethnicf-other                         2.8868
## sexorientb_bisexual                      2.2784
## sexorientc_LGB                           0.9807
## educb_highschool_grad                    1.1635
## educc_college_bach                       0.9069
## educd_college+                           0.4048
## incomeW4b_$15,000<$30,000                1.6712
## incomeW4c_$30,000<$50,000                1.3303
## incomeW4d_$50,000<$75,000                1.0867
## incomeW4e_$75,000<$100,000               1.0938
## incomeW4f_$100,000<$150,000              0.9244
## incomeW4g_$150,000+                      0.9762
## pregnancyb_yes                           1.0333
## birthsb_yes                              0.9316
## birthsskip                               1.2331
## foster_homeb_yes                         1.1307
## marriedW4ab_married                      1.8056
## marriedW4bb_seperated/divorced           1.4079
## marriedW4bc_skip                         1.3511
## insurance_statusW4b_yes_insurance        0.9644
## unmet_medcareW4b_yes                     1.1946
## incarceratedb_yes                        1.1718
## incarceratedskip                         0.9461
## general_healthb_poor/bad                 1.1961
## social_isolationW4b_sometimes/often      1.1809
## things.going.mywayW4b_sometimes          1.0317
## things.going.mywayW4c_often              0.9465
## depressionW4b_yes                        1.2513
## suicideW4thinkb_yes                      1.2125
## physical_limitationb_limited             1.5077
## cancerb_yes                              2.5110
## high_bpb_yes                             1.2657
## high_cholb_yes                           1.2589
## diabetesb_yes                            1.3902
## heart_diseaseb_yes                       1.5099
## asthmb_yes                               1.4220
## migraneb_yes                             1.4222
## HIVb_yes                                 7.8071
## threatened_gun_knifeW4b_yes              1.2709
## forcedsex_physicalW4b_yes                1.3863
## beaten_upW4b_yes                         1.4645
## sex_abuse_bycaretakerW4b_>10_times       1.4228
## sex_abuse_bycaretakerW4c_10+_times       1.7119
## alcohol_day_permonthW4b_1or2days/week    1.1727
## alcohol_day_permonthW4c_3to5days/week    1.0964
## alcohol_day_permonthW4d_daily            1.4448
## try.cocaineW4b_yes                       1.2866
## try.methW4b_yes                          1.3276
## try.herionW4b_yes                        1.5138
## 
## Concordance= 0.692  (se = 0.009 )
## Likelihood ratio test= NA  on 54 df,   p=NA
## Wald test            = 757.5  on 54 df,   p=<2e-16
## Score (logrank) test = NA  on 54 df,   p=NA
schoenresid<-resid(fit1g,type="schoenfeld")
fit.sr<-lm(schoenresid~des2$variables$agew4[des2$variables$job_transition==1])
summary(fit.sr)
## Response sexb_female :
## 
## Call:
## lm(formula = sexb_female ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4844 -0.4543 -0.4155  0.5401  0.7477 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.021290
## des2$variables$agew4[des2$variables$job_transition == 1]  0.002798
##                                                          Std. Error
## (Intercept)                                                0.216140
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007550
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.098    0.922
## des2$variables$agew4[des2$variables$job_transition == 1]   0.371    0.711
## 
## Residual standard error: 0.4954 on 1691 degrees of freedom
## Multiple R-squared:  8.119e-05,  Adjusted R-squared:  -0.0005101 
## F-statistic: 0.1373 on 1 and 1691 DF,  p-value: 0.711
## 
## 
## Response racethnicb-nhblack :
## 
## Call:
## lm(formula = `racethnicb-nhblack` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4762 -0.2057 -0.1965 -0.1863  0.8226 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.153099
## des2$variables$agew4[des2$variables$job_transition == 1] -0.003091
##                                                          Std. Error
## (Intercept)                                                0.175208
## des2$variables$agew4[des2$variables$job_transition == 1]   0.006120
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.874    0.382
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.505    0.614
## 
## Residual standard error: 0.4016 on 1691 degrees of freedom
## Multiple R-squared:  0.0001508,  Adjusted R-squared:  -0.0004405 
## F-statistic: 0.255 on 1 and 1691 DF,  p-value: 0.6136
## 
## 
## Response racethnicc-hispanic :
## 
## Call:
## lm(formula = `racethnicc-hispanic` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.18047 -0.06824 -0.06322 -0.05746  0.95070 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.088793
## des2$variables$agew4[des2$variables$job_transition == 1]  0.003480
##                                                          Std. Error
## (Intercept)                                                0.110706
## des2$variables$agew4[des2$variables$job_transition == 1]   0.003867
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.802    0.423
## des2$variables$agew4[des2$variables$job_transition == 1]   0.900    0.368
## 
## Residual standard error: 0.2537 on 1691 degrees of freedom
## Multiple R-squared:  0.0004787,  Adjusted R-squared:  -0.0001123 
## F-statistic: 0.8099 on 1 and 1691 DF,  p-value: 0.3683
## 
## 
## Response racethnicd-asian :
## 
## Call:
## lm(formula = `racethnicd-asian` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.07026 -0.05098 -0.04655 -0.04200  0.96532 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.083139
## des2$variables$agew4[des2$variables$job_transition == 1]  0.003661
##                                                          Std. Error
## (Intercept)                                                0.092600
## des2$variables$agew4[des2$variables$job_transition == 1]   0.003235
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.898    0.369
## des2$variables$agew4[des2$variables$job_transition == 1]   1.132    0.258
## 
## Residual standard error: 0.2122 on 1691 degrees of freedom
## Multiple R-squared:  0.0007569,  Adjusted R-squared:  0.000166 
## F-statistic: 1.281 on 1 and 1691 DF,  p-value: 0.2579
## 
## 
## Response racethnice-native_american :
## 
## Call:
## lm(formula = `racethnice-native_american` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.01384 -0.00915 -0.00640 -0.00503  0.99644 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.013610
## des2$variables$agew4[des2$variables$job_transition == 1]  0.000426
##                                                          Std. Error
## (Intercept)                                                0.036614
## des2$variables$agew4[des2$variables$job_transition == 1]   0.001279
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.372    0.710
## des2$variables$agew4[des2$variables$job_transition == 1]   0.333    0.739
## 
## Residual standard error: 0.08392 on 1691 degrees of freedom
## Multiple R-squared:  6.561e-05,  Adjusted R-squared:  -0.0005257 
## F-statistic: 0.111 on 1 and 1691 DF,  p-value: 0.7391
## 
## 
## Response racethnicf-other :
## 
## Call:
## lm(formula = `racethnicf-other` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.01515 -0.01019 -0.00839 -0.00640  0.99751 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.031785
## des2$variables$agew4[des2$variables$job_transition == 1] -0.001127
##                                                          Std. Error
## (Intercept)                                                0.039526
## des2$variables$agew4[des2$variables$job_transition == 1]   0.001381
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.804    0.421
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.816    0.414
## 
## Residual standard error: 0.0906 on 1691 degrees of freedom
## Multiple R-squared:  0.000394,   Adjusted R-squared:  -0.0001971 
## F-statistic: 0.6665 on 1 and 1691 DF,  p-value: 0.4144
## 
## 
## Response sexorientb_bisexual :
## 
## Call:
## lm(formula = sexorientb_bisexual ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.05242 -0.03023 -0.02433 -0.01818  0.98953 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.134171
## des2$variables$agew4[des2$variables$job_transition == 1]  0.004618
##                                                          Std. Error
## (Intercept)                                                0.066983
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002340
##                                                          t value Pr(>|t|)
## (Intercept)                                               -2.003   0.0453
## des2$variables$agew4[des2$variables$job_transition == 1]   1.974   0.0486
##                                                           
## (Intercept)                                              *
## des2$variables$agew4[des2$variables$job_transition == 1] *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1535 on 1691 degrees of freedom
## Multiple R-squared:  0.002298,   Adjusted R-squared:  0.001708 
## F-statistic: 3.895 on 1 and 1691 DF,  p-value: 0.0486
## 
## 
## Response sexorientc_LGB :
## 
## Call:
## lm(formula = sexorientc_LGB ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.03262 -0.02022 -0.01722 -0.01432  0.99084 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.047758
## des2$variables$agew4[des2$variables$job_transition == 1]  0.001715
##                                                          Std. Error
## (Intercept)                                                0.057552
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002010
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.830    0.407
## des2$variables$agew4[des2$variables$job_transition == 1]   0.853    0.394
## 
## Residual standard error: 0.1319 on 1691 degrees of freedom
## Multiple R-squared:  0.0004304,  Adjusted R-squared:  -0.0001607 
## F-statistic: 0.7281 on 1 and 1691 DF,  p-value: 0.3936
## 
## 
## Response educb_highschool_grad :
## 
## Call:
## lm(formula = educb_highschool_grad ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7331 -0.6614  0.3017  0.3372  0.3437 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.019811
## des2$variables$agew4[des2$variables$job_transition == 1]  0.000174
##                                                          Std. Error
## (Intercept)                                                0.204553
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007145
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.097    0.923
## des2$variables$agew4[des2$variables$job_transition == 1]   0.024    0.981
## 
## Residual standard error: 0.4688 on 1691 degrees of freedom
## Multiple R-squared:  3.506e-07,  Adjusted R-squared:  -0.000591 
## F-statistic: 0.0005929 on 1 and 1691 DF,  p-value: 0.9806
## 
## 
## Response educc_college_bach :
## 
## Call:
## lm(formula = educc_college_bach ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.2570 -0.2306 -0.2143 -0.1545  0.9276 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.173543
## des2$variables$agew4[des2$variables$job_transition == 1] -0.005432
##                                                          Std. Error
## (Intercept)                                                0.178437
## des2$variables$agew4[des2$variables$job_transition == 1]   0.006233
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.973    0.331
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.871    0.384
## 
## Residual standard error: 0.409 on 1691 degrees of freedom
## Multiple R-squared:  0.0004489,  Adjusted R-squared:  -0.0001422 
## F-statistic: 0.7594 on 1 and 1691 DF,  p-value: 0.3836
## 
## 
## Response educd_college+ :
## 
## Call:
## lm(formula = `educd_college+` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.05649 -0.04124 -0.03676 -0.03137  0.98203 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.098586
## des2$variables$agew4[des2$variables$job_transition == 1]  0.003812
##                                                          Std. Error
## (Intercept)                                                0.082602
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002885
##                                                          t value Pr(>|t|)
## (Intercept)                                               -1.194    0.233
## des2$variables$agew4[des2$variables$job_transition == 1]   1.321    0.187
## 
## Residual standard error: 0.1893 on 1691 degrees of freedom
## Multiple R-squared:  0.001031,   Adjusted R-squared:  0.0004402 
## F-statistic: 1.745 on 1 and 1691 DF,  p-value: 0.1867
## 
## 
## Response incomeW4b_$15,000<$30,000 :
## 
## Call:
## lm(formula = `incomeW4b_$15,000<$30,000` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4610 -0.1947 -0.1818 -0.1687  0.8449 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.185016
## des2$variables$agew4[des2$variables$job_transition == 1] -0.006806
##                                                          Std. Error
## (Intercept)                                                0.170760
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005965
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.083    0.279
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.141    0.254
## 
## Residual standard error: 0.3914 on 1691 degrees of freedom
## Multiple R-squared:  0.0007694,  Adjusted R-squared:  0.0001785 
## F-statistic: 1.302 on 1 and 1691 DF,  p-value: 0.254
## 
## 
## Response incomeW4c_$30,000<$50,000 :
## 
## Call:
## lm(formula = `incomeW4c_$30,000<$50,000` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.3100 -0.2806 -0.2669  0.7086  0.7510 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.154616
## des2$variables$agew4[des2$variables$job_transition == 1]  0.004961
##                                                          Std. Error
## (Intercept)                                                0.194649
## des2$variables$agew4[des2$variables$job_transition == 1]   0.006799
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.794    0.427
## des2$variables$agew4[des2$variables$job_transition == 1]   0.730    0.466
## 
## Residual standard error: 0.4461 on 1691 degrees of freedom
## Multiple R-squared:  0.0003147,  Adjusted R-squared:  -0.0002765 
## F-statistic: 0.5323 on 1 and 1691 DF,  p-value: 0.4657
## 
## 
## Response incomeW4d_$50,000<$75,000 :
## 
## Call:
## lm(formula = `incomeW4d_$50,000<$75,000` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.2869 -0.2570 -0.2468  0.7131  0.7793 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.084433
## des2$variables$agew4[des2$variables$job_transition == 1] -0.002669
##                                                          Std. Error
## (Intercept)                                                0.189308
## des2$variables$agew4[des2$variables$job_transition == 1]   0.006613
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.446    0.656
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.404    0.686
## 
## Residual standard error: 0.4339 on 1691 degrees of freedom
## Multiple R-squared:  9.636e-05,  Adjusted R-squared:  -0.0004949 
## F-statistic: 0.163 on 1 and 1691 DF,  p-value: 0.6865
## 
## 
## Response incomeW4e_$75,000<$100,000 :
## 
## Call:
## lm(formula = `incomeW4e_$75,000<$100,000` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.1685 -0.1482 -0.1426 -0.1364  0.9238 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.083497
## des2$variables$agew4[des2$variables$job_transition == 1]  0.002948
##                                                          Std. Error
## (Intercept)                                                0.153211
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005352
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.545    0.586
## des2$variables$agew4[des2$variables$job_transition == 1]   0.551    0.582
## 
## Residual standard error: 0.3512 on 1691 degrees of freedom
## Multiple R-squared:  0.0001794,  Adjusted R-squared:  -0.0004119 
## F-statistic: 0.3034 on 1 and 1691 DF,  p-value: 0.5818
## 
## 
## Response incomeW4f_$100,000<$150,000 :
## 
## Call:
## lm(formula = `incomeW4f_$100,000<$150,000` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.09575 -0.08413 -0.08192 -0.07940  0.92498 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.028970
## des2$variables$agew4[des2$variables$job_transition == 1]  0.001261
##                                                          Std. Error
## (Intercept)                                                0.119833
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004186
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.242    0.809
## des2$variables$agew4[des2$variables$job_transition == 1]   0.301    0.763
## 
## Residual standard error: 0.2747 on 1691 degrees of freedom
## Multiple R-squared:  5.365e-05,  Adjusted R-squared:  -0.0005377 
## F-statistic: 0.09073 on 1 and 1691 DF,  p-value: 0.7633
## 
## 
## Response incomeW4g_$150,000+ :
## 
## Call:
## lm(formula = `incomeW4g_$150,000+` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.04731 -0.04319 -0.04097 -0.03867  0.97194 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.038407
## des2$variables$agew4[des2$variables$job_transition == 1] -0.001149
##                                                          Std. Error
## (Intercept)                                                0.086317
## des2$variables$agew4[des2$variables$job_transition == 1]   0.003015
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.445    0.656
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.381    0.703
## 
## Residual standard error: 0.1978 on 1691 degrees of freedom
## Multiple R-squared:  8.586e-05,  Adjusted R-squared:  -0.0005055 
## F-statistic: 0.1452 on 1 and 1691 DF,  p-value: 0.7032
## 
## 
## Response pregnancyb_yes :
## 
## Call:
## lm(formula = pregnancyb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4904 -0.1978 -0.1812 -0.1579  0.8659 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.312069
## des2$variables$agew4[des2$variables$job_transition == 1] -0.010151
##                                                          Std. Error
## (Intercept)                                                0.170032
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005939
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.835   0.0666
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.709   0.0876
##                                                           
## (Intercept)                                              .
## des2$variables$agew4[des2$variables$job_transition == 1] .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.3897 on 1691 degrees of freedom
## Multiple R-squared:  0.001724,   Adjusted R-squared:  0.001134 
## F-statistic: 2.921 on 1 and 1691 DF,  p-value: 0.08761
## 
## 
## Response birthsb_yes :
## 
## Call:
## lm(formula = birthsb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.9025 -0.4579 -0.3786  0.5401  0.6281 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.033190
## des2$variables$agew4[des2$variables$job_transition == 1] -0.001014
##                                                          Std. Error
## (Intercept)                                                0.215549
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007529
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.154    0.878
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.135    0.893
## 
## Residual standard error: 0.494 on 1691 degrees of freedom
## Multiple R-squared:  1.072e-05,  Adjusted R-squared:  -0.0005806 
## F-statistic: 0.01813 on 1 and 1691 DF,  p-value: 0.8929
## 
## 
## Response birthsskip :
## 
## Call:
## lm(formula = birthsskip ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.5038 -0.4277 -0.3645  0.5584  0.9708 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.145092
## des2$variables$agew4[des2$variables$job_transition == 1]  0.004647
##                                                          Std. Error
## (Intercept)                                                0.213145
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007445
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.681    0.496
## des2$variables$agew4[des2$variables$job_transition == 1]   0.624    0.533
## 
## Residual standard error: 0.4885 on 1691 degrees of freedom
## Multiple R-squared:  0.0002303,  Adjusted R-squared:  -0.0003609 
## F-statistic: 0.3895 on 1 and 1691 DF,  p-value: 0.5327
## 
## 
## Response foster_homeb_yes :
## 
## Call:
## lm(formula = foster_homeb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.03993 -0.02050 -0.01744 -0.01558  0.98575 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.033216
## des2$variables$agew4[des2$variables$job_transition == 1] -0.001026
##                                                          Std. Error
## (Intercept)                                                0.059322
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002072
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.560    0.576
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.495    0.621
## 
## Residual standard error: 0.136 on 1691 degrees of freedom
## Multiple R-squared:  0.0001449,  Adjusted R-squared:  -0.0004464 
## F-statistic: 0.2451 on 1 and 1691 DF,  p-value: 0.6206
## 
## 
## Response marriedW4ab_married :
## 
## Call:
## lm(formula = marriedW4ab_married ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6757 -0.5596  0.3503  0.4394  0.5007 
## 
## Coefficients:
##                                                            Estimate
## (Intercept)                                              -0.0044585
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0002624
##                                                          Std. Error
## (Intercept)                                               0.2131476
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0074454
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.021    0.983
## des2$variables$agew4[des2$variables$job_transition == 1]   0.035    0.972
## 
## Residual standard error: 0.4885 on 1691 degrees of freedom
## Multiple R-squared:  7.344e-07,  Adjusted R-squared:  -0.0005906 
## F-statistic: 0.001242 on 1 and 1691 DF,  p-value: 0.9719
## 
## 
## Response marriedW4bb_seperated/divorced :
## 
## Call:
## lm(formula = `marriedW4bb_seperated/divorced` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.07255 -0.04663 -0.03112 -0.02644  0.97679 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.025468
## des2$variables$agew4[des2$variables$job_transition == 1] -0.001003
##                                                          Std. Error
## (Intercept)                                                0.081153
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002835
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.314    0.754
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.354    0.723
## 
## Residual standard error: 0.186 on 1691 degrees of freedom
## Multiple R-squared:  7.407e-05,  Adjusted R-squared:  -0.0005173 
## F-statistic: 0.1253 on 1 and 1691 DF,  p-value: 0.7234
## 
## 
## Response marriedW4bc_skip :
## 
## Call:
## lm(formula = marriedW4bc_skip ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7038 -0.6138  0.3244  0.3775  0.4536 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.095666
## des2$variables$agew4[des2$variables$job_transition == 1]  0.003286
##                                                          Std. Error
## (Intercept)                                                0.208274
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007275
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.459    0.646
## des2$variables$agew4[des2$variables$job_transition == 1]   0.452    0.652
## 
## Residual standard error: 0.4774 on 1691 degrees of freedom
## Multiple R-squared:  0.0001206,  Adjusted R-squared:  -0.0004707 
## F-statistic: 0.204 on 1 and 1691 DF,  p-value: 0.6516
## 
## 
## Response insurance_statusW4b_yes_insurance :
## 
## Call:
## lm(formula = insurance_statusW4b_yes_insurance ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7259 -0.7158  0.2774  0.2815  0.8251 
## 
## Coefficients:
##                                                            Estimate
## (Intercept)                                              -0.0039093
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0006787
##                                                          Std. Error
## (Intercept)                                               0.1969323
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0068790
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.020    0.984
## des2$variables$agew4[des2$variables$job_transition == 1]   0.099    0.921
## 
## Residual standard error: 0.4514 on 1691 degrees of freedom
## Multiple R-squared:  5.756e-06,  Adjusted R-squared:  -0.0005856 
## F-statistic: 0.009733 on 1 and 1691 DF,  p-value: 0.9214
## 
## 
## Response unmet_medcareW4b_yes :
## 
## Call:
## lm(formula = unmet_medcareW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6577 -0.3202 -0.2998  0.6671  0.7357 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.266889
## des2$variables$agew4[des2$variables$job_transition == 1] -0.009323
##                                                          Std. Error
## (Intercept)                                                0.203226
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007099
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.313    0.189
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.313    0.189
## 
## Residual standard error: 0.4658 on 1691 degrees of freedom
## Multiple R-squared:  0.001019,   Adjusted R-squared:  0.0004281 
## F-statistic: 1.725 on 1 and 1691 DF,  p-value: 0.1893
## 
## 
## Response incarceratedb_yes :
## 
## Call:
## lm(formula = incarceratedb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.2831 -0.2270 -0.2134 -0.2054  0.9342 
## 
## Coefficients:
##                                                            Estimate
## (Intercept)                                               0.0035860
## des2$variables$agew4[des2$variables$job_transition == 1] -0.0006775
##                                                          Std. Error
## (Intercept)                                               0.1823071
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0063681
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.020    0.984
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.106    0.915
## 
## Residual standard error: 0.4178 on 1691 degrees of freedom
## Multiple R-squared:  6.693e-06,  Adjusted R-squared:  -0.0005847 
## F-statistic: 0.01132 on 1 and 1691 DF,  p-value: 0.9153
## 
## 
## Response incarceratedskip :
## 
## Call:
## lm(formula = incarceratedskip ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6297 -0.6059  0.3775  0.3915  0.5075 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.007258
## des2$variables$agew4[des2$variables$job_transition == 1]  0.001273
##                                                          Std. Error
## (Intercept)                                                0.213037
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007442
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.034    0.973
## des2$variables$agew4[des2$variables$job_transition == 1]   0.171    0.864
## 
## Residual standard error: 0.4883 on 1691 degrees of freedom
## Multiple R-squared:  1.731e-05,  Adjusted R-squared:  -0.000574 
## F-statistic: 0.02927 on 1 and 1691 DF,  p-value: 0.8642
## 
## 
## Response general_healthb_poor/bad :
## 
## Call:
## lm(formula = `general_healthb_poor/bad` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4506 -0.1105 -0.1029 -0.0932  0.9160 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.170907
## des2$variables$agew4[des2$variables$job_transition == 1] -0.005770
##                                                          Std. Error
## (Intercept)                                                0.135610
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004737
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.260    0.208
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.218    0.223
## 
## Residual standard error: 0.3108 on 1691 degrees of freedom
## Multiple R-squared:  0.0008768,  Adjusted R-squared:  0.0002859 
## F-statistic: 1.484 on 1 and 1691 DF,  p-value: 0.2233
## 
## 
## Response social_isolationW4b_sometimes/often :
## 
## Call:
## lm(formula = `social_isolationW4b_sometimes/often` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4299 -0.3386 -0.3236  0.6554  0.7141 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.219235
## des2$variables$agew4[des2$variables$job_transition == 1] -0.007508
##                                                          Std. Error
## (Intercept)                                                0.205907
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007192
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.065    0.287
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.044    0.297
## 
## Residual standard error: 0.4719 on 1691 degrees of freedom
## Multiple R-squared:  0.0006439,  Adjusted R-squared:  5.293e-05 
## F-statistic:  1.09 on 1 and 1691 DF,  p-value: 0.2967
## 
## 
## Response things.going.mywayW4b_sometimes :
## 
## Call:
## lm(formula = things.going.mywayW4b_sometimes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4571 -0.4018 -0.3873  0.5982  0.6276 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.142384
## des2$variables$agew4[des2$variables$job_transition == 1] -0.004474
##                                                          Std. Error
## (Intercept)                                                0.213668
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007464
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.666    0.505
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.599    0.549
## 
## Residual standard error: 0.4897 on 1691 degrees of freedom
## Multiple R-squared:  0.0002124,  Adjusted R-squared:  -0.0003788 
## F-statistic: 0.3593 on 1 and 1691 DF,  p-value: 0.549
## 
## 
## Response things.going.mywayW4c_often :
## 
## Call:
## lm(formula = things.going.mywayW4c_often ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.5038 -0.4857 -0.4834  0.5143  0.5167 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.005030
## des2$variables$agew4[des2$variables$job_transition == 1] -0.000140
##                                                          Std. Error
## (Intercept)                                                0.218177
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007621
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.023    0.982
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.018    0.985
## 
## Residual standard error: 0.5001 on 1691 degrees of freedom
## Multiple R-squared:  1.996e-07,  Adjusted R-squared:  -0.0005912 
## F-statistic: 0.0003376 on 1 and 1691 DF,  p-value: 0.9853
## 
## 
## Response depressionW4b_yes :
## 
## Call:
## lm(formula = depressionW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.2510 -0.1777 -0.1626 -0.1414  0.8769 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.257135
## des2$variables$agew4[des2$variables$job_transition == 1] -0.008984
##                                                          Std. Error
## (Intercept)                                                0.163151
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005699
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.576    0.115
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.576    0.115
## 
## Residual standard error: 0.3739 on 1691 degrees of freedom
## Multiple R-squared:  0.001467,   Adjusted R-squared:  0.0008769 
## F-statistic: 2.485 on 1 and 1691 DF,  p-value: 0.1151
## 
## 
## Response suicideW4thinkb_yes :
## 
## Call:
## lm(formula = suicideW4thinkb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.17476 -0.08825 -0.08395 -0.07677  0.93136 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.106595
## des2$variables$agew4[des2$variables$job_transition == 1] -0.003828
##                                                          Std. Error
## (Intercept)                                                0.121337
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004238
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.879    0.380
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.903    0.367
## 
## Residual standard error: 0.2781 on 1691 degrees of freedom
## Multiple R-squared:  0.0004822,  Adjusted R-squared:  -0.0001089 
## F-statistic: 0.8158 on 1 and 1691 DF,  p-value: 0.3665
## 
## 
## Response physical_limitationb_limited :
## 
## Call:
## lm(formula = physical_limitationb_limited ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.08094 -0.07919 -0.07618 -0.07266  0.93033 
## 
## Coefficients:
##                                                            Estimate
## (Intercept)                                               0.0073401
## des2$variables$agew4[des2$variables$job_transition == 1] -0.0003502
##                                                          Std. Error
## (Intercept)                                               0.1144156
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0039966
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.064    0.949
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.088    0.930
## 
## Residual standard error: 0.2622 on 1691 degrees of freedom
## Multiple R-squared:  4.54e-06,   Adjusted R-squared:  -0.0005868 
## F-statistic: 0.007678 on 1 and 1691 DF,  p-value: 0.9302
## 
## 
## Response cancerb_yes :
## 
## Call:
## lm(formula = cancerb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.02618 -0.01694 -0.01356 -0.01114  0.99101 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.062638
## des2$variables$agew4[des2$variables$job_transition == 1]  0.002153
##                                                          Std. Error
## (Intercept)                                                0.051588
## des2$variables$agew4[des2$variables$job_transition == 1]   0.001802
##                                                          t value Pr(>|t|)
## (Intercept)                                               -1.214    0.225
## des2$variables$agew4[des2$variables$job_transition == 1]   1.195    0.232
## 
## Residual standard error: 0.1182 on 1691 degrees of freedom
## Multiple R-squared:  0.0008432,  Adjusted R-squared:  0.0002523 
## F-statistic: 1.427 on 1 and 1691 DF,  p-value: 0.2324
## 
## 
## Response high_bpb_yes :
## 
## Call:
## lm(formula = high_bpb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.14783 -0.11356 -0.10146 -0.09337  0.92470 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.183084
## des2$variables$agew4[des2$variables$job_transition == 1] -0.006541
##                                                          Std. Error
## (Intercept)                                                0.133685
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004670
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.370    0.171
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.401    0.161
## 
## Residual standard error: 0.3064 on 1691 degrees of freedom
## Multiple R-squared:  0.001159,   Adjusted R-squared:  0.0005683 
## F-statistic: 1.962 on 1 and 1691 DF,  p-value: 0.1615
## 
## 
## Response high_cholb_yes :
## 
## Call:
## lm(formula = high_cholb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.10461 -0.08973 -0.08344 -0.07404  0.98919 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.075857
## des2$variables$agew4[des2$variables$job_transition == 1] -0.002726
##                                                          Std. Error
## (Intercept)                                                0.120828
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004221
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.628    0.530
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.646    0.518
## 
## Residual standard error: 0.2769 on 1691 degrees of freedom
## Multiple R-squared:  0.0002466,  Adjusted R-squared:  -0.0003446 
## F-statistic: 0.4171 on 1 and 1691 DF,  p-value: 0.5185
## 
## 
## Response diabetesb_yes :
## 
## Call:
## lm(formula = diabetesb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.05013 -0.02868 -0.02507 -0.02148  0.98228 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.071498
## des2$variables$agew4[des2$variables$job_transition == 1]  0.002449
##                                                          Std. Error
## (Intercept)                                                0.068606
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002396
##                                                          t value Pr(>|t|)
## (Intercept)                                               -1.042    0.297
## des2$variables$agew4[des2$variables$job_transition == 1]   1.022    0.307
## 
## Residual standard error: 0.1572 on 1691 degrees of freedom
## Multiple R-squared:  0.0006172,  Adjusted R-squared:  2.625e-05 
## F-statistic: 1.044 on 1 and 1691 DF,  p-value: 0.3069
## 
## 
## Response heart_diseaseb_yes :
## 
## Call:
## lm(formula = heart_diseaseb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.01916 -0.01114 -0.00919 -0.00732  0.99372 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.042765
## des2$variables$agew4[des2$variables$job_transition == 1] -0.001407
##                                                          Std. Error
## (Intercept)                                                0.042227
## des2$variables$agew4[des2$variables$job_transition == 1]   0.001475
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.013    0.311
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.954    0.340
## 
## Residual standard error: 0.09679 on 1691 degrees of freedom
## Multiple R-squared:  0.0005376,  Adjusted R-squared:  -5.344e-05 
## F-statistic: 0.9096 on 1 and 1691 DF,  p-value: 0.3404
## 
## 
## Response asthmb_yes :
## 
## Call:
## lm(formula = asthmb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.1972 -0.1806 -0.1705 -0.1514  0.8670 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.088754
## des2$variables$agew4[des2$variables$job_transition == 1] -0.003422
##                                                          Std. Error
## (Intercept)                                                0.164820
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005757
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.538    0.590
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.594    0.552
## 
## Residual standard error: 0.3778 on 1691 degrees of freedom
## Multiple R-squared:  0.0002089,  Adjusted R-squared:  -0.0003824 
## F-statistic: 0.3533 on 1 and 1691 DF,  p-value: 0.5523
## 
## 
## Response migraneb_yes :
## 
## Call:
## lm(formula = migraneb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.2013 -0.1705 -0.1531 -0.1324  0.9258 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.251954
## des2$variables$agew4[des2$variables$job_transition == 1] -0.008988
##                                                          Std. Error
## (Intercept)                                                0.158376
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005532
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.591    0.112
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.625    0.104
## 
## Residual standard error: 0.363 on 1691 degrees of freedom
## Multiple R-squared:  0.001559,   Adjusted R-squared:  0.0009681 
## F-statistic:  2.64 on 1 and 1691 DF,  p-value: 0.1044
## 
## 
## Response HIVb_yes :
## 
## Call:
## lm(formula = HIVb_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.00502 -0.00233 -0.00180 -0.00111  0.99820 
## 
## Coefficients:
##                                                            Estimate
## (Intercept)                                              -0.0130062
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0004804
##                                                          Std. Error
## (Intercept)                                               0.0183592
## des2$variables$agew4[des2$variables$job_transition == 1]  0.0006413
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.708    0.479
## des2$variables$agew4[des2$variables$job_transition == 1]   0.749    0.454
## 
## Residual standard error: 0.04208 on 1691 degrees of freedom
## Multiple R-squared:  0.0003318,  Adjusted R-squared:  -0.0002594 
## F-statistic: 0.5612 on 1 and 1691 DF,  p-value: 0.4539
## 
## 
## Response threatened_gun_knifeW4b_yes :
## 
## Call:
## lm(formula = threatened_gun_knifeW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4129 -0.1456 -0.1358 -0.1270  0.8856 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.150111
## des2$variables$agew4[des2$variables$job_transition == 1] -0.005156
##                                                          Std. Error
## (Intercept)                                                0.152121
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005314
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.987    0.324
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.970    0.332
## 
## Residual standard error: 0.3487 on 1691 degrees of freedom
## Multiple R-squared:  0.0005564,  Adjusted R-squared:  -3.466e-05 
## F-statistic: 0.9414 on 1 and 1691 DF,  p-value: 0.3321
## 
## 
## Response forcedsex_physicalW4b_yes :
## 
## Call:
## lm(formula = forcedsex_physicalW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.13832 -0.10893 -0.09729 -0.08158  0.93535 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.281796
## des2$variables$agew4[des2$variables$job_transition == 1] -0.009795
##                                                          Std. Error
## (Intercept)                                                0.129982
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004540
##                                                          t value Pr(>|t|)
## (Intercept)                                                2.168   0.0303
## des2$variables$agew4[des2$variables$job_transition == 1]  -2.157   0.0311
##                                                           
## (Intercept)                                              *
## des2$variables$agew4[des2$variables$job_transition == 1] *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.2979 on 1691 degrees of freedom
## Multiple R-squared:  0.002745,   Adjusted R-squared:  0.002155 
## F-statistic: 4.654 on 1 and 1691 DF,  p-value: 0.03112
## 
## 
## Response beaten_upW4b_yes :
## 
## Call:
## lm(formula = beaten_upW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.3694 -0.1201 -0.1098 -0.1012  0.9127 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.154538
## des2$variables$agew4[des2$variables$job_transition == 1] -0.005305
##                                                          Std. Error
## (Intercept)                                                0.139204
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004862
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.110    0.267
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.091    0.275
## 
## Residual standard error: 0.3191 on 1691 degrees of freedom
## Multiple R-squared:  0.0007035,  Adjusted R-squared:  0.0001126 
## F-statistic:  1.19 on 1 and 1691 DF,  p-value: 0.2754
## 
## 
## Response sex_abuse_bycaretakerW4b_>10_times :
## 
## Call:
## lm(formula = `sex_abuse_bycaretakerW4b_>10_times` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.06862 -0.04318 -0.03643 -0.02876  0.97804 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.133504
## des2$variables$agew4[des2$variables$job_transition == 1] -0.004806
##                                                          Std. Error
## (Intercept)                                                0.083201
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002906
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.605   0.1088
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.654   0.0984
##                                                           
## (Intercept)                                               
## des2$variables$agew4[des2$variables$job_transition == 1] .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1907 on 1691 degrees of freedom
## Multiple R-squared:  0.001614,   Adjusted R-squared:  0.001024 
## F-statistic: 2.734 on 1 and 1691 DF,  p-value: 0.09839
## 
## 
## Response sex_abuse_bycaretakerW4c_10+_times :
## 
## Call:
## lm(formula = `sex_abuse_bycaretakerW4c_10+_times` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.02639 -0.01945 -0.01615 -0.01370  0.99124 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.060346
## des2$variables$agew4[des2$variables$job_transition == 1] -0.002049
##                                                          Std. Error
## (Intercept)                                                0.055644
## des2$variables$agew4[des2$variables$job_transition == 1]   0.001944
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.085    0.278
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.054    0.292
## 
## Residual standard error: 0.1275 on 1691 degrees of freedom
## Multiple R-squared:  0.0006567,  Adjusted R-squared:  6.572e-05 
## F-statistic: 1.111 on 1 and 1691 DF,  p-value: 0.292
## 
## 
## Response alcohol_day_permonthW4b_1or2days/week :
## 
## Call:
## lm(formula = `alcohol_day_permonthW4b_1or2days/week` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.2677 -0.2535 -0.2465 -0.1974  0.8040 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.036818
## des2$variables$agew4[des2$variables$job_transition == 1] -0.001402
##                                                          Std. Error
## (Intercept)                                                0.187726
## des2$variables$agew4[des2$variables$job_transition == 1]   0.006557
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.196    0.845
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.214    0.831
## 
## Residual standard error: 0.4303 on 1691 degrees of freedom
## Multiple R-squared:  2.704e-05,  Adjusted R-squared:  -0.0005643 
## F-statistic: 0.04572 on 1 and 1691 DF,  p-value: 0.8307
## 
## 
## Response alcohol_day_permonthW4c_3to5days/week :
## 
## Call:
## lm(formula = `alcohol_day_permonthW4c_3to5days/week` ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.1835 -0.1288 -0.1174 -0.1043  0.9194 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.188096
## des2$variables$agew4[des2$variables$job_transition == 1] -0.006707
##                                                          Std. Error
## (Intercept)                                                0.142036
## des2$variables$agew4[des2$variables$job_transition == 1]   0.004961
##                                                          t value Pr(>|t|)
## (Intercept)                                                1.324    0.186
## des2$variables$agew4[des2$variables$job_transition == 1]  -1.352    0.177
## 
## Residual standard error: 0.3255 on 1691 degrees of freedom
## Multiple R-squared:  0.00108,    Adjusted R-squared:  0.0004888 
## F-statistic: 1.827 on 1 and 1691 DF,  p-value: 0.1766
## 
## 
## Response alcohol_day_permonthW4d_daily :
## 
## Call:
## lm(formula = alcohol_day_permonthW4d_daily ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.06954 -0.04505 -0.03929 -0.03294  0.99706 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.144710
## des2$variables$agew4[des2$variables$job_transition == 1]  0.004758
##                                                          Std. Error
## (Intercept)                                                0.084419
## des2$variables$agew4[des2$variables$job_transition == 1]   0.002949
##                                                          t value Pr(>|t|)
## (Intercept)                                               -1.714   0.0867
## des2$variables$agew4[des2$variables$job_transition == 1]   1.614   0.1068
##                                                           
## (Intercept)                                              .
## des2$variables$agew4[des2$variables$job_transition == 1]  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1935 on 1691 degrees of freedom
## Multiple R-squared:  0.001537,   Adjusted R-squared:  0.0009468 
## F-statistic: 2.603 on 1 and 1691 DF,  p-value: 0.1068
## 
## 
## Response try.cocaineW4b_yes :
## 
## Call:
## lm(formula = try.cocaineW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.3636 -0.2833 -0.2758  0.7072  0.7393 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.143151
## des2$variables$agew4[des2$variables$job_transition == 1]  0.003166
##                                                          Std. Error
## (Intercept)                                                0.196236
## des2$variables$agew4[des2$variables$job_transition == 1]   0.006855
##                                                          t value Pr(>|t|)
## (Intercept)                                               -0.729    0.466
## des2$variables$agew4[des2$variables$job_transition == 1]   0.462    0.644
## 
## Residual standard error: 0.4498 on 1691 degrees of freedom
## Multiple R-squared:  0.0001261,  Adjusted R-squared:  -0.0004652 
## F-statistic: 0.2133 on 1 and 1691 DF,  p-value: 0.6443
## 
## 
## Response try.methW4b_yes :
## 
## Call:
## lm(formula = try.methW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.1966 -0.1413 -0.1343 -0.1247  0.8909 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                               0.131102
## des2$variables$agew4[des2$variables$job_transition == 1] -0.005212
##                                                          Std. Error
## (Intercept)                                                0.149936
## des2$variables$agew4[des2$variables$job_transition == 1]   0.005237
##                                                          t value Pr(>|t|)
## (Intercept)                                                0.874    0.382
## des2$variables$agew4[des2$variables$job_transition == 1]  -0.995    0.320
## 
## Residual standard error: 0.3437 on 1691 degrees of freedom
## Multiple R-squared:  0.0005852,  Adjusted R-squared:  -5.783e-06 
## F-statistic: 0.9902 on 1 and 1691 DF,  p-value: 0.3198
## 
## 
## Response try.herionW4b_yes :
## 
## Call:
## lm(formula = try.herionW4b_yes ~ des2$variables$agew4[des2$variables$job_transition == 
##     1])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.3829 -0.3307 -0.3081  0.6553  0.7620 
## 
## Coefficients:
##                                                           Estimate
## (Intercept)                                              -0.330558
## des2$variables$agew4[des2$variables$job_transition == 1]  0.009875
##                                                          Std. Error
## (Intercept)                                                0.203293
## des2$variables$agew4[des2$variables$job_transition == 1]   0.007101
##                                                          t value Pr(>|t|)
## (Intercept)                                               -1.626    0.104
## des2$variables$agew4[des2$variables$job_transition == 1]   1.391    0.165
## 
## Residual standard error: 0.4659 on 1691 degrees of freedom
## Multiple R-squared:  0.001142,   Adjusted R-squared:  0.0005516 
## F-statistic: 1.934 on 1 and 1691 DF,  p-value: 0.1645
#Test the fit of model.  Grambsch and Therneau formal test using weighted residuals
fit.test<-cox.zph(fit1g)
fit.test
##                                             rho    chisq        p
## sexb_female                           -0.012030 7.06e-01 4.01e-01
## racethnicb-nhblack                    -0.033637 8.72e+00 3.15e-03
## racethnicc-hispanic                    0.008263 4.04e-01 5.25e-01
## racethnicd-asian                       0.068652 1.92e+01 1.15e-05
## racethnice-native_american            -0.038947 8.37e+00 3.80e-03
## racethnicf-other                      -0.002403 3.56e-02 8.50e-01
## sexorientb_bisexual                    0.000314 5.06e-04 9.82e-01
## sexorientc_LGB                         0.015246 1.00e+00 3.17e-01
## educb_highschool_grad                 -0.013530 7.09e-01 4.00e-01
## educc_college_bach                    -0.011443 6.24e-01 4.29e-01
## educd_college+                         0.017618 1.50e+00 2.21e-01
## incomeW4b_$15,000<$30,000             -0.032176 4.80e+00 2.84e-02
## incomeW4c_$30,000<$50,000             -0.029481 3.42e+00 6.43e-02
## incomeW4d_$50,000<$75,000             -0.036664 5.36e+00 2.06e-02
## incomeW4e_$75,000<$100,000            -0.033227 4.49e+00 3.40e-02
## incomeW4f_$100,000<$150,000           -0.036711 6.40e+00 1.14e-02
## incomeW4g_$150,000+                   -0.011491 5.57e-01 4.56e-01
## pregnancyb_yes                        -0.005132 1.65e-01 6.85e-01
## birthsb_yes                           -0.018204 1.95e+00 1.63e-01
## birthsskip                             0.003065 5.21e-02 8.19e-01
## foster_homeb_yes                       0.025257 4.02e+00 4.49e-02
## marriedW4ab_married                    0.004865 1.09e-01 7.41e-01
## marriedW4bb_seperated/divorced        -0.003764 7.10e-02 7.90e-01
## marriedW4bc_skip                      -0.042502 9.47e+00 2.09e-03
## insurance_statusW4b_yes_insurance      0.069811 2.94e+01 5.97e-08
## unmet_medcareW4b_yes                   0.006492 2.34e-01 6.29e-01
## incarceratedb_yes                      0.035226 5.54e+00 1.86e-02
## incarceratedskip                      -0.003817 8.15e-02 7.75e-01
## general_healthb_poor/bad              -0.036937 6.92e+00 8.51e-03
## social_isolationW4b_sometimes/often    0.072194 2.56e+01 4.30e-07
## things.going.mywayW4b_sometimes       -0.031517 5.58e+00 1.82e-02
## things.going.mywayW4c_often           -0.009891 4.35e-01 5.09e-01
## depressionW4b_yes                      0.026347 3.69e+00 5.48e-02
## suicideW4thinkb_yes                   -0.053326 1.07e+01 1.07e-03
## physical_limitationb_limited          -0.021806 2.17e+00 1.41e-01
## cancerb_yes                           -0.044791 1.03e+01 1.34e-03
## high_bpb_yes                           0.029877 4.98e+00 2.57e-02
## high_cholb_yes                         0.013532 8.08e-01 3.69e-01
## diabetesb_yes                          0.050937 1.23e+01 4.60e-04
## heart_diseaseb_yes                     0.027586 2.28e+00 1.31e-01
## asthmb_yes                             0.001638 1.27e-02 9.10e-01
## migraneb_yes                          -0.015680 1.35e+00 2.46e-01
## HIVb_yes                              -0.012109 5.35e-01 4.64e-01
## threatened_gun_knifeW4b_yes            0.002450 3.78e-02 8.46e-01
## forcedsex_physicalW4b_yes              0.020920 1.89e+00 1.69e-01
## beaten_upW4b_yes                       0.004128 9.69e-02 7.56e-01
## sex_abuse_bycaretakerW4b_>10_times    -0.016544 1.18e+00 2.77e-01
## sex_abuse_bycaretakerW4c_10+_times     0.021506 2.50e+00 1.14e-01
## alcohol_day_permonthW4b_1or2days/week -0.014147 1.23e+00 2.68e-01
## alcohol_day_permonthW4c_3to5days/week  0.022555 2.11e+00 1.47e-01
## alcohol_day_permonthW4d_daily          0.016541 9.97e-01 3.18e-01
## try.cocaineW4b_yes                     0.021679 2.74e+00 9.76e-02
## try.methW4b_yes                        0.004436 1.01e-01 7.51e-01
## try.herionW4b_yes                     -0.039261 7.41e+00 6.50e-03
## GLOBAL                                       NA 1.39e+02 1.98e-09
#plot of residuals 
par(mfrow=c(3,3))
plot(fit.test,df=2)

par(mfrow=c(1,1))
#martingale residual
res.mar<-resid(fit1g,type = "martingale")
scatter.smooth(des2$variables$sexorient,res.mar,degree = 2,span = 1)
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : pseudoinverse used at 0.99
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : neighborhood radius 2.01
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : There are other near singularities as well. 4.0401
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : pseudoinverse used at 0.99
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : neighborhood radius 2.01
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : There are other near singularities as well. 4.0401
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : pseudoinverse used at 0.99
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : neighborhood radius 2.01
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : There are other near singularities as well. 4.0401
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : pseudoinverse used at 0.99
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : neighborhood radius 2.01
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : There are other near singularities as well. 4.0401
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : pseudoinverse used at 0.99
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : neighborhood radius 2.01
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## FALSE, : There are other near singularities as well. 4.0401

#stratify by orientation
fit1g.strat<-svycoxph(Surv(time=agew3,time2=agew4,event=job_transition)~strata(sexorient)+sex+racethnic+educ+incomeW4+pregnancy+births+foster_home+marriedW4a+marriedW4b+insurance_statusW4+unmet_medcareW4+incarcerated+general_health+social_isolationW4+things.going.mywayW4+depressionW4+suicideW4think+physical_limitation+cancer+high_bp+high_chol+diabetes+heart_disease+asthm+migrane+HIV+threatened_gun_knifeW4+forcedsex_physicalW4+beaten_upW4+sex_abuse_bycaretakerW4+alcohol_day_permonthW4+try.cocaineW4+try.methW4+try.herionW4,design=des2)
summary(fit1g)
## Stratified 1 - level Cluster Sampling design (with replacement)
## With (130) clusters.
## svydesign(ids = ~psuscid, strata = ~region, weights = ~GSWGT4, 
##     data = addhealth, nest = T)
## Call:
## svycoxph(formula = Surv(time = agew3, time2 = agew4, event = job_transition) ~ 
##     sex + racethnic + sexorient + educ + incomeW4 + pregnancy + 
##         births + foster_home + marriedW4a + marriedW4b + insurance_statusW4 + 
##         unmet_medcareW4 + incarcerated + general_health + social_isolationW4 + 
##         things.going.mywayW4 + depressionW4 + suicideW4think + 
##         physical_limitation + cancer + high_bp + high_chol + 
##         diabetes + heart_disease + asthm + migrane + HIV + threatened_gun_knifeW4 + 
##         forcedsex_physicalW4 + beaten_upW4 + sex_abuse_bycaretakerW4 + 
##         alcohol_day_permonthW4 + try.cocaineW4 + try.methW4 + 
##         try.herionW4, design = des2)
## 
##   n= 6065, number of events= 1693 
## 
##                                            coef exp(coef)  se(coef)      z
## sexb_female                           -0.130391  0.877752  0.070606 -1.847
## racethnicb-nhblack                     0.147821  1.159305  0.117438  1.259
## racethnicc-hispanic                   -0.086811  0.916851  0.156839 -0.554
## racethnicd-asian                      -0.203657  0.815742  0.136945 -1.487
## racethnice-native_american             0.311910  1.366031  0.381457  0.818
## racethnicf-other                       0.241930  1.273706  0.417471  0.580
## sexorientb_bisexual                    0.424368  1.528624  0.203621  2.084
## sexorientc_LGB                        -0.513684  0.598287  0.252170 -2.037
## educb_highschool_grad                 -0.057934  0.943712  0.106841 -0.542
## educc_college_bach                    -0.393456  0.674721  0.150865 -2.608
## educd_college+                        -1.301084  0.272237  0.202378 -6.429
## incomeW4b_$15,000<$30,000              0.071578  1.074202  0.225494  0.317
## incomeW4c_$30,000<$50,000             -0.142900  0.866840  0.218534 -0.654
## incomeW4d_$50,000<$75,000             -0.362505  0.695931  0.227371 -1.594
## incomeW4e_$75,000<$100,000            -0.338210  0.713046  0.218286 -1.549
## incomeW4f_$100,000<$150,000           -0.576720  0.561738  0.254121 -2.269
## incomeW4g_$150,000+                   -0.544870  0.579917  0.265716 -2.051
## pregnancyb_yes                        -0.166648  0.846498  0.101719 -1.638
## birthsb_yes                           -0.305357  0.736861  0.119671 -2.552
## birthsskip                            -0.010238  0.989815  0.112149 -0.091
## foster_homeb_yes                      -0.392916  0.675086  0.263127 -1.493
## marriedW4ab_married                    0.337182  1.400994  0.129448  2.605
## marriedW4bb_seperated/divorced        -0.037515  0.963180  0.193694 -0.194
## marriedW4bc_skip                       0.034226  1.034818  0.136067  0.252
## insurance_statusW4b_yes_insurance     -0.198228  0.820182  0.082619 -2.399
## unmet_medcareW4b_yes                   0.024900  1.025212  0.078013  0.319
## incarceratedb_yes                     -0.043464  0.957467  0.103064 -0.422
## incarceratedskip                      -0.226337  0.797449  0.087219 -2.595
## general_healthb_poor/bad              -0.049484  0.951721  0.116621 -0.424
## social_isolationW4b_sometimes/often    0.031285  1.031780  0.068893  0.454
## things.going.mywayW4b_sometimes       -0.181113  0.834341  0.108337 -1.672
## things.going.mywayW4c_often           -0.270520  0.762983  0.109969 -2.460
## depressionW4b_yes                      0.036897  1.037587  0.095555  0.386
## suicideW4thinkb_yes                   -0.020160  0.980042  0.108581 -0.186
## physical_limitationb_limited           0.165053  1.179456  0.125272  1.318
## cancerb_yes                            0.389752  1.476615  0.270877  1.439
## high_bpb_yes                           0.009657  1.009704  0.115283  0.084
## high_cholb_yes                         0.032901  1.033449  0.100670  0.327
## diabetesb_yes                         -0.063213  0.938743  0.200351 -0.316
## heart_diseaseb_yes                    -0.108977  0.896751  0.265839 -0.410
## asthmb_yes                             0.194792  1.215059  0.080260  2.427
## migraneb_yes                           0.156354  1.169240  0.099938  1.565
## HIVb_yes                               0.659842  1.934487  0.711842  0.927
## threatened_gun_knifeW4b_yes           -0.072144  0.930397  0.159115 -0.453
## forcedsex_physicalW4b_yes              0.115355  1.122272  0.107814  1.070
## beaten_upW4b_yes                       0.070952  1.073529  0.158447  0.448
## sex_abuse_bycaretakerW4b_>10_times     0.052262  1.053652  0.153237  0.341
## sex_abuse_bycaretakerW4c_10+_times     0.082059  1.085520  0.232424  0.353
## alcohol_day_permonthW4b_1or2days/week -0.011308  0.988756  0.087053 -0.130
## alcohol_day_permonthW4c_3to5days/week -0.100543  0.904346  0.098232 -1.024
## alcohol_day_permonthW4d_daily          0.087205  1.091120  0.143236  0.609
## try.cocaineW4b_yes                     0.019990  1.020191  0.118370  0.169
## try.methW4b_yes                        0.063723  1.065797  0.112073  0.569
## try.herionW4b_yes                      0.243196  1.275319  0.087458  2.781
##                                       Pr(>|z|)    
## sexb_female                            0.06479 .  
## racethnicb-nhblack                     0.20814    
## racethnicc-hispanic                    0.57992    
## racethnicd-asian                       0.13698    
## racethnice-native_american             0.41354    
## racethnicf-other                       0.56224    
## sexorientb_bisexual                    0.03715 *  
## sexorientc_LGB                         0.04164 *  
## educb_highschool_grad                  0.58765    
## educc_college_bach                     0.00911 ** 
## educd_college+                        1.28e-10 ***
## incomeW4b_$15,000<$30,000              0.75092    
## incomeW4c_$30,000<$50,000              0.51317    
## incomeW4d_$50,000<$75,000              0.11086    
## incomeW4e_$75,000<$100,000             0.12129    
## incomeW4f_$100,000<$150,000            0.02324 *  
## incomeW4g_$150,000+                    0.04031 *  
## pregnancyb_yes                         0.10135    
## birthsb_yes                            0.01072 *  
## birthsskip                             0.92727    
## foster_homeb_yes                       0.13537    
## marriedW4ab_married                    0.00919 ** 
## marriedW4bb_seperated/divorced         0.84643    
## marriedW4bc_skip                       0.80140    
## insurance_statusW4b_yes_insurance      0.01643 *  
## unmet_medcareW4b_yes                   0.74959    
## incarceratedb_yes                      0.67323    
## incarceratedskip                       0.00946 ** 
## general_healthb_poor/bad               0.67134    
## social_isolationW4b_sometimes/often    0.64975    
## things.going.mywayW4b_sometimes        0.09457 .  
## things.going.mywayW4c_often            0.01390 *  
## depressionW4b_yes                      0.69939    
## suicideW4thinkb_yes                    0.85271    
## physical_limitationb_limited           0.18765    
## cancerb_yes                            0.15019    
## high_bpb_yes                           0.93324    
## high_cholb_yes                         0.74380    
## diabetesb_yes                          0.75237    
## heart_diseaseb_yes                     0.68185    
## asthmb_yes                             0.01522 *  
## migraneb_yes                           0.11770    
## HIVb_yes                               0.35395    
## threatened_gun_knifeW4b_yes            0.65026    
## forcedsex_physicalW4b_yes              0.28465    
## beaten_upW4b_yes                       0.65430    
## sex_abuse_bycaretakerW4b_>10_times     0.73306    
## sex_abuse_bycaretakerW4c_10+_times     0.72404    
## alcohol_day_permonthW4b_1or2days/week  0.89665    
## alcohol_day_permonthW4c_3to5days/week  0.30606    
## alcohol_day_permonthW4d_daily          0.54264    
## try.cocaineW4b_yes                     0.86589    
## try.methW4b_yes                        0.56964    
## try.herionW4b_yes                      0.00542 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                                       exp(coef) exp(-coef) lower .95
## sexb_female                              0.8778     1.1393    0.7643
## racethnicb-nhblack                       1.1593     0.8626    0.9209
## racethnicc-hispanic                      0.9169     1.0907    0.6742
## racethnicd-asian                         0.8157     1.2259    0.6237
## racethnice-native_american               1.3660     0.7320    0.6468
## racethnicf-other                         1.2737     0.7851    0.5620
## sexorientb_bisexual                      1.5286     0.6542    1.0256
## sexorientc_LGB                           0.5983     1.6714    0.3650
## educb_highschool_grad                    0.9437     1.0596    0.7654
## educc_college_bach                       0.6747     1.4821    0.5020
## educd_college+                           0.2722     3.6733    0.1831
## incomeW4b_$15,000<$30,000                1.0742     0.9309    0.6905
## incomeW4c_$30,000<$50,000                0.8668     1.1536    0.5648
## incomeW4d_$50,000<$75,000                0.6959     1.4369    0.4457
## incomeW4e_$75,000<$100,000               0.7130     1.4024    0.4648
## incomeW4f_$100,000<$150,000              0.5617     1.7802    0.3414
## incomeW4g_$150,000+                      0.5799     1.7244    0.3445
## pregnancyb_yes                           0.8465     1.1813    0.6935
## birthsb_yes                              0.7369     1.3571    0.5828
## birthsskip                               0.9898     1.0103    0.7945
## foster_homeb_yes                         0.6751     1.4813    0.4031
## marriedW4ab_married                      1.4010     0.7138    1.0871
## marriedW4bb_seperated/divorced           0.9632     1.0382    0.6589
## marriedW4bc_skip                         1.0348     0.9664    0.7926
## insurance_statusW4b_yes_insurance        0.8202     1.2192    0.6976
## unmet_medcareW4b_yes                     1.0252     0.9754    0.8799
## incarceratedb_yes                        0.9575     1.0444    0.7823
## incarceratedskip                         0.7974     1.2540    0.6721
## general_healthb_poor/bad                 0.9517     1.0507    0.7573
## social_isolationW4b_sometimes/often      1.0318     0.9692    0.9015
## things.going.mywayW4b_sometimes          0.8343     1.1986    0.6747
## things.going.mywayW4c_often              0.7630     1.3106    0.6150
## depressionW4b_yes                        1.0376     0.9638    0.8604
## suicideW4thinkb_yes                      0.9800     1.0204    0.7922
## physical_limitationb_limited             1.1795     0.8478    0.9227
## cancerb_yes                              1.4766     0.6772    0.8684
## high_bpb_yes                             1.0097     0.9904    0.8055
## high_cholb_yes                           1.0334     0.9676    0.8484
## diabetesb_yes                            0.9387     1.0653    0.6339
## heart_diseaseb_yes                       0.8968     1.1151    0.5326
## asthmb_yes                               1.2151     0.8230    1.0382
## migraneb_yes                             1.1692     0.8553    0.9612
## HIVb_yes                                 1.9345     0.5169    0.4793
## threatened_gun_knifeW4b_yes              0.9304     1.0748    0.6811
## forcedsex_physicalW4b_yes                1.1223     0.8910    0.9085
## beaten_upW4b_yes                         1.0735     0.9315    0.7869
## sex_abuse_bycaretakerW4b_>10_times       1.0537     0.9491    0.7803
## sex_abuse_bycaretakerW4c_10+_times       1.0855     0.9212    0.6883
## alcohol_day_permonthW4b_1or2days/week    0.9888     1.0114    0.8337
## alcohol_day_permonthW4c_3to5days/week    0.9043     1.1058    0.7460
## alcohol_day_permonthW4d_daily            1.0911     0.9165    0.8240
## try.cocaineW4b_yes                       1.0202     0.9802    0.8090
## try.methW4b_yes                          1.0658     0.9383    0.8556
## try.herionW4b_yes                        1.2753     0.7841    1.0744
##                                       upper .95
## sexb_female                              1.0080
## racethnicb-nhblack                       1.4594
## racethnicc-hispanic                      1.2468
## racethnicd-asian                         1.0669
## racethnice-native_american               2.8851
## racethnicf-other                         2.8868
## sexorientb_bisexual                      2.2784
## sexorientc_LGB                           0.9807
## educb_highschool_grad                    1.1635
## educc_college_bach                       0.9069
## educd_college+                           0.4048
## incomeW4b_$15,000<$30,000                1.6712
## incomeW4c_$30,000<$50,000                1.3303
## incomeW4d_$50,000<$75,000                1.0867
## incomeW4e_$75,000<$100,000               1.0938
## incomeW4f_$100,000<$150,000              0.9244
## incomeW4g_$150,000+                      0.9762
## pregnancyb_yes                           1.0333
## birthsb_yes                              0.9316
## birthsskip                               1.2331
## foster_homeb_yes                         1.1307
## marriedW4ab_married                      1.8056
## marriedW4bb_seperated/divorced           1.4079
## marriedW4bc_skip                         1.3511
## insurance_statusW4b_yes_insurance        0.9644
## unmet_medcareW4b_yes                     1.1946
## incarceratedb_yes                        1.1718
## incarceratedskip                         0.9461
## general_healthb_poor/bad                 1.1961
## social_isolationW4b_sometimes/often      1.1809
## things.going.mywayW4b_sometimes          1.0317
## things.going.mywayW4c_often              0.9465
## depressionW4b_yes                        1.2513
## suicideW4thinkb_yes                      1.2125
## physical_limitationb_limited             1.5077
## cancerb_yes                              2.5110
## high_bpb_yes                             1.2657
## high_cholb_yes                           1.2589
## diabetesb_yes                            1.3902
## heart_diseaseb_yes                       1.5099
## asthmb_yes                               1.4220
## migraneb_yes                             1.4222
## HIVb_yes                                 7.8071
## threatened_gun_knifeW4b_yes              1.2709
## forcedsex_physicalW4b_yes                1.3863
## beaten_upW4b_yes                         1.4645
## sex_abuse_bycaretakerW4b_>10_times       1.4228
## sex_abuse_bycaretakerW4c_10+_times       1.7119
## alcohol_day_permonthW4b_1or2days/week    1.1727
## alcohol_day_permonthW4c_3to5days/week    1.0964
## alcohol_day_permonthW4d_daily            1.4448
## try.cocaineW4b_yes                       1.2866
## try.methW4b_yes                          1.3276
## try.herionW4b_yes                        1.5138
## 
## Concordance= 0.692  (se = 0.009 )
## Likelihood ratio test= NA  on 54 df,   p=NA
## Wald test            = 757.5  on 54 df,   p=<2e-16
## Score (logrank) test = NA  on 54 df,   p=NA

Part C

Write Up: (10 points, 1-3 pages on how you set up the analysis, and interpreted the results of your analysis). This should follow the format of a journal aritlce’s methods, data and results sections.

a. Descriptive write up consisting of:

i. Tables of discriptive statistics

ii. Graphs of the necessary funtions

iii. Results of statistical tests

iv. Interpretation of the results