From the Help Desk: Kaplan–Meier Plots with Stsatrisk
Jean Marie Linhart, Jeffrey S. Pitblado, James E. Hassell · The Stata Journal Promoting communications on statistics and Stata · 2004
Stsatrisk is a wrapper for sts graph that adds a table to a survival plot with at-risk information, making it easy to create graphs that follow the list of recommendations given by Pocock et al. (2002) for Kaplan–Meier plots. We use stsatrisk to create plots in the desired format with the desired information.