lbfit.nonpar: Fits length bias corrected survival curve, using...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/lbiassurv.R

Description

This function implements length-bias correction to the nonparametricestimator.

Usage

1
2
3
4
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, 0 if censored, 1 for event.

boot

logical, for calculating bootstrap confidence bounds. By default is FALSE.

boot.control

Bootstrap control parameters, as a list. See 'Details'.

fit.control

Nonparametric fit control parameters, as a list. See 'Details'.

Details

If boot=TRUE, the survival function is reported with two additional functions, one for lower bound, and another for the upper bound. While boot=FALSE, no standard error and no confidence bounds are produced. The boot.control items and fit.control items can be changed, if is necessary. The quantile gives the quantile-based confidence bounds, and by default is TRUE. If quantile=FALSE a normal confidence bound is produced. The use.median replaces the mean with median as the center of the confidence bounds, when quantile=FALSE. The confidence.level is the level of confidence for one bootstrap interval. The iter is the number of iterations for computing the bootstrap confidence bounds. The tol is the convergence tolerance.

Value

par

A matrix, indicates survival estimate for each observed time parameter.

survfun

The survival function as a step function.

iterations

An integer value giving the number of calls.

conv

A logical value, it is TRUE if the function converges, and if not, the value is FALSE.

method

Equals nonpar. This value will be used in constructing a proper survival function plot.

lowerfun

A step function for the lower bound of confidence interval for the nonparametric estimator.

upperfun

A step function for the upper bound of confidence interval for the nonparametric estimator.

attr

The class of the object.

Note

Bootstrapping is required if confidence bounds are needed.

Author(s)

Pierre-Jerome Bergeron and Vahid Partovi Nia.

References

Vardi, Y. (1989). Multiplicative censoring, renewal processes, deconvolution and decreasing density: Nonparametric estimation. Biometrika, 76 (4), 751–761.

See Also

lbfit.par, lbsample

Examples

1
2
3
4
5
6
7
8
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")

Example output

Loading required package: actuar

Attaching package: 'actuar'

The following object is masked from 'package:grDevices':

    cm

Warning message:
In lbfit.nonpar(time = mydata$time, censor = mydata$censor) :
  The boot option is FALSE, no confidence bounds are produced
bootstrapping...

lbiassurv documentation built on May 2, 2019, 4:50 p.m.