Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cox Proportional Hazards Model with multiple failure events and panel data

    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!

  • #2
    Katherine:
    welcome to this forum.
    Take a look at the option -shared()- in -stcox- menu and related example in -stcox- entry, Stata .pdf manual.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment

    Working...
    X