Survival analysis: Kaplan-Meier, Cox regression and competing risks
Time-to-event methods exist because censoring is information. The commonest errors come from forgetting that, or from ignoring the events that make the event of interest impossible.
Survival analysis handles outcomes where both whether an event happened and when it happened matter, and where some participants are still event-free when observation ends.
That last group is censored. They are not failures and not successes; they are participants about whom we know the event had not happened by a certain time. Discarding them, or treating them as event-free forever, throws away the information their follow-up carries.
Reading a Kaplan-Meier curve
The curve estimates the probability of remaining event-free over time, stepping down at each event and accounting for censoring between steps.
Two things to look at that people skip.
The numbers at risk, printed beneath the axis. The right-hand tail of a curve is often estimated from a handful of participants, and looks confident while resting on almost nothing.
Whether the curves cross or converge. A log-rank test compares curves across the whole follow-up and has poor power when effects reverse, so a non-significant result with crossing curves usually means "the effect changed over time", not "there was no effect".
What Cox regression assumes
A constant hazard ratio over follow-up: proportional hazards.
Check it — scaled Schoenfeld residuals, or log-minus-log plots — and report that you did. Where it fails, the reported hazard ratio is an average of a changing effect, and its meaning depends on when people happened to be followed.
Where it fails materially, the options are a time-varying coefficient, stratification on the offending variable, or a different summary such as restricted mean survival time.
Competing risks
If a patient dies of something other than the outcome you are studying, they can no longer experience it. Treating that death as censoring assumes they could still have had the event, which is false.
Kaplan-Meier estimates are then biased upwards, sometimes substantially, in older populations or long follow-up where competing mortality is high.
Use the cumulative incidence function for absolute risk, and a cause-specific or subdistribution model depending on the question: cause-specific hazards for aetiology, subdistribution for prediction and absolute risk.
What to report
Median follow-up and how it was calculated, numbers at risk on every figure, the proportional hazards check, how competing events were handled, and absolute risks alongside the hazard ratio.
Frequently asked questions
Why do you need survival analysis instead of logistic regression?
Because censoring is information. Participants still event-free when observation ends contribute what is known about them, and methods that ignore timing and censoring discard that, biasing the result and losing power.
What does Cox regression assume?
Proportional hazards — a constant hazard ratio over follow-up. It should be checked with scaled Schoenfeld residuals or log-minus-log plots, and the check should be reported. Where it fails, the hazard ratio is an average of a changing effect.
What are competing risks in survival analysis?
Events that make the outcome of interest impossible, such as death from another cause. Treating them as censoring assumes the participant could still have had the event, which biases Kaplan-Meier estimates upwards. Use the cumulative incidence function for absolute risk.