x: Vector with points to evaluate the estimator in.
data: Vector of n observations.
censored: Vector of n logicals indicating if an observation is right censored.
conf.type: Type of confidence interval, see survfit.formula. Default is "plain".
conf.int: Confidence level of the two-sided confidence interval, see survfit.formula. Default is 0.95.
Details
We consider the random right censoring model where one observes Z=min(X,C)
where X is the variable of interest and C is the censoring variable.
This function is merely a wrapper for survfit.formula from survival.
This estimator is only suitable for right censored data. When the data are interval censored, one can use the Turnbull estimator implemented in Turnbull.
Returns
A list with following components: - surv: A vector of length length(x) containing the Kaplan-Meier estimator evaluated in the elements of x.
fit: The output from the call to survfit.formula, an object of class survfit.
References
Kaplan, E. L. and Meier, P. (1958). "Nonparametric Estimation from Incomplete Observations." Journal of the American Statistical Association, 53, 457--481.