km {pseudoCure} | R Documentation |
Kaplan-Meier estimate
Description
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)
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. |
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. |
Examples
data(Teeth500)
km(Teeth500$time, Teeth500$event)
[Package pseudoCure version 1.0.0 Index]