Kaplan–Meier and Nelson–Aalen Estimation › Visualizing Kaplan–Meier and Nelson–Aalen
Machine Learning from ScratchAll chapters Kaplan–Meier and Nelson–Aalen Estimation › Visualizing Kaplan–Meier and Nelson–AalenSection view · Sections in this chapter7 / 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
The estimates are already computed. We now use plots to expose the mechanism: where the steps occur, how censorings enter, how the product-limit and exponential transforms differ, and how the shrinking risk set limits tail interpretation.
The standard-error plot describes this one simulated cohort. Its shape depends on both the risk set and the falling survival estimate; a rise followed by a decline is not a universal pattern.
VisualizationOut [23]Expand

The blue curve is the Kaplan-Meier estimate. It drops from to at time 2, to at time 3, to at time 6, to at time 8, and to at time 10. The orange curve is . It is close to the blue curve early, but it stays above it. The gap is the finite-sample difference between multiplying by and multiplying by .
The censor marks at times 5, 6, 9, and 12 do not create steps. They remind us that subjects leave after their censoring times and are unavailable for later events. The horizontal line at shows why the median is time 8: the curve is still above at time 6 and below at time 8.
VisualizationOut [24]Expand

The simulated curve tracks the true Weibull survival function reasonably well in the middle of the follow-up range. The Kaplan-Meier curve is a step function, so it cannot follow the smooth curve exactly. The pointwise interval width depends on both the risk set and the survival estimate in this one sample. Its absolute width alone does not describe how much follow-up information remains. The dashed curve again sits slightly above the product-limit curve. Censoring marks appear as follow-up progresses; they do not create steps in the curve, but they remove subjects from later risk sets, and the risk set is smallest at the latest follow-up times where few patients remain.
The band in this figure is pointwise. It does not have 95% simultaneous coverage for the entire curve. Simultaneous coverage requires calibration for the entire specified time interval; the pointwise 95% labels here do not provide it.
VisualizationOut [25]Expand

VisualizationOut [26]Expand

The risk-set curve starts at 240 and falls as events and censorings accumulate. The standard-error curve is not monotone: its path depends on both the risk set and the falling survival estimate. Its last value is undefined and is omitted. One event removes a larger fraction of the remaining estimated survival when ten subjects are at risk than when two hundred are at risk. A flat Kaplan-Meier tail means that no further events were observed; it does not establish a cure fraction or show that the hazard has stopped. Check the number still at risk, because a flat segment can occur with either many or few subjects under observation.
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!