Home Get BMS Documentation Tutorials BMA Resources BMS Blog

Installing the BMS package

BMS is a package for the open-source statistical language R and might most easily be installed via the CRAN repository.
It is preferable to install BMS from R, although some users might prefer manual installation via the package binaries site.

Install BMS directly within R

Note that before installing BMS, you first need to have R installed, of course.

Linux or Mac

If you are running Linux or Mac OS X with any R version:

Open the R console (e.g. by double-clicking the R icon on your desktop) and type:


Then you will be prompted to select a CRAN server close to you and the package should be installed after a few seconds.

The online tutorials demonstrate how to use the package. Note that every time you want to use BMS, the package has first to be 'loaded' from within R with the command library(BMS).



If you are running R in Windows, execute the following command in R:

The BMS package should install in a few seconds. You may want to consult the online tutorials for usage examples.


Alternative: Download Binaries and Install Manually

Alternatively to CRAN, the package might be downloaded from the package binaries site and installed locally.
The site includes instructions for manual installation. Moreover it provides an alternative way to load the source code from the web.

Alternative: BMS under Matlab

Since there is some demand for using a Bayesian Model Averaging package like BMS under Matlab, the BMS toolbox for Matlab provides an interface that allows to access the basic functionality from within Matlab under Windows.

Note: While BMS toolbox for Matlab does not require the user to 'see' R, it still requires its installation.