I am trying to understand difference in output between the following lines of code:


summary(coxph(Surv(futime, fustat) ~ age + strata(rx), data=ovarian))
summary(coxph(Surv(futime, fustat) ~ age, data=ovarian))

What does adding strata(rx) do? Explanation ?strata says:

a new factor, whose levels are all possible combinations
of the factors supplied as arguments.

What is the point to take all possible combinations of factor values, when they are mutually exclusive. What am I missing? Why example contains strata(rx) i.e. only one factor, when explanation is talking about interaction of factors?

  • $\begingroup$ The explanation is a general one: one factor is a special case of the interaction between factors. $\endgroup$ – mdewey Jan 14 '17 at 11:12

In a Cox model, stratification allows for as many different hazard functions as there are strata. Beta coefficients (hazard ratios) optimized for all strata are then fitted.

In your example, the model coxph(Surv(futime, fustat) ~ age + strata(rx) will output a hazard ratio for age in the presence of two (or more) hazards intrinsic to the levels of rx. If rx violated the proportional hazards assumption, for example, stratifying may help meet the PH assumption and provide more valid estimates for age. The effect of rx is not explicitly provided as a hazard ratio. Likelihood estimates for the model can be used to assess whether stratification by rx improved the model fit.

coxph(Surv(futime, fustat) ~ age will output a hazard ratio for age only, assuming that the hazard for different levels of rx are the same. In this model, the effect of rx is not explicitly modeled.

The model coxph(Surv(futime, fustat) ~ age + rx may be useful to consider. This model would provide estimates of the HR for age and rx with both present in the model ("adjusted for one another"). This would be different from coxph(Surv(futime, fustat) ~ age + str(rx) in that the unstratified model provides estimation of effect for both age and rx using a single underlying hazard.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.