When to use it
You have time-to-event ('survival') data, where each subject has a follow-up time and a flag for whether the event happened (1) or they were censored (0), and you want to estimate and compare survival over time.
When not to: You need to adjust for continuous or multiple covariates while estimating the effect on survival (use Cox proportional-hazards regression instead), or the survival curves being compared clearly cross, which erodes the log-rank test's power even though it remains valid under the null hypothesis.
Step by step
Open it from the menu
Click Reliability & Survival in the menu bar; under Survival choose Kaplan-Meier Survival Curve.
Fill in the form
Choose the columns: Time to event, Event happened? (1 = yes, 0 = censored), Compare curves by (optional). The form lists only columns whose type fits each field.
Check the options
The options start at their defaults: Alpha, Show CI band, Censoring ticks. Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| Time to event Time Var required | One numeric column. Follow-up / time-to-event (numeric, non-negative) |
|---|---|
| Event happened? (1 = yes, 0 = censored) Event Var required | One categorical or numeric column. Event indicator: 1 = event occurred, 0 = censored |
| Compare curves by (optional) Group Var | One categorical column. Optional grouping factor for stratified curves + log-rank |
| Alpha | Significance threshold for the log-rank test Default: 0.05. |
| Show CI band | Shade the 95% Greenwood (log-log) confidence band Default: on. |
| Censoring ticks | Mark censored observations with tick symbols Default: on. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
What it assumes
- Independence of observations
If it does not hold: Kaplan-Meier and the log-rank test assume each subject's event/censoring time is independent of every other subject's; clustered data (e.g. multiple body sites per patient) understate the true variability of the curve and the test.
How to check: Not checked by KernelStats: assumed from the study design; stated directly as a standing 'Independent survival times' reminder.
- Proportional hazards
If it does not hold: If the hazard ratio between groups changes over follow-up time (crosses over, or grows/shrinks), a single log-rank test result summarizes a comparison whose direction or magnitude is not constant over time, and can be a weak or misleading summary of what is actually happening.
How to check: A Schoenfeld-residual-style proportional-hazards test (matching R's cox.zph convention), reported directly on the card when more than one group is compared; explicitly reported as 'NOT ASSESSED' rather than a false pass when the diagnostic could not run.
A worked example
Comparing survival between a new treatment and standard-of-care groups in a clinical trial with 35% overall censoring.
Result: Median survival: 18.4 months (treatment) versus 11.2 months (standard care); log-rank chi-square = 6.8, df = 1, p = .009. Grambsch-Therneau proportional-hazards check: p = .34 (no evidence of a drifting hazard ratio).
The treatment group shows meaningfully longer median survival, and the significant log-rank test supports a real difference between the curves; the non-significant proportional-hazards check supports treating the log-rank test's assumption as reasonably satisfied here, though that check has limited power to detect a real violation with this event count.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- Do patients on the new treatment survive longer than those on the standard of care?
- Explain the Kaplan-Meier survival curve in plain words.
- What does proportional hazards mean?
Last reviewed November 16, 2026.
