Learn R Programming

lbiassurv (version 1.1)

lbfit.nonpar: Fits a Vardi corrected survival curve, a nonparametric survival cuve estimation.

Description

An extended version of the Kaplan-Miere estimator.

Usage

lbfit.nonpar(time, censor, boot = FALSE, boot.control = list(quantile = TRUE, use.median = FALSE, confidence.level = 0.95, iter = 1000), fit.control = list(iter = 500, tol = 1e-06))

Arguments

time
The observed time as a vector.
censor
The survival indicator, 1 if censored, 0 otherwise.
boot
logical, for calculating bootstrap confidence bounds.
boot.control
Bootstrap control parameters, as a list.
fit.control
Nonparametric fit control parameters.

Value

The result of the function is an lbsurvfit object, including step functions for the nonparametric survival curve fit and its bootstrap confidence bounds.

Details

A detailed description, or refer the reader to a work.

References

Vardi Paper

See Also

lbfit.par, lbsample

Examples

Run this code
mydata=lbsample(20,family="exponential",par=list(rate=1))
noboot=lbfit.nonpar(time=mydata$time,censor=mydata$censor)
plot(noboot$survfun)
withboot=lbfit.nonpar(time=mydata$time,censor=mydata$censor,boot=TRUE)
x=seq(0,max(mydata$time)+1,length=500)
plot(x,withboot$survfun(x),type="l",col="blue",ylim=c(0,1))
points(x,withboot$lowerfun(x),type="l",col="red")
points(x,withboot$upperfun(x),type="l",col="red")

Run the code above in your browser using DataLab