Andro Asatashvili
  • Code
  • Publications
  • CV

BVAR (under validation)

Bayesian Vector Autoregression
Author

Andro Asatashvili

library(bsvars)

endog <- as.matrix(endog)
exog <- as.matrix(exog)

specification <- specify_bsvar$new(data = endog,
                                   exogenous = exog,
                                   p = 4)


set.seed(123)
# run the burn-in
burn_in = estimate(specification, 10000)
**************************************************|
bsvars: Bayesian Structural Vector Autoregressions|
**************************************************|
 Gibbs sampler for the SVAR model                 |
**************************************************|
 Progress of the MCMC simulation for 10000 draws
    Every draw is saved via MCMC thinning
 Press Esc to interrupt the computations
**************************************************|
# estimate the model
posterior = estimate(burn_in, 50000)
**************************************************|
bsvars: Bayesian Structural Vector Autoregressions|
**************************************************|
 Gibbs sampler for the SVAR model                 |
**************************************************|
 Progress of the MCMC simulation for 50000 draws
    Every draw is saved via MCMC thinning
 Press Esc to interrupt the computations
**************************************************|
p <- compute_impulse_responses(posterior, horizon = 24)   

plot(p)                     

q <- bsvars::compute_fitted_values(posterior)
plot(q)

 
 

This site was built with Quarto.