Bayesian Decision-Making for Clinical Trials

Provides tools for Bayesian decision-making in single-arm phase II clinical trials with binary efficacy endpoints. Uses Beta-binomial models to calculate posterior probabilities that the response rate exceeds a prespecified reference value and to estimate predictive probabilities of meeting final-analysis success criteria. Evaluates the frequentist operating characteristics of two-stage designs with posterior-probability-based stopping rules, including type I error rates, statistical power, and probabilities of early stopping for efficacy or futility, using Monte Carlo simulation. For methodological background, see Thall and Simon (1994) and Lee and Liu (2008) .


BayesianTrial

R-CMD-check

Bayesian decision-making for clinical trials in R.

BayesianTrial provides posterior and predictive probability calculations and simulation-based operating characteristics for single-arm phase II trials with binary efficacy endpoints. The current implementation supports two-stage designs with posterior-probability-based stopping rules.

Installation

Install the package from GitHub using pak:

install.packages("pak")
pak::pak("Jiangyan-Zhao/BayesianTrial")

Current functionality

  • posterior_predictive_singlearm_binary() calculates posterior summaries and predictive probabilities of meeting final posterior success criteria.
  • oc_singlearm_binary() estimates overall trial success, early efficacy stopping, and early futility stopping through Monte Carlo simulation.

Quick start

Consider a hypothetical trial with a historical response rate of 20%, an interim analysis after 20 patients, and a maximum sample size of 40. Nine patients respond at interim. We use the default Beta(0.2, 0.8) prior.

Posterior and predictive probabilities

library(BayesianTrial)

prob <- posterior_predictive_singlearm_binary(
  x_obs = 9, n_current = 20, N_total = 40,
  type = "both"
)

prob$p_null
prob$ppos_null

p_null is the current posterior probability that the response rate exceeds 0.20. ppos_null is the predictive probability of meeting the final success criterion if the planned sample size is completed. The default type = "posterior" returns posterior summaries; use type = "predictive" for predictive probabilities or type = "both" for both.

Operating characteristics

oc <- oc_singlearm_binary(
  theta_true = 0.20, n_current = 20, N_total = 40
)

oc

The overall success probability (power_null_post) estimates the type I error rate when theta_true = 0.20 and statistical power when theta_true = 0.40. Early stopping probabilities are also returned.

For more details, see the single-arm binary endpoint vignette.

Planned extensions

Future versions may extend to other trial designs and endpoint types.

License

GPL (>= 3).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("BayesianTrial")

0.1.0 by Jiangyan Zhao, 4 hours ago


https://github.com/Jiangyan-Zhao/BayesianTrial


Report a bug at https://github.com/Jiangyan-Zhao/BayesianTrial/issues


Browse source code at https://github.com/cran/BayesianTrial


Authors: Jiangyan Zhao [cre, aut] , Rongji Mu [aut, cph]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports stats

Suggests knitr, rmarkdown, testthat


See at CRAN