Learn R Programming

eventTrack (version 1.0.4)

predictEventsUncond: compute expected number of events based on a fixed survival function and with no recruited patients yet

Description

Based on a specified survival function and future accrual, compute for each month in the future the number of expected events reached by then, based on a fixed pre-specified survival function.

Usage

predictEventsUncond(St, accrual, future.units = 50)

Value

A data.frame with the months and corresponding expected events.

Arguments

St

Function that specifies the survival function to be used.

accrual

NULL if trial is fully accrued. For potential future accural, see the example below how to specify it.

future.units

Number of future months to compute prediction for.

Author

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

Examples

Run this code

# compute date when 380 events are reached:
nevent <- 380
n <- 800
accrual.month <- 50
accrual <- rep(seq(1, 16), each = accrual.month)
rate <- log(2) / 12

St1 <- function(t0){
      res <- 1 - pexp(t0, rate = rate)
      return(res)
}
pred1 <- predictEventsUncond(St = St1, accrual, future.units = 25)
pred1
exactDatesFromMonths(predicted = pred1, nevent)

Run the code above in your browser using DataLab