Thanks yet again to Kit Baum, a new version of the kmest package (superseding last week's versions) is now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have an old version of kmest.

The kmest package is described as below on my website. The new version adds a new returned scalar result e(N_fail) containing the total number of failures in the estimation sample, and a new returned matrix result e(cumfail), a row vector with 1 column for each of the input list of times, containing the cumulative number of failures at or before each time. These returned results are re-returned by the bootstrap prefix, and can be stored in an output dataset (or resultsset) using the SSC package parmest.

Best wishes

Roger

-------------------------------------------------------------------------------------------------
package kmest from http://www.rogernewsonresources.org.uk/stata16
-------------------------------------------------------------------------------------------------

TITLE
kmest: Compute Kaplan-Meier survival probabilities and/or percentiles as estimation results

DESCRIPTION/AUTHOR(S)
kmest is intended for use in a survival time dataset set up by stset.
It computes Kaplan-Meier survival probabilities (as computed by sts
generate) for a list of times (sorted in ascending order), and/or
Kaplan-meier percentiles for a list of percents (srted in ascending
order), and saves them as estimation results, without a variance
matrix. kmest is intended for use with the bootstrap prefix, or
possibly with the jackknife prefix, to create confidence intervals for
the Kaplan-Meier survival probabilities and/or percentiles, possibly
allowing for clustering and/or sampling-probability weighting.

Author: Roger Newson
Distribution-Date: 11march2020
Stata-Version: 16

INSTALLATION FILES (click here to install)
kmest.ado
kmest_p.ado
kmest.sthlp
-------------------------------------------------------------------------------------------------
(click here to return to the previous screen)