A collection of R and C++ functions, which assist in the Bayesian inference of vector autoregressive (VAR) and vector error correction (VEC) models.
The package bvartools
implements some common functions used for Bayesian
inference for linear, multivariate time series models. It should give researchers
maximum freedom in setting up MCMC algorithms in R and keep calculation time
limited at the same time. This is achieved by implementing posterior simulation
functions in C++. Its main features are
The bvar
and bvec
functions collect the output of a Gibbs sampler
in standardised objects, which can be used for further analyses.
Further functions such as predict
, irf
, fevd
for forecasting,
impulse response analysis and forecast error variance decomposition, respectively.
Computationally intensive functions - such as for posterior
simulation - are written in C++ using the RcppArmadillo
package of Eddelbuettel
and Sanderson (2014).
Posterior simulation functions for commonly used Gibbs sampler algorithms.
Chan, J., Koop, G., Poirier, D. J., & Tobias, J. L. (2019). Bayesian Econometric Methods (2nd ed.). Cambridge: University Press.
Durbin, J., & Koopman, S. J. (2002). A simple and efficient simulation smoother for state space time series analysis. Biometrika, 89(3), 603--615.
Eddelbuettel, D., & Sanderson C. (2014). RcppArmadillo: Accelerating R with high-performance C++ linear algebra. Computational Statistics and Data Analysis, 71, 1054--1063. http://dx.doi.org/10.1016/j.csda.2013.02.005
George, E. I., Sun, D., & Ni, S. (2008). Bayesian stochastic search for VAR model restrictions. Journal of Econometrics, 142(1), 553--580. https://doi.org/10.1016/j.jeconom.2007.08.017
Koop, G, & Korobilis, D. (2010), Bayesian multivariate time series Methods for empirical macroeconomics, Foundations and Trends in Econometrics, 3(4), 267--358. http://dx.doi.org/10.1561/0800000013
Koop, G., Le<U+00F3>n-Gonz<U+00E1>lez, R., & Strachan R. W. (2010). Efficient posterior simulation for cointegrated models with priors on the cointegration space. Econometric Reviews, 29(2), 224--242. https://doi.org/10.1080/07474930903382208
Korobilis, D. (2013). VAR forecasting using Bayesian variable selection. Journal of Applied Econometrics, 28(2), 204--230. https://doi.org/10.1002/jae.1271
L<U+00FC>tkepohl, H. (2006). New introduction to multiple time series analysis (2nd ed.). Berlin: Springer.
Sanderson, C., & Curtin, R. (2016). Armadillo: a template-based C++ library for linear algebra. Journal of Open Source Software, 1(2), 26. http://dx.doi.org/10.21105/joss.00026