library(tibble)
library(dplyr)
#library(gsDesign2)
devtools::load_all()

Introduction of eAccrual()

Use cases of eAccrual()

Example 1

For the enrollment in the first 3 months, it is exactly $3 \times 5 = 15$.

eAccrual(x = 3,
         enrollRates = tibble(duration = c(3, 3, 18), rate = c(5, 10, 20)))

Example 2

For the enrollment in the first 6 months, it is exactly $3 \times 5 + 3 \times 10 = 45$.

eAccrual(x = 6, 
         enrollRates = tibble(duration = c(3, 3, 18), rate = c(5, 10, 20)))

Example 3

For the enrollment in the first 24 months, it is exactly $3 \times 5 + 3 \times 10 + 18 * 20 = 405$.

eAccrual(x = 24, 
         enrollRates = tibble(duration = c(3, 3, 18), rate = c(5, 10, 20)))

Example 4

For the enrollment after 24 months, it is the same as that from the 24 months, since the enrollment is stopped.

eAccrual(x = 25, 
         enrollRates = tibble(duration = c(3, 3, 18), rate = c(5, 10, 20)))

Example 5

Instead of compute the enrolled subjects one time point by one time point, we can also compute it once.

eAccrual(x = c(3, 6, 24, 25), 
         enrollRates = tibble(duration = c(3, 3, 18), rate = c(5, 10, 20)))

Inner Logic of eAccrual()

TODO



keaven/gsDesign2 documentation built on Oct. 13, 2022, 8:42 p.m.