Introduction
The Gaussian random-effects model is the default meta-analysis model in bayesma. It assumes that the true effects across studies are exchangeable draws from a normal distribution, with between-study variability governed by a heterogeneity parameter . This is the correct starting point when there is no strong reason to assume that every study estimates an identical effect.
The common-effect model (all studies share one ) is a limiting case at . See Common-Effect Model for when it is preferable.
Model specification
Let be the effect estimate and the known standard error from study . The two-level hierarchy is:
Likelihood:
Random-effects distribution:
Marginalising over the study-specific effects gives the integrated likelihood used for inference:
Studies with smaller still receive more weight, but the weight differential narrows as grows.
Priors
bayesma defaults:
The Half-Cauchy(0, 0.5) prior on is weakly informative: it assigns most prior mass to small heterogeneity while keeping moderate-to-large values within the plausible range. For effect sizes on standardised scales (log-OR, SMD), heterogeneity above is already very large.
Priors can be overridden via the prior_mu and prior_tau arguments:
#| eval: false
fit <- bayesma(
data,
prior_mu = normal(0, 0.5),
prior_tau = half_normal(0, 0.5)
)See Prior Predictive Checks and Sensitivity Analysis for guidance.
Fitting the model
The summary() output reports the posterior median and 95% credible interval for , , and , along with convergence diagnostics.
Key estimands
Overall effect
The posterior for quantifies the mean of the distribution of true effects. This is the best estimate of what a new, exchangeable study would find on average.
Between-study heterogeneity
is the standard deviation of the true-effect distribution. Larger means more variation in true effects across studies. The posterior for should be examined directly — if it has substantial mass near zero, the data are consistent with negligible heterogeneity.
bayesma reports the posterior distribution of , defined as:
where is the typical within-study variance. is a relative measure: the proportion of total observed variance attributable to between-study heterogeneity. It depends on both and the precision of the primary studies, so it should be interpreted alongside rather than in isolation.
Prediction interval
The 95% prediction interval for a new study’s true effect is
This is wider than the credible interval for and is reported by summary() when prediction_interval = TRUE.
Assumptions
The Gaussian random-effects model assumes:
- Exchangeability: the true effects are drawn from the same distribution. This requires that the studies are sufficiently similar in population, intervention, comparator, and outcome to justify pooling.
- Normal random-effects distribution: the distribution of true effects is symmetric. When this is implausible — for example, when outlier studies are suspected — consider Alternative RE Distributions or RE Mixture Models.
- Known within-study variances: is treated as fixed at the estimated value. This approximation deteriorates for very small studies.
Heterogeneity assessment
#| eval: false
bayesma_output(fit_re, type = "heterogeneity")This produces a table of , , and with posterior intervals. For a visual assessment see Funnel Plots and Posterior Predictive Checks.
Choosing between common-effect and random-effects
The random-effects model is the appropriate default for most meta-analyses. Reserve the common-effect model for planned sensitivity analyses, when exchangeability is genuinely implausible to question (e.g., replications of the same study by the same team), or when the number of studies is very small and cannot be estimated reliably.
Bayesian model comparison via compare_models() provides formal evidence for or against heterogeneity:
#| eval: false
fit_ce <- bayesma(data, model = "common_effect")
compare_models(fit_ce, fit_re, labels = c("Common-effect", "Random-effects"))