Search
Make Good Use of Your Sidebar

Use this space for anything from simple blocks of text to powerful widgets, like our Twitter and Flickr widgets. Learn more.

To access Website Management, hit the 'esc' key or use this Login link.

Navigation

Bayesian Macroeconometrics in R

BMR (Bayesian Macroeconometrics in R) is a collection of R and C++ routines for estimating Bayesian Vector Autoregressive (BVAR) and Dynamic Stochastic General Equilibrium (DSGE) models in the R statistical environment. For the former, BMR includes the the well-known Minnesota and normal-inverse-Wishart priors, along with Mattias Villani's steady-state prior, and allows for estimation of BVARs with time-varying parameters.

Important License Information: BMR is licensed under the GNU General Public License (GPL) version 3. The experimental nature of this software means that it is intended for academic use only.

By downloading, installing, and/or using the software, you agree to these terms, to the terms of the GPL v3 license, and release me from any liability whatsoever arising from use of this software.

Package requirements: the latest versions of R (v3.10, or above), Rcpp, RcppArmadillo, ggplot2, doSNOW, and grid (this comes pre-packaged with new R releases). Running the following commands, post installation of R itself, should be sufficient:

install.packages("RcppArmadillo")
install.packages("ggplot2")
install.packages("doSNOW")

Download

Current version: 0.4.0, 07/09/2014.

  • The source code is available on GitHub. I recommend installing BMR from source.
  • Windows binary files: link.
  • Mac binary files.
    • built under Mavericks (OSX 10.9.3): link. (The Mavericks build should work under Mountain Lion (OSX 10.8.x).)
    • built under Lion (OSX 10.7.5): link. (The Lion build should work under Snow Leopard (OSX 10.6.x).)
  • Accompanying vignette: link.

The vignette (linked above) is intended to be a comprehensive guide to the routines (and what goes on under the bonnet, so to speak) and should be consulted first before submitting any questions to me about the package. I am more than happy to receive bug reports (and comments in general) about BMR, use the contact tab above to do so, but I am not willing to provide technical support for the package. (Technical support in the sense of 'how do I get my model into the required format', or 'what prior should I use'.)

After installing the package, the user can check if everything is working as intended by typing:

library(BMR)
data(BMRVARData)

This should load BMR and place a dataframe called 'USMacroData' into the workspace.

Replication files/Models.

  • An-Schorfheide (2007).
  • Lubik-Schorfheide (2007).
  • Lubik-Schorfheide (2007) with intercept terms in the measurement equation.
  • basic New-Keynesian Model.
    • Solve: link. Estimate: link. Separate DSGE-VAR file: link.
  • RBC Model.

Release notes:

  • Version 0.4.0:
    • Better support for larger DSGE models;
    • intercept terms in the measurement equation and measurement equation error-variances are now required inputs to the EDSGE and DSGEVAR functions, which is done through 'partomats' (see the updated example files linked above);
    • code for the An and Schorfheide (2007) and Lubik and Schorfheide (2007) models;
    • a new function ('prior') to plot prior distributions and print first and second moments;
    • a new simple wrapper function ('gtsplot') to plot time-series data;
    • DSGEVAR function input changed to include a constant (intercept) term; and
    • updated the documentation and help files.
  • Version 0.3.0:
    • DSGEVAR function now supports multiple MCMC chains running in parallel;
    • better posterior mode estimation for DSGE and DSGEVAR models via sequential optimization using multiple optimization routines;
    • faster estimation of large DSGE models using the Chandrasekhar Recursions;
    • setting keep = 0 in EDSGE and DSGEVAR will return the posterior mode approximation only;
    • EDSGE and DSGEVAR functions now return a Laplace approximation to the marginal likelihood;
    • updated the help documentation and vignette; and
    • minor bug fixes.
  • Version 0.2.0:
    • BMR now supports some DSGE-VAR functionality (see ?DSGEVAR);
    • parallel processing options are available for BVARW and EDSGE when running multiple MCMC chains;
    • speed improvements for most core functions, particularly BVARW, BVARTVP, and EDSGE;
    • updated the help documentation;
    • fixed some weird pathologies when the BVAR lag order was set to 1 (p=1); and
    • other bug fixes.
  • Version 0.1.1:
    • Several minor bug fixes;
    • improvements to the help documentation; and
    • inclusion of the artificial VAR data used in sections 6.1 and 6.3 of the vignette.
  • Version 0.1: First release, August 2012.