bootSurvivalSample {eventTrack}R Documentation

Bootstrap survival data

Description

Generate bootstrap samples from a survival object, for right-censored data. See Efron (1981) and Akritas (1986) for details.

Usage

bootSurvivalSample(surv.obj, n, M = 1000)

Arguments

surv.obj

Surv object containing survival times and censoring indicator.

n

Size of the bootstrap samples to be drawn from surv.obj.

M

Number of bootstrap samples to be drawn.

Value

Matrix with bootstrap samples as columns.

Author(s)

Kaspar Rufibach (maintainer)
kaspar.rufibach@roche.com

References

Akritas, M.G. (1986). Bootstrapping the Kaplan-Meier Estimator. JASA, 81, 1032-1038

Efron, B. (1981). Censored Data and the Bootstrap. JASA, 76, 312-319.

Examples

# --------------------------------------------------
# simulate data for illustration
# --------------------------------------------------
set.seed(2021)
n <- 600
time <- rexp(n, rate = log(2) / 20)
event <- sample(round(runif(n, 0, 1)))

# --------------------------------------------------
# draw 20 bootstrap samples of size 10
# --------------------------------------------------
bootSurvivalSample(surv.obj = Surv(time, event), n = 10, M = 20)

[Package eventTrack version 1.0.3 Index]