Cox proportional hazards regression
Estimates how the hazard of an event changes with one or more factors, holding the others fixed.
Clinical example
Does the hazard of death differ between two treatments once age and tumor stage are taken into account?
When to use it
- The outcome is the time until an event, with some patients censored.
- You need to adjust for other variables.
- Competing events are rare or absent.
Assumptions to check
Proportional hazards
The hazard ratio is assumed constant over time. Check it, for example with Schoenfeld residuals (cox.zph in R).
Non-informative censoring
Patients who are censored, for example lost to follow-up, should have the same future risk as patients who remain under observation.
Check first
- Proportional hazards assumption
What to report
- Hazard ratio with 95% CI for your main factor
- The variables you adjusted for, and why
- The number of events, and how you checked proportional hazards
Common mistakes
Check proportional hazards
Cox regression assumes the hazard ratio is constant over time. Check it, for example with Schoenfeld residuals.
Mind the number of events
For yes/no and survival outcomes, the number of events limits how many variables the model can hold reliably, not the number of patients.
Don't turn time-to-event into yes/no
Counting who had the event by the end ignores when it happened and how long each patient was followed.
Alternatives
| If your situation is… | Use |
|---|---|
| No adjustment needed | Kaplan-Meier curves and log-rank test |
| A competing event is common | Competing risks: cumulative incidence and Fine-Gray |
In your software
# R
library(survival)
fit <- coxph(Surv(time_months, death) ~ treatment + age + stage, data = cohort)
summary(fit)
cox.zph(fit)
COXREG time_months
/STATUS=death(1)
/METHOD=ENTER treatment age stage
/PRINT=CI(95).