Package: goldilocks 1.0.0

goldilocks: Adaptive Trial Designs for Survival and Binary Endpoints

Implements Goldilocks adaptive trial designs for time-to-event and fixed-time binary endpoints. Outcomes are generated with a piecewise exponential model, with conjugate Gamma priors used for predictive imputation. Final analyses may use log-rank, Cox, or restricted mean survival time tests, Bayesian piecewise-exponential inference, frequentist risk differences, or Bayesian beta-binomial inference. The method closely follows Broglio et al. (2014) <doi:10.1080/10543406.2014.888569> and supports simulation of design operating characteristics.

Authors:Graeme L. Hickey [aut, cre], Ying Wan [aut], Thevaa Chandereng [aut], Becton, Dickinson and Company [cph], Tim Kacprowski [ctb]

goldilocks_1.0.0.tar.gz
goldilocks_1.0.0.zip(r-4.7-x86_64)goldilocks_1.0.0.zip(r-4.7-arm64)goldilocks_1.0.0.zip(r-4.6-x86_64)goldilocks_1.0.0.zip(r-4.6-arm64)goldilocks_1.0.0.zip(r-4.5-x86_64)
goldilocks_1.0.0.tgz(r-4.6-x86_64)goldilocks_1.0.0.tgz(r-4.6-arm64)goldilocks_1.0.0.tgz(r-4.5-x86_64)goldilocks_1.0.0.tgz(r-4.5-arm64)
goldilocks_1.0.0.tar.gz(r-4.7-arm64)goldilocks_1.0.0.tar.gz(r-4.7-x86_64)goldilocks_1.0.0.tar.gz(r-4.6-arm64)goldilocks_1.0.0.tar.gz(r-4.6-x86_64)
goldilocks_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
goldilocks/json (API)

