Time-to-Event Data: From Risk Sets to Cox Models
Learn how to analyse censored time-to-event data using Kaplan–Meier curves, log-rank tests and Cox regression while checking key assumptions.
Why time-to-event data require special methods
Survival analysis considers both whether an event occurs and the time until it occurs. Participants who remain event-free at the end of follow-up, withdraw or are lost can contribute censored observations. Excluding them discards information and may create bias.
Kaplan–Meier estimation
The Kaplan–Meier estimator calculates the probability of remaining event-free at each observed event time. Censoring marks, confidence intervals and numbers at risk should accompany the curve. Estimates in the tail can be unstable when only a few participants remain under observation.
Median survival
Median survival is the time at which estimated survival reaches 0.50. If the curve never falls below 0.50, the median has not been reached; the last follow-up time is not a valid substitute. Survival probabilities at clinically relevant time points may be more useful.
Log-rank testing
The log-rank test compares survival curves globally. It does not provide an effect size or covariate adjustment and can be difficult to interpret when curves cross or effects vary strongly over time.
Cox proportional hazards regression
Cox regression expresses covariate associations as hazard ratios. An HR of 0.70 means that, under the model assumptions, the instantaneous event rate is approximately 30% lower at a given time. It does not mean a 30% reduction in cumulative risk or a 30% increase in survival time.
Check proportional hazards
Schoenfeld residuals, log-minus-log plots and time interactions can be used to assess proportional hazards. If the assumption is not adequate, consider stratification, time-varying coefficients, restricted mean survival time or suitable parametric models.
Important design issues
Define time zero and the event precisely.
Investigate reasons for loss to follow-up and informative censoring.
Use recurrent-event methods when multiple events per participant matter.
Consider competing-risk methods when one event prevents another.
Avoid unnecessary categorisation of continuous predictors.
Limit model complexity relative to the number of observed events.
Reporting example
“Two-year event-free survival was 74% (95% CI 66–81) in the treatment group and 61% (95% CI 52–69) in controls. The adjusted Cox model estimated HR 0.68 (95% CI 0.50–0.93). No important violation of proportional hazards was identified.”
References
Kaplan EL, Meier P. Nonparametric Estimation from Incomplete Observations. 1958.
Survival Analysis, Kaplan–Meier Curves, and Cox Regression. 2023.
Accessed 20 June 2026.