| bayprior | R Documentation |
A toolkit for constructing, validating, and justifying Bayesian priors in clinical trial settings. Implements SHELF-style expert elicitation (quantile matching, roulette method, moment matching) across six distribution families, linear and logarithmic expert pooling with compatibility validation, prior-data conflict diagnostics (Box p-value, surprise index, KL divergence, Bhattacharyya overlap, Mahalanobis check) for binary, continuous, Poisson/count, and survival data types, sensitivity analyses with tornado and influence plots, sceptical/robust/power priors, and automated HTML/PDF/Word regulatory reports informed by FDA and EMA guidance on Bayesian methods. Includes a fully modular Shiny application with automatic output reset on input change.
Elicitation – elicit_beta,
elicit_normal, elicit_gamma,
elicit_lognormal, elicit_exponential,
elicit_weibull, elicit_roulette,
elicit_mixture
Expert pooling – aggregate_experts
Conflict diagnostics – prior_conflict,
conflict_mahalanobis
Sensitivity analysis – sensitivity_grid,
sensitivity_cri
Robust priors – sceptical_prior,
robust_prior, calibrate_power_prior
Reporting – prior_report
Shiny app – run_app
betaResponse rates and proportions – support (0, 1)
normalMean differences and log odds ratios – support (-Inf, Inf)
gammaEvent rates and median survival – support (0, Inf)
lognormalHazard ratios and PK parameters – support (0, Inf)
exponentialConstant hazard rates and Poisson rate priors – support (0, Inf). Conjugate with Poisson and survival data via Gamma-Poisson/Exponential updating.
weibullNon-constant hazard survival times (OS, PFS) – support (0, Inf). Posterior approximated via Normal matching.
"binary"Events / sample size (x, n). Conjugate: Beta-Binomial.
"continuous"Observed mean, SD, sample size (x, sd, n). Conjugate: Normal-Normal.
"poisson"Event count / exposure person-time (x, n). Conjugate: Gamma-Poisson.
"survival"Events / total follow-up time (x, n). Conjugate: Gamma-Exponential.
O'Hagan et al. (2006). Uncertain Judgements. Wiley.
Box (1980). JRSS-A, 143, 383–430.
Schmidli et al. (2014). Biometrics, 70, 1023–1032.
Ibrahim & Chen (2000). Statistical Science, 15, 46–60.
Spiegelhalter et al. (1994). JRSS-A, 157, 357–416.
FDA (2026). Use of Bayesian Methodology in Clinical Trials of Drug and Biological Products.
Maintainer: Ndoh Penn ndohpenn9@gmail.com
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.