What Is Survival Analysis?
Time Until Event
• When do customers churn after signing up?
• How long until machine parts fail?
• When do employees leave after hiring?
Survival analysis studies the time until an event of interest occurs. Despite the name 'survival,' the event doesn't have to be death - it's any transition from one state to another.
Why Not Just Use Mean Time?
Standard statistics (mean, regression) can't handle censored observations. Survival analysis uses all available information, including partial information from subjects who didn't experience the event.
Terminology
Survival analysis has its own vocabulary. The 'event' is what you're tracking. 'Censored' observations are those where we don't observe the event - we only know survival time is greater than observed follow-up.
Censoring
Kinds of Censoring
Right censoring is most common: the study ends or patient is lost to follow-up before the event. We know they survived at least that long, but not exactly how long.
Seeing Censoring
Each horizontal line represents one subject. Lines end at either an event (filled circle) or censoring (open circle). Censored subjects contribute information up to their last observation.
Non-informative Censoring
OK: Study ends at planned date
PROBLEM: Patient drops out because too sick for appointments
PROBLEM: Healthy patients stop coming because they feel fine
If censoring is related to prognosis, survival estimates are biased. Patients censored because they're too sick (or too healthy) violate this assumption.
Kaplan-Meier Curves
Survival Function Estimate
The Kaplan-Meier curve shows estimated survival probability over time. It starts at 1.0 (everyone alive) and steps down at each event. Censored observations are marked but don't cause drops.
Interpreting K-M Curves
K-M curves let you read off survival probability at any time point. Median survival is when 50% have experienced the event. Compare groups by plotting multiple curves.
Comparing Groups
Drug group has significantly better survival
The log-rank test compares survival curves between groups. It tests H₀: the survival functions are the same. Significant p-value means the curves differ more than expected by chance.
Cox Proportional Hazards
Regression for Survival
• h(t) = hazard at time t
• h₀(t) = baseline hazard
• exp(β) = hazard ratio
Cox regression models how covariates affect the hazard function. It's 'semi-parametric' - no assumption about the baseline hazard shape, but assumes proportional hazards.
The Key Output
The hazard ratio (HR) is the key output. HR = 2.0 means twice the risk of event. HR = 0.5 means half the risk. The 95% CI tells you if HR differs significantly from 1.0.
Proportional Hazards
• Schoenfeld residuals test (p > .05 = OK)
• Plot log(-log(S(t))) - lines should be parallel
If violated: Use stratified Cox model or time-varying covariates
The proportional hazards assumption means relative risk is constant over time. If the effect of a predictor changes over time (e.g., treatment works early but not late), the assumption is violated.
Real-World Examples
Apply your knowledge to practical scenarios
Cancer Treatment Comparison
A clinical trial compares a new chemotherapy regimen to standard treatment. 200 patients are randomized and followed for 5 years. Primary outcome is overall survival.
Key Insights
- Censored patients contribute information up to their last observation
- K-M curves show survival at specific time points
- HR < 1 indicates protective effect (better survival)
Survival Analysis Quiz
Test your understanding • Passing score: 70%