- Introduced by
- Hoeting, Madigan, Raftery, Volinsky (BMA foundation); multilevel extension developed across the late 1990s–2000s
- Year
- 1999–2000s
- Type
- Bayesian ensemble / model selection
- Family
- Bayesian / computational
What does it do?
Multilevel Bayesian model averaging (ML-BMA) extends Bayesian model averaging to grouped or hierarchically structured data.
Instead of committing to one multilevel specification, it forms a weighted average of predictions and parameter estimates across a set of candidate multilevel models, with each model weighted by its posterior probability given the data. The resulting inference carries uncertainty about the model structure, including which predictors and random effects are included, alongside parameter uncertainty within each model.
The intuition behind the method
Selecting a single multilevel model and reporting its estimates ignores the fact that other specifications, differing in random intercepts, random slopes or fixed-effect predictors, may fit the data nearly as well. In hierarchical data this choice can change conclusions about group-level effects. ML-BMA treats the choice of model as one more quantity to be averaged over. Each candidate receives a weight based on how well it explains the observed data, as expressed by its marginal likelihood, so the averaged estimate shows how much the conclusions depend on which specification is chosen.
History
Hoeting, Madigan, Raftery and Volinsky (1999) published a widely cited tutorial on Bayesian model averaging in Statistical Science, which sets out the general framework that multilevel BMA builds on. Multilevel BMA applies the same weighting logic to models with random effects and group-level structure. Practical use has become more feasible as tools for marginal-likelihood estimation, notably bridge sampling, have become available.
When to use it
Choose ML-BMA when the data have a clear grouped or hierarchical structure and there is genuine doubt about the multilevel specification, for instance about which predictors belong at the student or school level, or whether random slopes are needed. It is most informative when several specifications fit the data comparably, so that a single selected model would hide meaningful disagreement. Do not use it when the candidate space is so large that marginal likelihoods cannot be estimated reliably, when one multilevel specification is strongly justified on substantive grounds, or when computing budgets do not allow repeated marginal-likelihood estimation. In those cases a single well-specified multilevel model with a sensitivity analysis may be more transparent.
Limitations and considerations
- Marginal likelihoods are sensitive to the priors on within-model parameters. Very diffuse priors can favour simpler models (the Lindley-Bartlett paradox), so the weights partly reflect prior choices.
- The candidate set must be enumerated or searched. As predictors and random-effect options multiply, exhaustive comparison becomes infeasible, and stochastic search such as MC3 or reversible-jump MCMC is needed, whose output also has to be checked.
- The average can only represent the models included. If the true specification lies outside the candidate set, the weights concentrate on the closest alternatives without signalling the omission.
- Results are harder to communicate than a single coefficient table and need to be accompanied by the model-level weights and estimates.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Propagates uncertainty about the grouping structure and random-effects specification into the final estimates, so conclusions are not conditioned on one arbitrarily chosen model.
- Handles selection among random-intercept and random-slope structures within the same probabilistic framework used for the rest of the analysis.
- Posterior model probabilities give a direct, interpretable measure of how strongly the data favour each specification.
- When candidate models disagree, the averaged predictions make that disagreement visible rather than hiding it behind one fitted model.
- Model-level quantities can be obtained from standard hierarchical fits by applying bridge sampling to their MCMC output.
Applications
- Educational research with students nested in schools, where candidate models differ in which school-level predictors and random slopes are included, so that the averaged school-effect estimates reflect that choice.
- Epidemiological analyses in which candidate multilevel models vary between neighbourhood-level and individual-level risk factors, with the weights indicating which level the data support.
- Hierarchical ecological models in which candidate specifications differ in the random effects used for sites or observers.
- Multi-centre clinical trials in which centres are random effects and the covariate adjustment set is uncertain.
- Longitudinal growth-curve analysis in which candidate models differ in their random-slope specification.
How it works
How it works
Specify a set of candidate multilevel models. The candidates typically differ in which fixed-effect predictors are included, which random effects are specified (for example random intercepts or random slopes), or how the grouping structure is represented. The set may be built systematically or from substantive knowledge of the design, and its coverage limits what the average can represent.
Assign a prior probability to each candidate. A uniform prior over the set is common, while informative priors can express beliefs about model complexity. Priors on the parameters within each model are specified separately, following standard hierarchical Bayesian practice. Their choice matters in the next step, because marginal likelihoods are sensitive to diffuse priors.
Formula
p(M_k)
For each candidate, evaluate the marginal likelihood: the probability of the observed data averaged over that model's parameters with respect to their prior. Because this integral is rarely available in closed form, it is usually approximated, for example by bridge sampling applied to MCMC output or by a Laplace approximation. The BIC is only a crude approximation to it. This quantity is the weighting criterion in the formula above. Predictive criteria such as WAIC estimate out-of-sample accuracy and are not substitutes for it.
Formula
p(y \mid M_k) = \int p(y \mid \theta_k, M_k)\, p(\theta_k \mid M_k)\, d\theta_k
Combine each marginal likelihood with its prior model probability using Bayes' rule to obtain posterior model probabilities. These sum to one across the candidate set and express the relative support for each specification after the data are observed.
Formula
p(M_k \mid y) \propto p(y \mid M_k)\, p(M_k)
Compute the quantity of interest, denoted Δ, which may be a predicted value, a regression coefficient or a hypothesis probability, under each candidate, and average the results using the posterior model probabilities. The averaged distribution p(Δ | y) combines within-model parameter uncertainty with uncertainty about which model is correct.
Formula
p(\Delta \mid y) = \sum_k p(\Delta \mid M_k, y)\, p(M_k \mid y)
Common pitfalls
- Using vague priors on within-model parameters, which can distort marginal likelihoods and produce a spurious preference for simpler models (Lindley-Bartlett paradox).
- Reading posterior model probabilities as absolute measures of fit. The weights are relative to the candidates considered, so the top-weighted model may still fit poorly in absolute terms.
- Treating a hand-picked candidate set as exhaustive. Omitted random-effect structures or predictors can change the averaged estimates.
- Accepting bridge sampling estimates without checking convergence of the underlying MCMC fits, since the marginal-likelihood estimates inherit any errors in those fits.
- Applying ML-BMA to very large hierarchical datasets without approximation strategies, which can make computation prohibitive.
Frequently asked questions
How is multilevel BMA different from standard BMA?
Standard BMA averages over fixed-effects regression models. Multilevel BMA applies the same logic to models that also contain random effects and group-level structure. The candidate models differ not only in which covariates are included but also in which random effects are present and how the hierarchy is specified, making marginal likelihood computation more demanding.
How are marginal likelihoods computed in practice?
Exact computation is rarely feasible. Common approaches are the Laplace approximation and bridge sampling applied to MCMC output. Bridge sampling is generally the more accurate choice when the underlying MCMC output has converged. The BIC is a crude approximation and is best used only as a rough check. WAIC estimates out-of-sample predictive accuracy, so it is not a marginal likelihood and does not supply the BMA weights.
What if I have too many candidate models to enumerate?
When the candidate space is large, stochastic search methods such as Markov chain Monte Carlo model composition (MC3) or reversible-jump MCMC can explore the model space without evaluating every candidate, focusing computation on high-posterior-probability regions.
Should I report individual model results alongside BMA estimates?
Yes. It is good practice to report both the BMA-averaged estimates and the posterior model probabilities, and to show how much the top-ranked individual models differ. This transparency helps readers understand how much model uncertainty actually affects the conclusions.
Can I use information criteria like AIC instead of marginal likelihoods?
Weights derived from AIC are not Bayesian posterior model probabilities and should not be presented as the BMA weights defined above. BIC-based weights are a closer approximation to marginal likelihood weights, but they rest on asymptotic arguments and are best used as a rough check. Predictive criteria such as WAIC or leave-one-out cross-validation answer a different question, namely expected out-of-sample predictive accuracy. They are useful as a complementary check on predictive performance, not as a substitute for marginal likelihoods.
What assumptions must the candidate models satisfy?
All candidate models must be fitted to the same response data, because each marginal likelihood is the probability of that data and the values are only comparable when they refer to the same observations. The outcome and its likelihood must be defined identically across candidates. If they differ, for example after transforming the outcome, the density of the data must be adjusted explicitly (for instance with a Jacobian term) so that the marginal likelihoods remain on a common scale. The posterior model probabilities are conditional on the candidate set and on the chosen priors. They describe relative support within that set, not the probability that a given specification is true.
Related methods
Sources
Hoeting, J. A., Madigan, D., Raftery, A. E. & Volinsky, C. T. (1999). Bayesian model averaging: A tutorial. Statistical Science, 14(4), 382-401.
Open publication referenceGelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A. & Rubin, D. B. (2013). Bayesian Data Analysis (3rd ed.). CRC Press.
ISBN: 978-1439840955