Kaplan–Meier and Nelson–Aalen Estimation › Practical Implications
Machine Learning from ScratchAll chapters Kaplan–Meier and Nelson–Aalen Estimation › Practical ImplicationsSection view · Sections in this chapter8 / 10 ↓
Reading tools Definitions, links & notes
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Under the chapter's independent right-censoring and sampling assumptions, Kaplan-Meier provides a nonparametric descriptive survival curve. It suits summarizing time-to-event data, estimating medians or other quantiles, comparing unadjusted groups, and supplying the empirical curve behind a more structured model. Nelson–Aalen is the natural choice when the cumulative hazard is the target, when building the baseline cumulative hazard for a Cox model, or when working with counting-process representations, and the two answer complementary survival and cumulative-hazard questions. Alternatives become preferable when description is not enough: to adjust for covariates, the Cox model extends the risk-set approach through partial likelihood, while a parametric accelerated failure-time model relates covariates to survival time using a censored-data likelihood; when a competing event can preclude the event of interest, coding that competing event as censored and using one minus the ordinary Kaplan–Meier estimate can overestimate the cumulative incidence of interest, so cumulative incidence should instead be estimated with a competing-risk method such as Aalen–Johansen, or reconstructed from all relevant cause-specific hazards.
Data preparation matters more than the estimator itself. Times must be measured from a well-defined origin such as diagnosis, treatment start, or account creation, and the event indicator must be for the event of interest and for right censoring; missing times or missing event indicators cannot be silently ignored. Staggered calendar recruitment can simply produce different administrative right-censoring durations when each subject’s clock starts at enrollment. Delayed entry arises when observation begins after the chosen analysis-time origin, such as enrollment at age 60 on an age time scale. Then risk sets must include only subjects who have entered and remain observed, with an appropriate truncation assumption. This basic implementation does not handle delayed entry. The independent-censoring assumption deserves explicit discussion: in a randomized trial, administrative censoring may be roughly independent of prognosis, whereas in an observational study censoring may be informative if patients who worsen transfer care, stop responding, or are lost to follow-up. No automatic diagnostic can prove independence, but examining censoring patterns over time and across covariates, comparing censored and uncensored subjects on baseline characteristics, and performing sensitivity analyses are reasonable steps, with suitable stratification, censoring weights, or other adjustment considered when censoring and failure depend on shared covariates.
Reporting should make the risk-set mechanics visible. Include the number at risk at several follow-up times, the number of observed events, the amount and pattern of censoring, the tie convention, and the method used for confidence intervals, because those counts show how many observations support the tail. When the curve never reaches or falls below , report the median as not reached together with the last follow-up time rather than extrapolating from a flat tail; when the curve reaches zero because , state that Greenwood’s variance is undefined at that point instead of plotting a misleading zero-width interval. Group comparisons based on Kaplan-Meier curves are descriptive, and an ordinary unstratified log-rank test is still unadjusted: if groups differ in baseline covariates, the visual difference may be confounded, so the Cox model is the natural next step. Computationally both estimators are inexpensive. A production implementation sorts the data and processes each event time once, costing time and memory, while the readable implementation in this chapter rescans the sample at each event time; the dominant practical cost is not computation but careful definition of the event, the time origin, the censoring mechanism, and the risk set.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!