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
Test how rating would have changed given new parameters but old characteristics?Dear colleagues, For firms i=1,...,50 and years t=1,...,10, I have ratings which can be expressed a…
Mean size of householdi am just a beginner in stata , i want to know a simple command for calculating the mean size of hou…
7-point ordinal dependent variable: Is it okay to transform and model with fracreg logit?Greetings, I'm running Stata 15.1 on a Mac OS and working with cross-sectional survey data. My depe…
Can xtologit work with three-level model?I am currently working on a panel data with xtologit command. My data has a three-level structure wh…
XTIVREG, FE: needs to be FE in stage 1 and 2?Hi all, I'm running a fixed effects regression using an IV variable, but I'm wondering, do I need t…
Subscribe to:
Post Comments (Atom)
0 Response to Cox Proportional Hazards Model with multiple failure events and panel data
Post a Comment