Skip to main content English


A SAS macro for visualizing the quantile survival time difference curve

The difference between the p-th quantiles of two survival functions can be used to compare patients' survival between two therapies. Setting p=0.5 yields the median survival time difference. Varying p between zero and one defines the quantile survival time difference curve which can be straightforwardly estimated by the horizontal differences between two Kaplan-Meier curves. The estimate's variability can be visualized by adding either a bundle of resampled bootstrap step functions or, alternatively, approximate bootstrap confidence bands. The user-friendly SAS software macro kmdiff enables the straightforward application of this exploratory graphical approach.


Heinzl, H & Mittlboeck, M (2018): "Visualizing the quantile survival time difference curve" Journal of Evaluation in Clinical Practice 24:708-712. doi:10.1111/jep.12948


These macros are provided at the github repository: