KM: Kaplan-Meier product-limit estimate of survival

Description Usage Arguments Author(s) References Examples

View source: R/KM.R

Description

This function provides survival estimates using the product-limit Kaplan-Meier estimator.

Usage

1
KM(time, status, t)

Arguments

time

Survival time of the process.

status

Censoring indicator of the survival time of the process; 0 if the survival time is censored and 1 otherwise.

t

The time for obtaining survival estimates.

Author(s)

Gustavo Soutinho and Luis Meira-Machado

References

E. Kaplan and P. Meier. Nonparametric estimation from incomplete observations. Journal of the American Statistical Association, 53:457-481, 1958.

Examples

1
2
3
4
5
6
7
8
require(survival)
data("bladder4state")
obj<- multidf(time1=bladder4state$y1, event1=bladder4state$d1, 
              time=bladder4state$y1+bladder4state$y2,status=bladder4state$d2)
obj2<-obj[[1]]
KM(time = obj2$time, status = obj2$status, t = 20)
fit <- survfit(Surv(obj2$time, obj2$status) ~ 1, data = obj2)
summary(fit, time = 20)$surv

gsoutinho/survrec documentation built on Dec. 20, 2021, 1:46 p.m.