
The goal ofgoldilocks is to implement the GoldilocksBayesian adaptive design proposed by Broglio et al. (2014) fortime-to-event endpoint trials, both one- and two-arm, with an underlyingpiecewise exponential hazard model.
The method can be used for a confirmatory trial to select a trial’ssample size based on accumulating data. During accrual, frequent samplesize selection analyses are made and predictive probabilities are usedto determine whether the current sample size is sufficient or whethercontinuing accrual would be futile. The algorithm explicitly accountsfor complete follow-up of all patients before the primary analysis isconducted. Final analysis tests include the log-rank test, Coxproportional hazards regression Wald test, and a Bayesian test thatcompares the absolute difference in cumulative incidence functions at afixed time point.
Broglio et al. (2014) refer to this as aGoldilocks trialdesign, as it is constantly asking the question, “Is the samplesize too big, too small, or just right?”
Other software and R packages are available to implement thisalgorithm. However, when designing studies it is generally required thatmany thousands of trials are simulated to adequately characterize theoperating characteristics, e.g. type I error and power. Hence, acomputationally efficient and fast algorithm is helpful. Thegoldilocks package takes advantage of many tools to achievethis:
Log-rank tests are implemented via code from thefastlogranktestpackage, which uses a lightweight C++ implementation
Piecewise exponential simulation is implemented via thePWEALLpackage, which uses a lightweight Fortran implementation
Simulation of multiple trials can be performed in parallel usingthepbmcapplypackage
Note: becausefastlogranktest is nolonger available on CRAN, a copy of the C++ code and wrapper have beenincorporated directly into this package.
Broglio KR, Connor JT, Berry SM. Not too big, not too small: aGoldilocks approach to sample size selection.Journal ofBiopharmaceutical Statistics, 2014;24(3):685–705.
You can install the development version ofgoldilocksGitHub with:
# install.packages("devtools")devtools::install_github("graemeleehickey/goldilocks")