bootstrapTimeToEvent {eventTrack}R Documentation

Bootstrap the predicted time when a given number of events is reached, for hybrid Exponential model

Description

Bootstrap the predicted time when a given number of events is reached, based on the hybrid Exponential model.

Usage

bootstrapTimeToEvent(time, event, interim.gates, future.units, n, M0 = 1000, 
                            K0 = 5, alpha = 0.05, accrual, seed = 2014)

Arguments

time

Event times.

event

Censoring indicator, 0 = censored, 1 = event.

interim.gates

Number of events for which confidence intervals should be computed. May be a vector.

future.units

Number of months for which predictions are to be made.

n

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

M0

Number of bootstrap samples to be drawn.

K0

Number of changepoints for the piecewise constant hazard.

alpha

Familywise error rate for the sequential test.

accrual

Vector of dates when future patients enter the study. As for the specification, assume 50 pts are to be recruited in Dec 2013 and 20pts in Jan 2014, then use accrual <- c(rep(as.Date("2013-12-01"), 50), rep(as.Date("2014-01-01"), 20)). Leave as NULL if accrual for the study is completed.

seed

Seed for generation of bootstrap samples.

Value

A list containing the following objects:

pe.MLEs

Piecewise Exponential MLE object for each bootstrap sample, output of function piecewiseExp_MLE.

pe.tabs

Result of sequential test for each bootstrap sample, output of function piecewiseExp_test_changepoint.

changepoints

For each bootstrap sample, changepoint as resulting from sequential test.

estS

Estimated survival function for each bootstrap sample.

event.dates

Event dates for each bootstrap sample, where columns relate to the number of events in interim.gates.

Author(s)

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

References

Rufibach, K. (2016). Event projection: quantify uncertainty and manage expectations of broader teams. Slides for talk given in Basel Biometric Section Seminar on 28th April 2016. https://baselbiometrics.github.io/home/docs/talks/20160428/1_Rufibach.pdf.

Examples


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

# --------------------------------------------------
# run bootstrap, for M0 = 3 only, for illustration
# tune parameters for your own example
# --------------------------------------------------
boot1 <- bootstrapTimeToEvent(time, event, 
          interim.gates = c(330, 350), future.units = 50, n = length(time), 
          M0 = 3, K0 = 5, alpha = 0.05, accrual = accrual_after_ccod, 
          seed = 2014)

# median of bootstrap samples:
apply(boot1$event.dates, 2, median)

## End(Not run)

[Package eventTrack version 1.0.3 Index]