Survival Analysis

Statistics
Introduced by
Edward L. Kaplan and Paul Meier
Year
1958
Type
Method
Family
time-event-modeling

What does it do?

Survival analysis is a family of statistical methods for modeling the time from a defined starting point until an event of interest occurs, such as death, disease recurrence, recovery or equipment failure.

Its defining feature is the handling of censoring: for some individuals the event time is unknown because they left the study or were still event-free when follow-up ended. Kaplan and Meier's product-limit estimator (1958) and Cox's proportional hazards regression model (1972) are the two foundational tools, used across clinical, epidemiological and reliability research.

The intuition behind the method

In many studies, participants are followed until they experience an outcome or until the study ends. Those who reach the end without the outcome are censored: we know only that their event had not yet occurred by their last contact. Discarding them, or treating them as events, distorts the comparison. Survival analysis uses each participant's follow-up time, so censored individuals contribute the time they were event-free. The survival function S(t) is the probability of remaining event-free at time t, and the hazard h(t) is the instantaneous rate of event occurrence at time t. A hazard ratio (HR) compares event rates between groups: HR = 1 indicates no difference, HR < 1 a reduced hazard, and HR > 1 an increased hazard.

History

Kaplan and Meier's 1958 paper introduced the product-limit estimator for samples with incomplete observations, in which some lifetimes are lost before the event occurs. The estimator gives the probability of surviving beyond a given time without assuming a form for that probability. Cox's 1972 paper modeled the hazard as a function of explanatory variables multiplied by an arbitrary, unknown function of time, and derived a conditional likelihood for the regression coefficients. Later extensions, including methods for competing risks and for weighting under informative censoring, build on these foundations.

When to use it

Use survival analysis when the outcome is the time to an event and the data contain censoring, which is typical of follow-up studies with staggered entry or early withdrawal. Examples include comparing survival between treatment arms in randomized oncology trials, time to cardiovascular events in cohort studies, time from infection to recovery or progression, and time to device failure or equipment breakdown. Do not use it as a substitute for a fixed-time binary outcome with complete follow-up, where logistic regression answers the question directly. If several different event types compete (for example, recurrence and death from other causes), a single-event analysis can mislead, particularly when the question concerns absolute risk; in that case competing-risks methods are needed.

Limitations and considerations

  • The Cox model assumes that the hazard ratio is constant over time. If the effect of a covariate changes with time, a single HR summarizes an average that may not describe any particular period of follow-up well.
  • Estimates become unstable at long follow-up times when few participants remain at risk; survival estimates have wide confidence intervals there, which limits inference about late events.
  • Standard estimators assume that censoring is non-informative, meaning that the reason a participant leaves follow-up is unrelated to their prognosis. Kaplan and Meier noted that this independence assumption deserves careful scrutiny in practice. End-of-study (administrative) censoring is usually treated as non-informative, but withdrawal from follow-up because of worsening illness is not, and such informative censoring calls for approaches such as joint modeling or inverse probability weighting.
  • Conditional on the measured covariates, the estimates are free of unmeasured confounding only if all relevant prognostic factors have been recorded; in observational studies, this is rarely certain.
  • When the number of events is small relative to the number of covariates, Cox coefficients are unstable and their confidence intervals can be unreliable. Maximum-likelihood tests in survival analysis are generally trustworthy only with larger samples. One published rule of thumb suggests a sample size of about 60 when 5 or fewer covariate parameters, including treatment, are to be estimated (Eliason, 1993, as cited in Using Multivariate Statistics, 6th Edition), with larger samples needed as the number of covariates increases.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Handles censored data without discarding information: censored individuals contribute the time they were event-free, which a simple comparison of event proportions would ignore.
  • The Cox model leaves the baseline hazard h₀(t) unspecified, so covariate effects can be estimated without assuming a parametric form for how the risk changes over time.
  • The hazard ratio gives a single, interpretable comparison of event rates that is easily communicated in clinical publications.
  • Proportional hazards diagnostics make violations visible; when the assumption fails, time-varying coefficients or stratification can be used instead of a single hazard ratio.
  • Predicted survival curves for specified covariate profiles let clinicians see how prognosis differs across patient risk groups.

