Posterior Simulation for BVAR Models
Produces draws from the posterior distributions of Bayesian VAR models.
bvarpost(object)
object |
an object of class |
The function implements commonly used posterior simulation algorithms for Bayesian VAR models. It can produce posterior draws for standard BVAR models with independent normal-Wishart priors, which can be augmented by stochastic search variable selection (SSVS) as proposed by Geroge et al. (2008) or Bayesian variable selection (BVS) as proposed in Korobilis (2013). Both SSVS and BVS can also be applied to the covariances of the error term.
The implementation follows the description in Chan et al. (2019), George et al. (2008) and Korobilis (2013). For all approaches the SUR form of a VAR model is used to obtain posterior draws. The algorithm is implemented in C++ to reduce calculation time.
The function also supports structural BVAR models, where the structural coefficients are estimated from contemporary endogenous variables, which corresponds to the so-called (A-model). Currently, only specifications are supported, where the structural matrix contains ones on its diagonal and all lower triangular elements are freely estimated. Since posterior draws are obtained based on the SUR form of the VAR model, the structural coefficients are drawn jointly with the other coefficients.
An object of class "bvar"
.
Chan, J., Koop, G., Poirier, D. J., & Tobias J. L. (2019). Bayesian econometric methods (2nd ed.). Cambridge: Cambridge University Press.
George, E. I., Sun, D., & Ni, S. (2008). Bayesian stochastic search for VAR model restrictions. Journal of Econometrics, 142(1), 553–580. doi: 10.1016/j.jeconom.2007.08.017
Korobilis, D. (2013). VAR forecasting using Bayesian variable selection. Journal of Applied Econometrics, 28(2), 204–230. doi: 10.1002/jae.1271
# Get data data("e1") e1 <- diff(log(e1)) * 100 # Create model model <- gen_var(e1, p = 2, deterministic = "const", iterations = 50, burnin = 10) # Number of iterations and burnin should be much higher. # Add priors model <- add_priors(model) # Obtain posterior draws object <- bvarpost(model)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.