Tools › Statistics › Regression and Modelling › Survival Analysis › Example
Freireich's 6-MP leukaemia trial: Kaplan–Meier curves, the log-rank test and the Cox hazard ratio (R's survfit, survdiff and coxph output reproduced)
| Tool | Survival Analysis |
| Source | Freireich, E. J., and others (1963). "The Effect of 6-Mercaptopurine on the Duration of Steroid-Induced Remissions in Acute Leukemia." Blood, Vol. 21, No. 6, pp. 699–716 (the remission times as distributed in the R package MASS, data set gehan); Venables, W. N., and Ripley, B. D., R package MASS, version 7.3-66, tests/Examples/MASS-Ex.Rout.save (the printed survfit, survreg and coxph reference output); Therneau, T. M. (2025). A Package for Survival Analysis in R, version 3.8-12. |
| Level | Undergraduate |
Problem
Forty-two children with acute leukaemia in remission were paired and randomised to 6-mercaptopurine or placebo; the length of remission in weeks was recorded, 12 of the 21 remissions on 6-MP being still in progress (censored) at the analysis and all 21 on placebo having ended. Estimate the remission curve of each arm with its median, test whether the curves differ, estimate the hazard ratio of placebo to 6-MP with the Cox model, check proportional hazards and fit exponential, Weibull and lognormal distributions to each arm.
Inputs to Enter
- Data Set: Leukaemia remission, 6-MP (42); time column time, status column cens, event code 1, group column treat (levels 6-MP, control)
- Confidence 95 %, log limits, log-rank weights, RMST limit blank (35 weeks, the largest time)
- Cox model: Efron ties, group in the model, Kaplan–Meier time scale for the proportional-hazards test
- Trial planning: hazard ratio 0.5, two-sided α 0.05, power 0.8, allocation 1 : 1, control event probability 0.6
Answers
- Kaplan–Meier: 6-MP S(6) = 0.857, S(10) = 0.753, S(23) = 0.448 (se 0.0764, 0.0963, 0.1346, as R prints); control S(8) = 0.381, S(23) = 0; medians 23 weeks (95 % limits 16 to not reached) and 8 weeks (4 to 12); RMST to 35 weeks 23.29 (se 2.83) and 8.67 (se 1.38)
- Log-rank: observed 9 and 21, expected 19.25 and 10.75, χ² = 16.79 on 1 df, p = 4.17 × 10⁻⁵; Gehan–Breslow 13.46, Tarone–Ware 15.12, Peto–Peto 14.08, G(1, 0) 14.46
- Cox (Efron): β = 1.5721, se 0.4124, z = 3.812, hazard ratio 4.817 (95 % limits 2.147 to 10.81); likelihood ratio 16.35, Wald 14.53, score 17.25; concordance 0.690 (se 0.041), all as R prints; with Breslow ties the hazard ratio is 4.523
- Hazard ratio from the log-rank quantities: (O/E) ratio 4.18, Peto one-step 5.15; proportional-hazards test χ² = 0.023, p = 0.88
- Parametric fits: 6-MP exponential rate 0.02507 per week (log-likelihood −42.17), Weibull shape 1.354 and scale 33.77, lognormal lowest AIC (85.36); control Weibull shape 1.370 and scale 9.48 lowest AIC (133.84); the two exponential log-likelihoods sum to R's −108.5
- Log-rank trial for a hazard ratio of 0.5: 65.3 events (Schoenfeld) or 70.6 (Freedman), 136 or 147 patients at an average event probability of 0.484
Notes
The tool's default inputs are this case; press Submit. R's printed example uses log-log limits for the Kaplan–Meier table (choose Log-log in Limits of S(t) to see 0.620 to 0.952 at week 6); the default here is R's own default, the log scale. Checked by test_survival_analysis.php (18,970 checks), which reproduces the CRAN reference output of the survival and MASS packages on the gehan, aml, ovarian, lung and veteran data sets to the printed digits and an independent numpy / scipy implementation on those and on 20 seeded data sets (References/Survival-Analysis/).