Applications

  • Oncology trials: comparing overall survival and disease-free survival between chemotherapy regimens, immunotherapies, or surgical approaches; informing treatment comparisons that feed into standard-of-care decisions alongside other evidence.
  • Cardiovascular research: modeling time from baseline risk factors (hypertension, diabetes, smoking) to first major adverse cardiac event; developing risk prediction algorithms.
  • Infectious disease: analyzing time from diagnosis to viral suppression (HIV), treatment completion (tuberculosis), or clinical improvement (COVID-19); comparing treatment efficacy.
  • Medical devices and implants: reliability testing of pacemakers, artificial joints, stents; predicting device failure and estimating replacement intervals.
  • Occupational epidemiology: time from occupational exposure (asbestos, silica dust) to disease diagnosis; quantifying how hazard varies with exposure, which can inform exposure-risk assessment. Setting exposure limits requires additional evidence and judgment beyond the survival analysis itself.

How it works

How it works

1

Administer survival analysis by defining: (1) the study start date (e.g., diagnosis, treatment initiation, study enrollment), (2) the event of interest (e.g., death, disease recurrence), and (3) the censoring indicator (whether the event occurred or was censored). Follow participants prospectively from baseline to event occurrence or end of follow-up. Record two key variables: time-to-event (days, months or years from start to event or last contact) and event status (1 = event occurred, 0 = censored). Collect baseline characteristics (age, treatment group, biomarkers) as covariates. Ensure event definitions are clearly operationalized and consistently ascertained across participants. Retrospective designs, which reconstruct start dates, event dates and censoring from existing records, need the same clearly defined start, event and censoring rules, and ascertainment must be applied consistently across participants; differing start times yield different censoring times, which the analysis handles through each participant's own follow-up time.

2

For a descriptive survival curve, use the Kaplan-Meier product-limit estimator, which does not assume a form for the survival function. At each distinct event time t_i, S(t_i) = S(t_{i-1}) × [1 − (d_i / n_i)], where d_i is the number of events at t_i and n_i is the number still at risk (neither had the event nor was censored before t_i). Plot the curves by group and compare them with the log-rank test, a chi-square test of observed against expected events under the null hypothesis of equal survival. For adjusted association, fit a Cox proportional hazards regression: h(t|X) = h₀(t) × exp(β₁X₁ + β₂X₂ + ...), where h₀(t) is an unspecified baseline hazard and the coefficients are estimated by partial likelihood. Hazard ratios are HR = exp(β), reported with 95% confidence intervals. Check the proportional hazards assumption with Schoenfeld residual plots or tests of time-varying coefficients; a non-significant test does not prove the assumption holds, only that no departure was detected. Report the concordance index (C-index): 0.5 corresponds to discrimination no better than chance, and higher values indicate better discrimination. The cut-offs used to label a C-index as good or excellent are conventions, not fixed thresholds.

3

Kaplan-Meier curves plot the cumulative probability of remaining event-free over time; curves that diverge early suggest strong treatment or group effects. A small log-rank p-value (p < 0.05) indicates a difference between the survival curves. For Cox regression, an HR of 1.5 for a predictor means a 50% higher hazard per unit increase, adjusting for the other covariates. HR < 1 indicates a reduced hazard (protective effect). Confidence intervals that exclude 1 indicate statistical significance. Examine Schoenfeld residuals (plotted against time) to assess the proportional hazards assumption; a systematic trend indicates that the covariate effect changes with time, in which case a time-varying coefficient model may be more appropriate. Plot the cumulative hazard or cumulative baseline hazard to visualize model fit. Predicted survival curves, stratified by exposure groups or risk categories, are the usual way to communicate results clinically.

