🤖 AI Summary
In Bayesian regression, the absence of unified software support for prior modeling using historical data hinders methodological comparability across approaches. Method: We developed the R package *hdbayes*, implemented in Stan, to support multiple historical-data–driven priors—including power prior (POWER), meta-analytic predictive (MAP), and hierarchical Bayesian (HB) methods—within a standardized modeling interface and a unified MCMC inference framework. It enables flexible prior specification and cross-method comparison for generalized linear models. Contribution/Results: *hdbayes* substantially lowers the technical barrier to implementing Bayesian historical priors, enhances analytical reproducibility and methodological comparability, and improves empirical efficiency in evidence synthesis and regulatory science. By facilitating robust, transparent, and standardized Bayesian practice, the package advances principled integration of external evidence in statistical modeling and decision-making contexts.
📝 Abstract
There has been increased interest in the use of historical data to formulate informative priors in regression models. While many such priors for incorporating historical data have been proposed, adoption is limited due to access to software. Where software does exist, the implementations between different methods could be vastly different, making comparisons between methods difficult. In this paper, we introduce the R package hdbayes, an implementation of the power prior, normalized power prior, Bayesian hierarchical model, robust meta-analytic prior, commensurate prior, and latent exchangeability prior for generalized linear models. The bulk of the package is written in the Stan programming language, with user-friendly R wrapper functions to call samplers.