Learn R Programming

pseudoCure (version 1.0.0)

km: 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)

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.

Examples

Run this code
data(Teeth500)
km(Teeth500$time, Teeth500$event)

Run the code above in your browser using DataLab