Kaplan-Meier survival analysis
Estimates the survival curve from exact event and censoring times, with the median survival time and tests comparing groups.
Menu: Analyze → Survival → Kaplan-Meier…
When should I use it?
- Time to relapse, dropout, failure or customer churn, with some cases still event-free at the end.
What are the assumptions?
- Censoring unrelated to prognosis.
- Comparisons: the log-rank test is most powerful when hazards are proportional; Breslow weights early differences more.
How do I run it in StatLab?
- Choose time, status (event codes) and optionally a factor.
- Keep the overall comparisons ticked to compare factor levels.
- Tick 'Pairwise over strata' to compare every pair of levels, or 'Linear trend' when the factor levels are ordered.
How do I read the output?
| Output | Meaning |
|---|---|
| Survival Table | Estimate and standard error after each event. |
| Means and Medians | Median survival with 95% CI; the mean is restricted to the longest follow-up. |
| Overall Comparisons | Log rank, Breslow and Tarone-Ware tests. |
| Pairwise Comparisons | Chi-square and Sig. for each pair of factor levels (not adjusted for multiple testing). |
| Test of Trend | 1-df test that survival changes steadily across ordered factor levels. |
Worked example
On the clinic follow-up practice dataset, this command — which the dialog's Paste button also produces — runs the procedure:
PROC svKM /time=months /status=relapse /event=1 /factor=treatment /table=NO /compare=YES /pairwise=NO /trend=NO /plot=YES.
Output tables: Case Processing Summary · Means and Medians for Survival Time · Percentiles · Overall Comparisons.
How would I report it in APA style?
Standard: median 10.20 (95% CI 7.26, 13.14); New: median 21.80 (95% CI 13.93, 29.67). A log-rank test showed a difference between the survival curves, χ²(1) = 12.27, p < .001.
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Reporting the mean when the median is available.
- Treating censored cases as events or dropping them.