Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 47

Stratified Cox Models: Purpose and Interpretation

Recommended resources

Hello! Welcome back to our course.

In the last lesson, we focused on a crucial diagnostic step: using Schoenfeld residuals to formally test the proportional hazards (PH) assumption of the Cox model. This raised an important practical question: what should you do when you find evidence that a covariate violates this assumption? Today, we will explore one of the most common and powerful solutions to this problem.

This lesson introduces the stratified Cox model. You will learn how this extension of the standard Cox model allows us to control for variables that have non-proportional hazards. By the end of our session, you will be able to describe the purpose of a stratified Cox model and, most importantly, correctly interpret its output, a key skill for critically evaluating survival analysis results.

When Proportionality Fails: The Need for Stratification

Let's begin by recapping the core issue. The standard Cox model, with its formula , rests on the assumption that all individuals in the study share a single, common baseline hazard function, . A covariate that violates the PH assumption is one where the hazard ratio is not constant over time. This effectively means that the shape of the hazard function is different for different levels of that covariate, which contradicts the "single baseline hazard" assumption.

So, how can we fix this? Instead of forcing all groups to share the same baseline hazard, what if we allowed certain groups to have their own? This is precisely the logic of stratification.

The stratified Cox model divides the study population into distinct groups, or strata, based on the levels of the problematic covariate. It then estimates a separate baseline hazard function for each stratum. The key, however, is that it still estimates a single, common set of coefficients () for the other covariates across all strata.

This diagram provides a great conceptual overview of the process.

This diagram illustrates the principle of stratification. The population is divided into distinct subgroups (strata), each with its own unique baseline hazard. The model then combines information across these strata to estimate a single, common effect for the other covariates in the model.

To formalize this idea, let's look at the underlying mechanics.

[PDF] Stratification in the Cox model - MyWeb

These lecture notes from a course at the University of Iowa provide a clear, concise explanation of the purpose and mathematical foundation of the stratified Cox model.

First, read the brief introduction on slide 2, which clearly outlines the two primary uses of stratification. Next, please jump to slide 15, titled "The stratified Cox model," and read the paragraph explaining the model. Pay close attention to the formula presented, as it is the mathematical heart of this technique.

The formula from the reading is the most important part to understand:

Let's break this down:

  • is the hazard for the -th person, who belongs to stratum .
  • is the baseline hazard for stratum . The subscript is the crucial modification. It signifies that each stratum gets its own unique baseline hazard function. This is how the model accommodates the non-proportionality.
  • represents the effect of the other covariates. Notice that the coefficient vector does not have a subscript . This means the hazard ratios for these covariates are assumed to be the same across all strata.

In essence, we are letting the baseline risk vary freely between, for example, males and females (by stratifying on sex), while still estimating a single, unified effect of a new drug treatment across both groups.


Interpreting the Output of a Stratified Cox Model

Now that you understand the "why," let's move to the "how." How do you interpret the results once you've fit a stratified model? The most important thing to realize is that the variable you stratify on is treated differently from the other covariates.

Because the model estimates a separate baseline hazard for each stratum instead of a single coefficient, the stratification variable is removed from the main coefficient table. You will not get a hazard ratio or a p-value for it. This is by design. Its effect is absorbed into the differing shapes of the baseline hazard functions.

The following reading provides an excellent walkthrough. Although the code examples are in Python, the model output and interpretation principles are universal and apply directly to R as well.

The Stratified Cox Proportional Hazards Regression Model

This article demonstrates how to build a stratified model to resolve a PH assumption violation and then explains how to interpret the final output.

Begin by reading the section where the author re-tests the PH assumption after stratifying. Start from the paragraph "Let’s test the proportional...". Note the resulting table of p-values. The author makes a key observation in point #2 about the absence of the stratified variables. Next, focus on the main interpretation section, "How to interpret the output...". Carefully observe how the hazard ratios for the remaining variables (CELL_TYPE[T.2], TREATMENT_TYPE, etc.) are calculated and explained.

As the article demonstrates, the interpretation of the other covariates in the model is exactly the same as in a standard Cox model. For a given covariate:

  • The coefficient () is the log-hazard ratio.
  • The hazard ratio () is the multiplicative change in hazard for a one-unit increase in the covariate, holding all other covariates constant and within any given stratum.
  • The p-value and confidence interval are interpreted in the usual way to assess statistical significance.

This diagram serves as a quick reminder for interpreting any hazard ratio you encounter in the model's output.

A visual guide to interpreting hazard ratios (HR). An HR less than 1 indicates decreased risk with an increase in the covariate. An HR of 1 indicates no effect. An HR greater than 1 indicates increased risk.

The process, therefore, is:

  1. Identify which variable(s) were used for stratification.
  2. Acknowledge that you cannot make a direct inferential statement (i.e., get a single HR or p-value) about their effect from the model summary.
  3. Interpret the HRs for all other covariates in the model as you normally would.

Limitations and Final Considerations

While stratification is an elegant solution, it's not without trade-offs. It's crucial to understand its limitations to know when it's the right tool for the job.

[PDF] Stratification in the Cox model - MyWeb

This final part of the lecture notes provides a critical perspective on the drawbacks of using a stratified model.

Please read the two slides titled "Final remarks," which begin on slide 19. Focus on the three key limitations discussed by the author.

Let's summarize the main drawbacks:

  • You lose the ability to estimate the effect of the stratification variable. This is the most significant limitation. If the variable violating the PH assumption is the main exposure or treatment you want to study, stratification is a poor choice because it prevents you from getting the very hazard ratio you are interested in. It's best used for "nuisance" confounders that you need to control for but aren't the focus of your analysis.
  • It is best suited for categorical variables. While you can stratify on a continuous variable by cutting it into categories (e.g., age <50, 50-70, >70), the choice of cut-points can be arbitrary and can lead to a loss of information.
  • There can be a minor loss of statistical power. By estimating multiple baseline hazard functions instead of just one, the model is more flexible but slightly less efficient. This might result in slightly wider confidence intervals for the other covariates compared to a standard Cox model (if the PH assumption had held).

Conclusion

In this lesson, we've added an essential technique to your survival analysis toolkit. When faced with a categorical covariate that violates the proportional hazards assumption, you now have a robust method for handling it.

Here are the key takeaways:

  • The stratified Cox model is used to adjust for a covariate that violates the proportional hazards assumption.
  • It works by estimating a separate and unique baseline hazard function for each level (stratum) of the problematic variable.
  • The hazard ratios for all other covariates in the model are assumed to be constant across the strata.
  • When interpreting the output, the stratification variable will not appear in the coefficient table and will not have a hazard ratio. The coefficients for the remaining variables are interpreted just as they would be in a standard Cox model.
  • This method is ideal for controlling for non-proportional "nuisance" variables, but not for your primary variable of interest.

You are now equipped to handle one of the most common challenges in Cox regression. However, as we've discussed, stratification isn't always the right answer, especially when the main exposure variable itself has non-proportional hazards.

In our next lesson, we will address that exact scenario by exploring another advanced technique: modeling with time-dependent covariates. This approach will allow us to explicitly estimate how a hazard ratio changes over time, providing an even deeper insight into the dynamics of risk.