- Introduced by
- Hoeting, Madigan, Raftery & Volinsky
- Year
- 1999
- Type
- Bayesian model averaging
What does it do?
Bayesian Model Averaging (BMA) addresses uncertainty about which model is correct by averaging inferences over a set of candidate models instead of selecting one.
Each candidate receives a posterior model probability that combines how well it explains the data with its prior probability, and coefficient estimates or predictions are weighted accordingly. The 1999 tutorial by Hoeting, Madigan, Raftery and Volinsky sets out this workflow and remains a widely cited overview of the method.
The intuition behind the method
Suppose you are unsure which of several predictors truly belongs in a regression model. Rather than picking one model and discarding the others, BMA keeps every candidate model in play, weighting each by how plausible it is given the data. If several models all look roughly equally good, the final inference reflects that uncertainty — the averaged estimate is more honest about what the data actually support.
History
The workflow of BMA, covering posterior model probabilities, PIPs and model-averaged estimates, is set out in Hoeting, Madigan, Raftery and Volinsky's 1999 tutorial in Statistical Science. Zeugner and Feldkircher (2015) describe the BMS package for R, which implements BMA for linear regression models with a range of prior structures.
When to use it
Choose BMA when several sets of candidate predictors are plausible and the choice among them is itself uncertain, so that committing to one selected model would understate uncertainty. It fits a continuous outcome modelled by a linear regression, with predictors that may include binary indicators, and it requires priors on both the parameters and the model space that can be justified. It is useful for prediction under model uncertainty and for exploratory analysis that needs probability-scaled variable importance. Avoid it when the sample is small relative to the candidate set, because the posterior model probabilities then depend heavily on the prior. Avoid it also when a single transparent model must be reported, or when the outcome is non-Normal and no suitable extension is available.
Limitations and considerations
- Exact enumeration of the model space, which contains 2ᵏ models for k candidate predictors, becomes infeasible as k grows; the practical threshold depends on computation and software. Stochastic search methods such as MC3 then add computational cost and require checks that the search has explored the model space adequately.
- Results depend on the prior placed on the parameters (the BMS package offers fixed and flexible prior options) and on the prior over models; these choices must be justified and reported.
- With a small sample relative to the number of candidate predictors, posterior model probabilities are driven substantially by the prior rather than by the data.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Averages over the candidate models instead of conditioning on one, so the reported uncertainty includes uncertainty about which predictors belong in the model.
- Posterior inclusion probabilities give each predictor a probability-scaled importance measure, summed over every model that contains it.
- Model-averaged estimates avoid the overconfidence that follows from treating a model chosen from the data as if it were known to be true.
Applications
- Variable selection in linear regression when theory does not settle which predictors to include.
- Prediction problems where the model specification is uncertain and averaged predictions are preferred to a single fitted model.
- Exploratory analysis that requires probability-scaled measures of variable importance.
How it works
How it works
Bayes' rule is the foundation of the method. It updates a prior into a posterior, and BMA applies this at two levels: to the parameters within each model, and to the models themselves. Each candidate model Mₖ receives a posterior probability that increases with how well it explains the data and with its prior probability. A common choice is a uniform prior over models, so that every model is equally likely a priori. Other prior structures over the model space are available, and the BMS package for R offers a range of them (Zeugner and Feldkircher, 2015). The chosen prior should be stated and its influence checked.
Formula
p(\theta \mid y) \propto p(y \mid \theta)\,p(\theta)
This formula gives the posterior probability of each model Mₖ: its marginal likelihood p(y | Mₖ) times its prior p(Mₖ), normalised over all models. The marginal likelihood is obtained by integrating out the model-specific parameters, and it is what allows models with different numbers of predictors to be compared. For the Normal linear regression model with a natural conjugate prior, the marginal likelihoods have analytical closed forms. For most other models no such formulae exist, and marginal likelihoods or Bayes factors must be approximated before they can be used in model averaging. Because the model space contains 2ᵏ models for k candidate predictors, exhaustive enumeration becomes computationally infeasible as k grows; the practical limit depends on the available computation and the software used. In that case a stochastic search over models, such as the MC3 algorithm, concentrates computation on high-probability models without visiting every one of them. Each predictor's posterior inclusion probability (PIP), the sum of posterior model probabilities over all models containing that predictor, is the main summary of variable importance.
Formula
\Pr(M_k \mid y) = \frac{p(y \mid M_k)\,p(M_k)}{\sum_{j} p(y \mid M_j)\,p(M_j)}The BMA estimate of a quantity such as a coefficient or a prediction is the sum of that quantity's estimate under each model, weighted by the posterior model probability Pr(Mₖ | y). The result is a model-averaged posterior that carries model uncertainty into the reported summaries. For a coefficient, models that exclude the predictor contribute zero, so a predictor with a low PIP has its model-averaged coefficient shrunk toward zero, while a predictor with a high PIP has an estimate close to its value in the models that include it. Credible intervals computed from this averaged posterior can be wider than those from any single model, because the mixture reflects disagreement between models. Typical outputs include model-averaged posterior means, credible intervals, and a PIP for each predictor.
Formula
\hat{\Delta} = \sum_{k=1}^{K} \hat{\Delta}_k\,\Pr(M_k \mid y)Common pitfalls
- Reading a PIP as a p-value. A PIP of 0.95 is a posterior probability under the chosen prior and model space, not a significance test at any fixed level such as 0.05.
- Omitting prior sensitivity checks. Changing the prior over models or the prior on the parameters can shift PIPs noticeably.
- Running a model-space search such as MC3 over a large candidate set with limited data, which can leave the search poorly mixed and the PIPs unreliable.
- Reporting only the highest-probability model, which discards the averaging that is the purpose of the method.
Frequently asked questions
What is a posterior inclusion probability and how do I interpret it?
The posterior inclusion probability (PIP) for a predictor is the sum of posterior model probabilities across all models that include that predictor. A PIP close to 1 means the data strongly favour models with that predictor included; a PIP near 0 means it contributes little across the model space. PIPs are not p-values: there is no fixed threshold like 0.05, and the appropriate cut-off depends on the research question and the prior.
How many predictors can BMA handle?
With k candidate predictors the model space contains 2ᵏ models. Exhaustive enumeration becomes computationally infeasible as k grows, and the practical limit depends on hardware and implementation. Beyond that point, a stochastic search such as MC3 concentrates computation on high-probability models without visiting every one of them.
Does BMA require normally distributed outcomes?
Standard BMA as implemented in packages such as BMS assumes a Normal linear model for the outcome. Extensions to non-Normal outcomes, such as binary or count data, exist in the literature, but they are less widely implemented and should be checked carefully before use. When normality is implausible, a regularised frequentist approach such as LASSO or Elastic Net may be a more transparent alternative.
How is BMA different from simply selecting the best model by AIC or BIC?
AIC and BIC identify a single best model and discard the others, which understates uncertainty when several models fit similarly well. BMA retains all candidate models and weights them by posterior probability, so the final inference reflects model uncertainty. When one model receives nearly all of the posterior probability, the averaged result is close to that model's result.
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 referenceZeugner, S. & Feldkircher, M. (2015). Bayesian Model Averaging Employing Fixed and Flexible Priors: The BMS Package for R. Journal of Statistical Software, 68(4), 1–37.
Open DOI referenceBayesian Econometrics, p. 279