Kaplan–Meier survival analysis
Survival analysis · Method and input reference
One participant per row: nonnegative follow-up time, event indicator (1 = event, 0 = right censored), and group (text category or integer code from saved Data). Use one common time origin and unit. Up to 1,000 participants and eight groups. Kaplan–Meier estimates assume independent right censoring. Pointwise 95% log-log intervals use Greenwood standard errors. All participants enter at time zero; delayed entry, competing risks, and repeated events are not supported. Curves compare groups descriptively; no treatment-effect or significance claim is implied. Synthetic example: 240 people in two arms: months, event (1) / censored (0), group (1/2). Follow-up and event times vary.
Open calculator · Compare methods in the decision matrix
When to consider it
- Estimate survival curves with right censoring.
Assumptions and scope
- Observations must be independent between subjects; repeated rows from one subject are not independent samples.
- Use the outcome and predictor coding required by the calculator; review missing data and model diagnostics.
Required inputs
- Time, event (1) or censored (0), group (category or numeric code) — Numeric observations; preserve the row and column structure described above.
- Time unit — Choose Days, Weeks, Months, Years.
Review missing values and data coding before running. Sample inputs are synthetic teaching examples.
Implementation
SurvfuncRight estimates survival and Greenwood standard errors. LifeScio derives pointwise log-log 95% confidence intervals and risk counts. Right censoring only; entry at zero.
- statsmodels 0.14.4: statsmodels.duration.survfunc.SurvfuncRight
- numpy 2.2.6: numpy.unique, numpy.searchsorted
These are pinned library versions; saved results record the versions actually used at runtime.