MetaStan: An R package for Bayesian (model-based) meta-analysis using Stan
Abstract: Meta-analysis methods are used to combine evidence from multiple studies. Meta-regression as well as model-based meta-analysis are extensions of standard pairwise meta-analysis in which information about study-level covariates and (arm-level) dosing amount or exposure may be taken into account. A Bayesian approach to inference is very attractive in this context, especially when a meta-analysis is based on few studies only or rare events. In this article, we present the R package MetaStan which implements a wide range of pairwise and model-based meta-analysis models. A generalised linear mixed model (GLMM) framework is used to describe the pairwise meta-analysis, meta-regression and model-based meta-analysis models. Within the GLMM framework, the likelihood and link functions are adapted to reflect the nature of the data. For example, a binomial likelihood with a logit link is used to perform a meta-analysis based on datasets with dichotomous endpoints. Bayesian computations are conducted using Stan via the rstan interface. Stan uses a Hamiltonian Monte Carlo sampler which belongs to the family of Markov chain Monte Carlo methods. Stan implementations are done by using suitable parametrizations to ease computations. The user-friendly R package MetaStan, available on CRAN, supports a wide range of pairwise and model-based meta-analysis models. MetaStan provides fitting functions for pairwise meta-analysis with the option of including covariates and model-based meta-analysis. The supported outcome types are continuous, binary, and count. Forest plots for the pairwise meta-analysis and dose-response plots for the model-based meta-analysis can be obtained from the package. The use of MetaStan is demonstrated through clinical examples.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.