I would like to use a Cox Proportional Hazards Model to estimate the hazard rate of an individual in my data set experiencing food insecurity based on various demographic characteristics. I have a panel data set, and each individual has about 10 different chances to experience food insecurity in 10 different years, which gives me 10 different failure variables.
I'm using Stata 13.0, and I can't find a way for the stcox command to include more than one variable as a failure event.
Ideally, I'd like to use my variables for Food Insecurity in each year (Food Insecurity_2014, Food Insecurity_2012, etc.) as failure events. An individual who experiences food insecurity in multiple years is obviously more at risk than someone who only experiences it once, so I'd like my hazard rates to reflect this.
My code looks roughly like:
stset time, failure(Food_Insecurity_14 Food_Insecurity_12 etc.) stcox x1 x2 etc. This gives me the error message: "option failure(): syntax error" because stata won't allow me to use more than one variable as a failure event.
My code works if I use only one binary variable for if an individual ever experienced food insecurity in any year. However, this means I'm treating an individual who experienced food insecurity once the same as someone who did ten times. I would prefer to include the number of food insecurities.
Does anyone have any experience for using a Cox Proportional Hazards Model in cases where the failure event can happen more than once? Thank you!
Related Posts with Cox Proportional Hazards Model with multiple failure events and panel data
PkequivHi, I am using the pkequiv function to compare plasma levels between two medicinal solutions, do i n…
Power calculations with IVHello (from a new member), Can someone guide me on how to do power calculations in stata to show th…
bootstrap with replacement - roctabHi, I am running roctab to find the ROC area. We have repeated measures - some subjects have two ob…
Propensity score matching (psmatch2) for clustered dataHello everyone, I'm trying to implement propensity score matching (PSM) in a situation of clustered…
dummy=1 over a period when a condition satisfiesIt is tough to explain but i will try my best. "Surge" is the dummy variable i created for capital f…
Subscribe to:
Post Comments (Atom)
0 Response to Cox Proportional Hazards Model with multiple failure events and panel data
Post a Comment