Sep 9, 2012

Kaplan-Meier Estimator in R

Function Name: kmeier (* , *)
Author: Haoying Wang @ 2012
Package: R x64 2.13.0

Background: Kaplan-Meier Estimator is a classical and popular way for estimating the empirical survival function from lifetime data. The Kaplan-Meier estimate is a right continuous step function which takes jumps only at the death/failure/event time. The calculation of the Kaplan-Meier estimate can also be implemented by using PROC Lifetest in SAS. Kaplan and Meier (1958) have shown that the method gives "maximum likelihood estimate".

Function Input (two arguments):
1st: Vector of right-censored observed times for n individuals
2nd: Vector of failure time indicators (0 = censored individual; 1 = uncensored individual)

Function Output (two arguments):
1st: Vector of sorted observed event times, in increasing order;
2nd: Vector of Kaplan-Meier estimates, corresponding to output 1.

Reference: Kaplan, E. L., Meier, P., Nonparametric estimation from incomplete observations. JASA, 53:457–481, 1958.

Code Link: https://sites.google.com/site/halkingwang/programming/r/kaplan-meierestimatorinr
 
Locations of visitors to this page