Common pitfalls

  • Coding censored times as events: this misstates both the number of events and the risk sets at each time, so the hazard and survival estimates are biased. The direction and size of the bias depend on the data.
  • Failing to check the proportional hazards assumption: plot Schoenfeld residuals or test time-varying coefficients. A violation undermines the interpretation of a single hazard ratio.
  • Omitting or miscoding censoring indicators: event status must be coded explicitly (1 = occurred, 0 = censored), because the likelihood depends on it.
  • Comparing groups with unequal follow-up times without accounting for them: a naive comparison of event counts is biased, whereas survival methods use each participant's own follow-up time.
  • Overfitting with many covariates relative to the number of events: the model then produces unstable and unreliable coefficients. Penalized regression (ridge or lasso) or a smaller set of prespecified covariates are common remedies.
  • Reporting median follow-up as if it replaced the analysis: median follow-up describes the observation period but does not replace an analysis of each participant's follow-up time and event status.

Frequently asked questions

What does a hazard ratio of 0.6 mean, and how is it different from relative risk?

A hazard ratio (HR) of 0.6 means that, adjusting for covariates, the instantaneous event rate (hazard) in the group of interest is 60% of the reference group's rate at any given time, equivalent to a 40% reduction in hazard. The HR comes from survival or Cox analysis. Relative risk (RR) is computed from cumulative incidence in cohort or trial data: RR = [incidence in exposed] / [incidence in unexposed]. The HR approximates the RR when the event is uncommon, but the two diverge as the event becomes more common. The HR compares event rates while accounting for censoring and follow-up time, whereas the RR does not use survival methodology. Always state which measure you report.

What is the proportional hazards assumption, and what do I do if it's violated?

The proportional hazards assumption means that the hazard ratio for a covariate is constant over time. Test it by plotting Schoenfeld residuals against time; a trend suggests a violation, and a non-significant test does not confirm the assumption. Alternatively, fit a time-varying coefficient model by including an interaction between the covariate and a function of time (for example, log time). If the assumption is violated, options include: (1) stratifying the analysis by the problematic variable, which gives separate baseline hazards; (2) using an accelerated failure time model; or (3) reporting the treatment effect at specific time points (for example, 1-year and 5-year survival) separately. Always check and report this assumption.

How should I interpret the log-rank test p-value in my Kaplan-Meier analysis?

The log-rank test compares the observed number of events in each group with the number expected under the null hypothesis of equal survival curves. A p-value below 0.05 indicates a statistically significant difference in survival between the groups. Like all p-values, it tests a point null hypothesis; a large p-value does not prove equal survival, only that there is insufficient evidence to reject equality. Also report median survival time, survival probabilities at key time points (for example, 1-year and 5-year), confidence intervals, and the number at risk at each interval on the Kaplan-Meier plot.

How do I handle multiple outcomes (e.g., disease recurrence and death)?

When several distinct events are possible, use competing risks analysis. Death from other causes is a competing event: it removes participants from the risk set for recurrence. A cause-specific Cox model for recurrence, which treats competing deaths as censored, is a valid way to address etiologic questions about the hazard of recurrence. Its hazard ratios, however, do not directly give the probability of recurrence, because death also changes who remains at risk. When the goal is absolute risk or prediction, estimate the cumulative incidence function (CIF) for each event type separately rather than computing one minus the survival probability, which overstates the probability of the event when competing events occur. A subdistribution hazards model can model the cumulative incidence of each event type directly, and groups can be compared with a test designed for cumulative incidence curves. This approach is common in oncology (recurrence versus death from other causes) and cardiology (myocardial infarction versus stroke).

Related methods

Sources

  1. Kaplan, E. L., & Meier, P. (1958). Nonparametric estimation from incomplete observations. Journal of the American Statistical Association, 53(282), 457–481.

    Open DOI reference
  2. Cox, D. R. (1972). Regression models and life-tables. Journal of the Royal Statistical Society, Series B, 34(2), 187–220.

    Open DOI reference
  3. Using Multivariate Statistics (6th Edition), p. 565

  4. Econometrics by Example, 2nd Edition, p. unknown (section: An illustrative example: modeling recidivism duration)