KMPLOT: Stata module to draw Kaplan-Meier survival, cumulative failure and competing-risks cumulative incidence curves with risk tables
Timothy P Copeland ()
Additional contact information
Timothy P Copeland: Karolinska Institutet
Statistical Software Components from Boston College Department of Economics
Abstract:
kmplot draws publication-ready Kaplan-Meier survival and cumulative failure curves from stset data, and Aalen-Johansen cumulative incidence curves when a competing event is given with compete(). Curves can be stratified with by(), drawn with log-log, log or plain confidence intervals as bands or lines, and annotated with median survival lines, censoring marks and a log-rank p-value. An optional number-at-risk table below the plot counts people or sums the stset weight, can show cumulative events, and can mask small cells for disclosure control. Options cover percent scale, truncation of the plot at tmax(), fixed-time (landmark) estimates, custom titles, colors and line patterns, and export of the graph, the plotted curve data and the risk-table counts. The default palette is Okabe-Ito, chosen for readers with color-vision deficiency. Medians, landmark estimates with confidence limits, the risk-table counts and the log-rank p-value are returned in r().
Language: Stata
Requires: Stata version 16
Keywords: Kaplan-Meier; survival curves; cumulative failure; cumulative incidence; Aalen-Johansen; competing risks; number at risk; risk table; log-rank test; graphics (search for similar items in EconPapers)
Date: 2026-10-30
Note: This module should be installed from within Stata by typing "ssc install kmplot". The module is made available under terms of the MIT license (https://opensource.org/licenses/MIT).
References: Add references at CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/k/kmplot.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/k/kmplot.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_kmplot_risktable.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_kmplot_times.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_kmplot_cif.ado program code (text/plain)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s459960
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().