Abstract
Many populations or datasets contain structured data where relationships exist between the different variables. Bayesian hierarchical models may provide an appropriate approach for analysing this type of data, particularly if it accumulates over time. Routinely collected healthcare data is one such dataset and is of particular interest to researchers wishing to improve health outcomes for patients, and to drive an approach towards comparative effectiveness research. Here patients may experience multiple related health outcomes over time while receiving different treatments. Hierarchical groupings of related outcomes and the stratification of patients into similar clusters allows balanced comparisons for different treatment types. The R package bhpm implements hierarchical Bayesian Poisson models for clustered data with related outcomes. The methods are suitable for analysing healthcare data but are also applicable to analogous data sets. The package is designed to be self-contained and easy to deploy and use.
