BMS-package {BMS}R Documentation

Bayesian Model Sampling 0.3.3


This package enables Bayesian Model Averaging over the classical normal-conjugate model with many prior options and posterior statistics.


Package: BMS
Type: Package
Version: 0.3.3
Date: 2013-11-21
License: Artistic 2.0

The most important function is bms to perform bayesian model sampling for Bayesian model Averaging or Bayesian Model Selection.
It basically offers to sample data according to different g-priors and model priors, and leaves the choice of different samplers (MCMC samplers, full or partial enumeration, and interaction samplers).
The results provide analysis into models according to MCMC frequencies, and according to the posterior likelihood of the best nmodel models (cf. bms).

The functions coef.bma and summary.bma summarize the most important results.

The plotting functions plot.bma, image.bma, density.bma, pred.density, and gdensity are the most important plotting functions (inter alia). Most of them also produce numerical output.

Moreover there are other functions for posterior results, such as beta.draws.bma, pmp.bma, pmpmodel, post.var, post.pr2 and topmodels.bma, while c.bma helps to combine and parallelize sampling chains.

The function zlm estimates a Bayesian linear regression under Zellner's g prior, i.e. estimating a particular model without taking model uncertainty into account. The function as.zlm may be used for model selection.

Finally, the small-scale functions f21hyper, hex2bin and fullmodel.ssq provide addidtional utilities, as well as bma- and zlm-specific methods for variable.names, deviance, vcov, etc..

Consider the function topmod for more advanced programming tasks, as well as the possibility to customize coefficient priors (gprior-class) and model priors (mprior-class).


Martin Feldkircher and Stefan Zeugner

Maintainer: Stefan Zeugner <>


Feldkircher, M. and S. Zeugner (2009): Benchmark Priors Revisited: On Adaptive Shrinkage and the Supermodel Effect in Bayesian Model Averaging; IMF Working Paper 09-202

See Also


mfls =bms(,burn=1000,iter=9000,nmodel=100)

[Package BMS version 0.3.3 Index]