Implementation of the Bayesian Discount Prior Approach for Clinical Trials

Functions for data augmentation using the Bayesian discount prior method for single arm and two-arm clinical trials, as described in Haddad et al. (2017) . The discount power prior methodology was developed in collaboration with the The Medical Device Innovation Consortium (MDIC) Computer Modeling & Simulation Working Group.

bayesDP Logo

Tools for the Bayesian Discount Prior Function

Shiny app available at:

Travis-CI BuildStatus IssueCount Downloads Project Status: Active ? The project has reached a stable, usablestate and is being activelydeveloped.

contributionswelcome License CRAN


Functions for data augmentation using the Bayesian discount prior function for 1 arm and 2 arm clinical trials.

CRAN Installation

Install release version from CRAN:


GitHub Installation

Install development version from GitHub:



See manuals and vignettes within package.


See manuals and vignettes within package.


Shawn Balcome, Donnie Musgrove, Tarek Haddad and Christopher Jackson (For the ppexp R code that was ported to C++.)


GPL (>= 3)


bayesDP 1.3.2

Bug fixes and minor improvements

  • Minor bdplm vignette typo fixes

bayesDP 1.3.1

Major new features

  • Changes to inputs for bdpsurvival
    • Current and (optional) historical data are specified in separate data frames
  • Updated normal approximation used for method="mc" of the bdpbinomial and bdpnormal functions

Bug fixes and minor improvements

  • Summary method for bdplm now exists and mimics lm
  • Removed bdpbinomial vignette language around success (vs event)
  • Reported one-arm sample size for bdpsurvival print method adjusted to current data only

bayesDP 1.3.0

Major new features

  • Addition of the bdplm function for two-arm trials
  • Users can now choose between 3 discount functions via the discount_function input:
    • Weibull CDF
    • Scaled Weibull CDF - scales the Weibull CDF so that the max possible value is 1
    • Identity - sets the discount weight to the posterior probability
  • Removal of bdpregression

Bug fixes and minor improvements

  • Removed two-sided and one-sided function inputs to avoid confusion
  • Posterior probabilities for method="mc" switched from pshisq to pnorm
  • Updated vignettes to reflect new features

bayesDP 1.2.0

Major new features

  • Supports one-arm regression analysis
  • Two additional modular functions
  • Implementation of Monte Carlo-based estimation of alpha discount

Bug fixes and minor improvements

  • Fixes to class slots
  • Added print input to plot method

bayesDP 1.1.0

Major new features

  • Supports two-arm survival analysis via hazard rate comparisons
  • Completely revamped summary and print methods to produce better formatted results
  • Plot method allows users to specify a type
  • Added vignettes for each of bdpbinomial, bdpnormal, and bdpsurvival
  • Implemented the fix_alpha input which allows users to set the historical data weight at alpha_max

Bug fixes and minor improvements

  • Fixed error with two-arm analysis where models did not fit if either the current or historical control data were not input
  • Changed two_side input to logical
  • Consolidated several internal functions into a single function for computational efficiency gains

bayesDP 1.0.3

  • README update
  • Added plot types
  • Added Vignettes
  • Added logo
  • Improved documentation
  • Updated print, summary, plot methods
  • Refactored bdpnormal/bdpbinomial

bayesDP 1.0.2

  • Crucial bugfixes

bayesDP 1.0.1

  • User requested bugfixes

bayesDP 1.0.0

  • Initial CRAN release with normal, binomial and survival functions.

Reference manual

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


1.3.5 by Graeme L. Hickey, 2 months ago

Report a bug at

Browse source code at

Authors: Shawn Balcome [aut] , Donnie Musgrove [aut] , Tarek Haddad [aut] , Graeme L. Hickey [cre, aut] , Christopher Jackson [ctb] (For the ppexp R code that was ported to C++.)

Documentation:   PDF Manual  

GPL-3 | file LICENSE license

Imports MCMCpack, Rcpp

Depends on ggplot2, methods, survival

Suggests covr, knitr, rmarkdown, testthat

Linking to Rcpp, RcppArmadillo

Imported by bayesCT.

See at CRAN