HeadlinesBriefing favicon HeadlinesBriefing.com

Survival Analysis & Cox Model Guide

Towards Data Science •
×

Survival analysis addresses time-to-event data where outcomes are incomplete due to censoring. Ordinary regression fails here because it cannot handle cases where the event hasn't occurred by study end—like 318 of 432 released prisoners not re-arrested within one year. Censoring means we know a subject lasted at least until time t, but not their total survival time.

Survival analysis provides tools for such scenarios, where the clock is still running when observation stops. Core concepts include: (1) recording duration and event indicator (1 if event occurred, 0 if censored); (2) the survival function S(t), the probability of surviving past time t—for example, S(12 months) = 0.7 means 70% remain event-free at one year; (3) the hazard function h(t), the instantaneous event rate given survival up to t—like the drainage rate of a water tank, while survival is the water left. Hazard and survival are mathematically linked: integrating hazard yields survival.

Hazard is preferred for modeling because it naturally incorporates covariates, e.g., stating financial aid multiplies re-arrest rate by 0.68 at every moment. The guide proceeds to estimate survival curves via Kaplan-Meier, then focus on Cox proportional hazards regression, and finally fit a model in Python to interpret hazard ratios.