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
Matching Panel Data to Diff-in-DiffHowdy, Statalisters, I'm trying to create comparison groups to ultimately move into a diff-in-diff e…
difficulty in exporting summary stat using asdocDear members I am trying to export summary stata for my study key variables per country. I want the…
psacalc with sureg - sharing codeHi, I have been working on bounds analysis using psacalc for my regress and xtreg, fe models. I nee…
Calculating response rates to surveysDear all, I have a project which sends surveys to participants based on certain events. I would li…
Annual constant increase rate from monthly data*Dear all! I have some monthly inflation CPI data and wanted to create two new time series. First, t…
Subscribe to:
Post Comments (Atom)
0 Response to Cox Proportional Hazards Model with multiple failure events and panel data
Post a Comment