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
Creating graphsHi everyone I have recently started to use Stata, and struggling to create graphs. Which codes shou…
Accessing ado code for svy: total to identify variance estimation methodHello, I'm needing to estimate standard errors in an Excel file, for a complex survey. It is a two s…
(How) Can I calculate a significance test for Kendall´s Tau c in Stata?Dear community, I calculated Kendall´s tau c in Stata "by hand" because the ktau-command only conta…
Calculating the difference between two paired observations ignoring missing valuesHi, I'm sure there's a simple way to do this but I can't seem to find a solution. I have two varia…
principal factor vs. principal-component factor option for factor analysis Hello everyone! Can someone explain me the difference between the "principal-factor" and "principa…
Subscribe to:
Post Comments (Atom)
0 Response to Cox Proportional Hazards Model with multiple failure events and panel data
Post a Comment