Introduction
The Cox proportional hazards model is a central method for analyzing time-to-event endpoints such as overall survival, progression-free survival, time to relapse, and time to treatment discontinuation. Its appeal comes from the fact that the baseline hazard does not need to be specified parametrically.
The ordinary Cox model assumes a common baseline hazard for everyone after accounting for the covariates in the linear predictor:
That common-baseline assumption can be unnecessarily restrictive in a multicenter clinical trial. Patients from different regions, centers, disease stages, or other prespecified groups may have very different underlying event risks. A stratified Cox model allows those groups to have different baseline hazard functions while estimating a common set of regression coefficients for the covariates of scientific interest.
The Standard Cox Model
Let \(T\) denote event time and let \(X=(X_1,\ldots,X_p)\) be the covariate vector. The ordinary Cox model is:
For covariate \(X_j\), the corresponding hazard ratio for a one-unit increase is:
For a binary treatment indicator, \(HR_{trt}\) compares the instantaneous event hazards for treatment versus control, conditional on the other modeled variables and under the proportional-hazards assumption.
Why Stratify the Baseline Hazard?
Suppose a Phase III trial enrolls patients from three geographic regions. Region may be strongly associated with prognosis because of differences in disease severity, background therapy, clinical practice, or referral patterns.
One approach is to put region into the linear predictor as a categorical covariate. That produces hazard ratios for the regions relative to a reference region and assumes those region effects are proportional over time.
A stratified model instead permits each region to have its own baseline hazard:
The functions \(h_{01}(t),\ldots,h_{0K}(t)\) are left unspecified. They can differ in level and shape. The common coefficient vector \(\\beta\) describes the effects of the variables that remain in the model.
The Stratified Cox Model
Let \(S_i\) denote the stratum for subject \(i\). The model can be written:
For three strata, for example, the model contains three unspecified baseline hazards:
but one common regression vector. This is the central distinction between a stratified model and fitting separate Cox models in every stratum.
| Component | Standard Cox | Stratified Cox |
|---|---|---|
| Baseline hazard | One common \(h_0(t)\) | One \(h_{0k}(t)\) per stratum |
| Regression coefficients | Common | Common across strata |
| Stratification variable | Can receive an HR if modeled | No ordinary regression coefficient |
| Baseline-hazard shape | Common | May differ by stratum |
| Risk-set comparisons | Across the overall eligible risk set | Within each stratum |
How Stratification Changes the Risk Sets
The easiest way to understand stratification is through the Cox partial likelihood. At each event time, a subject who experiences the event is compared with subjects who are still at risk.
In the stratified model, these comparisons are made within the same stratum. If a patient in stratum 2 has an event at time \(t\), the relevant risk set contains eligible patients in stratum 2 rather than patients from all strata.
The Stratified Partial Likelihood
For stratum \(k\), let \(D_k\) be its observed event times and \(R_k(t)\) its risk set at time \(t\). Ignoring tied-event complications, the partial-likelihood contribution is:
The overall stratified partial likelihood is:
Thus the baseline hazards disappear from the likelihood used to estimate \(\\beta\), while stratification remains visible through the separate risk sets. This is why the model can accommodate very different baseline hazard shapes without requiring a parametric baseline model.
When Should You Use Stratification?
1. Strong baseline heterogeneity
Center, region, disease stage, or another design-defined factor may generate large differences in baseline risk. If the factor is primarily a nuisance adjustment variable, stratification is often attractive.
2. A questionable PH assumption for the factor
If a categorical factor does not satisfy proportional hazards, stratification removes the need to estimate one constant hazard ratio for that factor. The factor instead defines separate baseline hazards.
3. A prespecified randomization factor
If randomization was stratified by region or another prognostic factor, the SAP may specify that factor as a Cox stratification variable. This preserves adjustment for the design feature without requiring a proportional-hazards coefficient for it.
4. Adjustment without scientific interest in the factor
If the scientific question concerns treatment, age, biomarker status, or another variable—not the stratum itself—stratification can provide flexible nuisance adjustment.
When Should You Not Stratify?
- You need an HR for the factor. Stratification does not produce an ordinary HR for the stratification variable.
- There are many sparse strata. Very small risk sets and few events can reduce precision.
- Treatment effects differ across strata. A standard stratified model still assumes a common treatment coefficient.
- The variable is post-baseline. Baseline stratification should not be confused with time-dependent modeling.
- There is little within-stratum treatment variation. A stratum containing only one treatment group cannot provide the usual within-stratum treatment contrast.
Stratification vs. Including a Covariate
Suppose \(Z\) is a three-level disease-stage variable. An ordinary Cox model could be written:
The coefficients in \(\\gamma_Z\) provide hazard ratios for the stages relative to a reference category. The model also assumes those effects are proportional over time.
A stratified model instead uses:
The second model is more flexible about the baseline hazard but does not estimate a single stage hazard ratio.
| Question | Covariate | Stratification |
|---|---|---|
| Need an HR for the factor? | Yes | No |
| Want arbitrary baseline hazards by group? | No | Yes |
| Concerned about PH for the factor? | Potential issue | Often useful |
| Need treatment-by-group effects? | Use interaction | Interaction still needed |
Worked Clinical-Trial Example
Consider a randomized oncology trial comparing an experimental treatment with control. The primary endpoint is progression-free survival. Patients come from three geographic regions. Region is prognostic, but the scientific objective is the treatment effect.
| Variable | Role |
|---|---|
| TIME | Time to progression/death or censoring |
| EVENT | 1 = event, 0 = censored |
| TRT | 1 = experimental, 0 = control |
| AGE | Baseline age |
| ECOG | Baseline performance status |
| REGION | Region 1, 2, or 3; stratification factor |
The planned model is:
REGION is not in the linear predictor. Instead, it determines which baseline hazard and risk set apply to each patient.
Illustrative Results
Suppose the fitted model produces the following hypothetical estimates:
| Parameter | Estimate | HR | 95% CI | P-value |
|---|---|---|---|---|
| Treatment | 0.405 | 1.50 | 1.15–1.96 | 0.003 |
| Age, per year | 0.012 | 1.012 | 1.004–1.020 | 0.004 |
| ECOG, per category | 0.280 | 1.32 | 1.10–1.58 | 0.003 |
For treatment:
The illustrative estimate corresponds to an approximately 50% higher instantaneous event hazard for experimental treatment versus control, conditional on the modeled covariates and within the stratified analysis structure. These numbers are hypothetical and are included only to demonstrate interpretation.
Common Treatment Effect Across Strata
For three strata, the model permits:
The baseline hazards can have different shapes, but the treatment coefficient is common. Consequently:
for every stratum \(k\). This is why stratified baseline hazards do not automatically mean stratum-specific treatment effects.
If Treatment Effects Differ by Stratum
Suppose treatment is believed to work differently across regions. Stratification alone does not estimate three treatment effects. A treatment-by-region interaction must be introduced, or separate analyses must be justified.
The interaction terms allow the treatment effect to vary by stratum. This is a different scientific question from allowing baseline hazards to differ.
Stratification and the PH Assumption
For two subjects in the same stratum, the model implies:
which does not depend on time. Stratification can remove the proportional-hazards assumption for the stratification factor itself, but it does not automatically fix a PH violation for treatment, age, ECOG, or another variable that remains in the linear predictor.
Schoenfeld Residual Diagnostics
For important modeled covariates, Schoenfeld residual diagnostics can be used to assess whether there is evidence that a coefficient changes over time. If treatment violates PH, possible approaches include a time-varying treatment effect, a piecewise model, or an alternative survival model. Stratifying on an unrelated center or region variable does not resolve a treatment PH violation.
Tied Event Times
Clinical-trial event times are often tied because times are recorded to a day, week, visit, or other discrete resolution. The simple partial-likelihood expression assumes distinct event times, so software uses a method for tied events.
Common choices include the Breslow and Efron methods. The stratified structure remains the same: tied-event calculations are performed within the relevant stratum-specific risk sets.
SAS Implementation: PROC PHREG
In SAS, use the STRATA statement in
PROC PHREG.
proc phreg data=analysis;
class trt(ref='0') ecog(ref='0');
model time*event(0) =
trt
age
ecog
/ ties=efron
rl;
strata region;
run;
The STRATA REGION statement gives each region its own
baseline hazard. REGION therefore does not appear as an ordinary regression parameter.
SAS: Allowing Treatment-by-Region Heterogeneity
proc phreg data=analysis;
class trt(ref='0') ecog(ref='0') region;
model time*event(0) =
trt
age
ecog
trt*region
/ ties=efron
rl;
strata region;
run;
The interaction terms answer a different question: whether the treatment effect changes across regions.
R Implementation: survival::coxph
In R, put strata(region) directly in the model formula:
library(survival) fit <- coxph( Surv(time, event) ~ trt + age + ecog + strata(region), data = analysis, ties = "efron" ) summary(fit)
The output contains coefficients for treatment, age, and ECOG but not for REGION. That is the expected behavior for a stratification factor.
Checking PH Assumptions in R
ph_test <- cox.zph(fit) print(ph_test) plot(ph_test)
These diagnostics concern the covariates represented by estimated coefficients. A stratified variable is not being estimated as an ordinary coefficient.
Stratification Is Not the Same as Clustering
Another common source of confusion is the distinction between stratification and correlation or clustering.
| Method | Primary purpose | What changes? |
|---|---|---|
| Stratification | Allow different baseline hazards | Risk sets and baseline-hazard structure |
| Robust sandwich variance | Account for dependence | Variance estimation |
| Frailty/random effect | Model unobserved heterogeneity | Random-effect structure |
For example, repeated observations or correlated patients within a provider may call for a robust variance approach. That does not mean the provider should automatically be a Cox stratification factor. The two methods solve different problems.
Efficiency and Sparse Strata
The flexibility of stratification has a cost. Because comparisons are made within strata, subjects in different strata do not directly enter one another's risk sets. If there are many strata with few events, the common regression estimates can become less precise.
Before stratifying, examine:
- the number of strata;
- subjects and events per stratum;
- treatment balance within each stratum;
- within-stratum variation in the important covariates; and
- whether the factor is truly needed as a baseline-hazard adjustment.
Clinical-Trial Analysis Workflow
Common Mistakes
Mistake 1: Expecting an HR for the Stratification Variable
If STRATA REGION is specified, there is no conventional
REGION hazard ratio in the model output. That is a feature, not an error.
Mistake 2: Assuming Stratification Creates Separate Treatment Effects
A standard stratified Cox model estimates a common treatment coefficient. Separate effects require an interaction or separate models.
Mistake 3: Stratifying on Treatment
Treatment is generally not an appropriate stratification variable when the primary goal is to estimate its hazard ratio. The treatment contrast must remain available for the regression comparison.
Mistake 4: Using Stratification to Hide a Treatment PH Violation
Stratifying on region does not make a time-varying treatment effect proportional. Treatment itself needs an appropriate time-dependent or alternative modeling strategy.
Mistake 5: Creating Excessive Numbers of Strata
A large number of sparse strata can fragment the risk sets and reduce precision. Center stratification can be appropriate in multicenter trials, but the number of centers and event counts should be considered.
Example SAP Language
A concise SAP description might be:
The final wording should match the actual protocol, estimand, randomization scheme, endpoint definition, censoring rules, and prespecified analysis conventions.
Key Takeaways
- A stratified Cox model permits different baseline hazard functions across strata.
- The regression coefficients remain common across strata unless interactions are added.
- The stratification variable does not receive a conventional hazard-ratio estimate.
- Stratification is useful when baseline heterogeneity is important but a single proportional-hazards effect for the factor is not scientifically required.
- Stratification can avoid the PH assumption for the stratification factor itself, but not for other modeled covariates.
- Treatment-effect heterogeneity requires an interaction or another explicitly heterogeneous-effects approach.
- Too many small strata can reduce the precision of the common regression estimates.
- In SAS use
STRATA; in R usestrata()withincoxph().
References
Cox, D.R. (1972).
Regression Models and Life-Tables.
Journal of the Royal Statistical Society: Series B, 34(2), 187–220.
Cox, D.R. (1975).
Partial likelihood.
Biometrika, 62(2), 269–276.
Kalbfleisch, J.D. & Prentice, R.L. (2002).
The Statistical Analysis of Failure Time Data, 2nd ed.
Wiley.
Klein, J.P. & Moeschberger, M.L. (2003).
Survival Analysis: Techniques for Censored and Truncated Data, 2nd ed.
Springer.
Therneau, T.M. & Grambsch, P.M. (2000).
Modeling Survival Data: Extending the Cox Model.
Springer.