# Install 'goldilocks' in R:
install.packages('goldilocks', repos = c('https://graemeleehickey.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/graemeleehickey/goldilocks/issues

Pkgdown/docs site:https://graemeleehickey.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

adaptivebayesianbayesian-statisticsclinical-trialsstatisticscpp

7.39 score 7 stars 42 scripts 523 downloads 18 exports 22 dependencies

Last updated from:c94a9d68b7. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK164
linux-devel-x86_64OK208
source / vignettesOK291
linux-release-arm64OK169
linux-release-x86_64OK201
macos-release-arm64OK189
macos-release-x86_64OK499
macos-oldrel-arm64OK166
macos-oldrel-x86_64OK564
windows-devel-arm64OK428
windows-devel-x86_64OK230
windows-release-arm64OK429
windows-release-x86_64OK172
windows-oldrel-x86_64OK192
wasm-releaseOK122

Exports:enrollmentevaluate_interimplot_enrollmentplot_sim_decisionsplot_sim_ocsplot_sim_stoppingplot_trial_traceppweprop_to_hazpwe_imputepwe_simrandomizationsim_comp_datasim_trialssummarise_calendar_timesummarise_simssummarise_trial_tracesurvival_adapt

Dependencies:BHclidplyrgenericsgluelatticelifecyclemagrittrMatrixpbmcapplypillarpkgconfigPWEALLR6Rcpprlangsurvivaltibbletidyselectutf8vctrswithr

ADVENT: a published Goldilocks design
Trial overview | Adaptive decision process | Endpoint scale | SAP event-time models and time units | Effectiveness endpoint | Safety endpoint | A reusable design specification | Graphical assessment of the simulated design | A fuller simulation template | SAP sensitivity assumptions and reference benchmarks | References

Last update: 2026-09-08
Started: 2026-07-05

ANTHEM-HFrEF: a published adaptive survival design
Clinical question and planned analysis | Planned design versus operational history | Source and status of every modeled input | Event-time and accrual assumptions | A one-trial goldilocks approximation | Small null and alternative simulation | Differences from the sponsor's design | References

Last update: 2026-09-08
Started: 2026-08-19

Statistical workflow and reproducibility
Overview | From assumptions to operating characteristics | Data-generating assumptions | Interim prediction | Bayesian survival calculation | Completed-data analysis | Summaries for design evaluation | Prespecification and reproducibility | Implementation map

Last update: 2026-09-08
Started: 2026-06-09

ThermoCool AF: immediate success from predictive probability
Trial and endpoint | The reported stopping rules | The four-way goldilocks rule | Source and status of modeled inputs | Mapping the longitudinal analysis model | Published design-generating assumptions | Assumptions versus the reported trial history | One simulated trial | Small operating-characteristic demonstration | Operating-characteristic evaluation | What this example does and does not reproduce | Sources and document roles

Last update: 2026-09-08
Started: 2026-09-04

Two-arm randomized trials
Design assumptions | Final analysis and hypotheses | One-sided tests | Simulation settings | Power and type I error | Calibrating the final threshold | Calendar time and follow-up | Graphical assessment | References

Last update: 2026-09-08
Started: 2026-07-12

Bayesian binary outcome designs
Two-arm design | Choosing the binary imputation approach | Single-arm design | Choosing bin_method | Operating characteristics

Last update: 2026-09-08
Started: 2026-07-05

Frequentist binary outcome designs
Choosing the analysis | Example design | Pending and missing endpoint outcomes | Reference

Last update: 2026-09-08
Started: 2026-09-04

Technical details of the Goldilocks design
Overview | 1. Design and notation | 2. Continuous-time enrollment process | 3. Event-time model | 3.1 Independent dropout and administrative censoring | 4. Posterior distribution of hazards | $$\pi(\boldsymbol{\lambda} \mid \mathcal{D}) | 5. Predictive distribution for incomplete outcomes | $$p(\mathcal{D}^{\mathrm{mis}} \mid \mathcal{D}_{\ell}^{\mathrm{obs}}) | 6. Interim decision rule | 6.1 Predictive probability at the current sample size | $$P_ | 6.2 Predictive probability at the maximum sample size | $$P_ | 7. Final analysis | 7.1 Frequentist final tests | 7.2 Bayesian survival final test | $$\Delta^ | \left[1 - \exp{-H_1^{(b)}(\tau)}\right] | $$\widehat{\Pr}(\Delta < h_0 \mid \mathcal{D}) | 7.3 Bayesian binary final test | 7.4 Loss to follow-up at the final analysis | 8. Operating characteristics | 8.1 Graphical assessment | 9. Threshold selection | 10. Relation to group-sequential designs | 11. Scope and statistical limitations | References

Last update: 2026-09-08
Started: 2026-06-16

Applying predictive decisions to an observed interim data cut
Preparing the data cut | Evaluating the look | Using separate predictive and analysis priors | Using a prespecified RMST endpoint | Reviewing and retaining the audit trail

Last update: 2026-09-08
Started: 2026-08-31

Bayesian piecewise-exponential designs
When piecewise hazards help | Setting up the design | The Bayesian decision rule | What a simulated trial dataset looks like | A single simulated trial | Notes on the piecewise model | Sensitivity to the cut-point specification | See also

Last update: 2026-09-08
Started: 2026-06-10

Single-arm designs with a performance goal
The decision rule | Setting up the design | Operating characteristics | A practical caveat on benchmarks | See also

Last update: 2026-09-08
Started: 2026-06-10

Calibrating prob_ha for type I error control
Design and null scenario | Screening a candidate grid | Plotting the calibration curve | Independent validation | Extending the calibration | Calibrating an RMST design

Last update: 2026-09-08
Started: 2026-09-05

Inspecting adaptive decision paths
Reviewing one trial's interim history | Visualizing the enrollment plan | Plotting the interim decision path | Summarizing many simulated trials

Last update: 2026-09-08
Started: 2026-07-10

Restricted mean survival time designs
Effect and hypothesis | A trial with a delayed treatment effect | Prediction and loss to follow-up | Evaluate the design | References

Last update: 2026-09-08
Started: 2026-09-08