BMS toolbox for Matlab: Bayesian Model Averaging
The BMS toolbox for Matlab (Version 0.2 - beta) provides the core functionality of the R package BMS to Matlab (only under Windows).
The toolbox provides Matlab functions that perform Bayesian Model Averaging via calling a hidden instance of R.
When to use BMS in Matlab, rather than in R
However, a substantial number of users prefers to work from within Matlab . Therefore this toolbox provides the basic functionality of BMS in Matlab, intended for simple applications in Bayesian Model Averaging. For more advanced applications, it is strongly recommended to use BMS in its native R environment.
Please bear in mind that BMS toolbox for Matlab is still in testing (beta) stage and may not work as well as its R equivalent!
Install BMS toolbox for Matlab
Running BMS for Matlab requires a Windows operating system (NT, XP, Vista, or 7) and Matlab (Version Matlab 6 or later)
- Download RAndFriends to somewhere on your local disk. (This could take quite a while as the download is about 800 MB.)
- Install RAndFriends by double-clicking on the downloaded file. In case of troubles, consult the setup instructions at the statconn Wiki
- Download BMS_matlab.zip and unzip it to somewhere on your local hard drive.
- Open Matlab and navigate your Matlab current directory to the folder
BMS_matlabof the toolbox
- In Matlab, run the command
libraryBMS: At the first time the console will display the following warning:
BMS library seems to be not installed. Trying to install...
- Wait for execution: BMS for Matlab is now ready to use. To close the hidden R instance type
So far BMS toolbox for MAtlab has been tested on Windows XP and Vista with Matlab versions 6.5 and 2009b (7.9).
Note: The BMS toolbox for Matlab depends on the R D-COM interface to communicate with R. Installing the D-COM as a separate component can be troublesome, therefore it is recommended to install R and the D-COM at once with RAndFriends.