Announcement

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

  • Strata option in Cox regression and proportional hazards violation

    Hi there,

    I'm using the stcox command in stata MP 16.1. Some of my variables violate the proportional hazards assumption (using Schoenfeld Residuals method) and I understand the 'strata' option is one method to help deal with this, but I am unsure if I am using or specifying this correctly.

    The stata manual states: "stcox xvars, strata(svars) you are allowing the baseline hazard functions to differ for the groups identified by svars. This is equivalent to fitting separate Cox proportional hazards models under the constraint that the coefficients are equal but the baseline hazard functions are not."

    As an example, I want to enter age and calendar period in the strata option as they both violate the proportional hazards assumption. The data set is large (c.40,000) records and spans eighty years.

    1) This is what I entered initially using categorical versions of age (5_year age band) and calendar period (10-year age bands).
    stcox i.exposure_var, strata(age_categorical_5, calendar_period_10)

    2) I again entered age and calendar period (but both with 5-year age bands). I was worried that the age and calendar period strata had too few observations (several cells have under twenty observations although the outcome (mortality) is common - 66%.
    stcox i.exposure_var, strata(age_categorical_5, calendar_period_5)

    3) Then I entered the age and calendar period in their continuous forms - and expected an error - but the model ran ok - which confused me.
    stcox i.exposure_var, strata(age, calendar_year)

    Model 1: exposure_var HR=1,05, 95% CI 1.02 - 1.08)
    Model 2: exposure_var HR=1,05, 95% CI 1.02 - 1.08)
    Model 3: exposure_var HR=0.99, 95% CI 0.91 - 1.07)

    If anyone could please help me as to whether I have used the 'strata' option correctly that would be great.

    Thank you,

    Gemma.
    Last edited by Gemma Archer; 22 Apr 2021, 08:22.

  • #2
    I'll just add, there should not be a comma in the command line strata parentheses. Commands should read e.g.
    stcox i.exposure_var, strata(age_categorical_5 calendar_period_10)

    Comment

    Working...
    X