This function exclusively returns the Kaplan-Meier survival estimate and the corresponding time points.
It does not provide standard errors or any additional outputs
that are typically included with the survfit() function.
Usage
km(time, status)
Value
A data frame with the Kaplan-Meier survival estimates, containing:
time
Time points at which the survival probability is estimated.
surv
Estimated survival probability at each time point.
Arguments
time
A numeric vector for the observed survival times.
status
A numeric vector for the event indicator;
0 indicates right-censoring and 1 indicates events.