Hi, I'm using inverse probability treatment weighting for the propensity for vaccination, followed by Cox regression. My exposure is vaccination and my outcome is death in the first week of life. Can I add a random effect term for mothers who have had more than one birth (and subsequent death in the first week)?
thanks
Minda
logistic fluvac ///
i.matage5y i.mum_abor parity i.anctrimester i.year_season_birth ///
i.smoke i.seifa10 i.asthma i.hypertension i.diabetes i.gestdiabetes i.gesthypertension i.preeclampsia
predict p
gen ipw=.
replace ipw=1/p if fluvac_com==1
replace ipw=1/(1-p) if fluvac_com==0
** Unweighted
stset endrisk_firstweek, origin(origin_firstweek) enter(startrisk_firstweek) exit(time .) ///
fail(died==1) id(babyid) scale(365.25)
stcox i.fluvac, vce(robust)
stset, clear
** Weighted
stset endrisk_firstweek [pweight=ipw], origin(origin_firstweek) enter(startrisk_firstweek) exit(time .) ///
fail(died=1) id(babyid) scale(365.25)
stcox i.fluvac, vce(robust)
stset, clear
Related Posts with Random effects term for mother - help with some code
sts var, trendDear All, What is the minimal group size for level sufficient to use "sts test var, trend"? Specific…
Difference-in-differences with time varying differentiation.I have a data panel with information on natural disasters occurred in different municipalities and a…
Diff in Diff (xtdidreg) with Multiple Treatment Times: Granger Test and Parallel TrendsHI Everyone, I am using the new -xtdidreg- in Stata 17 to estimate the effects on GDP/capita by a p…
A need for post-estimation tool returning sample units (Countries)Dear friends, I have my estimations and models for time-series cross-sectional data. I have 172 cou…
loop variables with * wildcardI have a list of variables that I want to loop through: yr2008_q110atte yr2009_q112atte yr2010_q112…
Subscribe to:
Post Comments (Atom)
0 Response to Random effects term for mother - help with some code
Post a Comment