Description Usage Details Author(s) References See Also Examples
Estimate a Bayesian VAR with steady-state prior.
1 |
For technical details of the model, see the accompanying vignette.
Keith O'Hara
Villani, Mattias, “Steady-State Priors for Vector Autoregressions,” Journal of Applied Econometrics, 2009, 24 (4), 630–650.
forecast.bvars
, IRF.bvars
, plot.bvars
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
data(BMRVARData)
bvar_data <- data.matrix(USMacroData[,2:4])
#
coef_prior <- c(0.9,0.9,0.9)
psi_prior <- matrix(c(3,6,5),nrow=1)
HP1 <- 0.5
HP2 <- 0.5
XiPsi <- 1
gamma = 4
bvar_obj <- new(bvars)
#
bvar_obj$build(bvar_data,TRUE,4)
bvar_obj$prior(coef_prior,HP1,HP2,psi_prior,XiPsi,gamma)
bvar_obj$gibbs(10000,5000)
IRF(bvar_obj,20,var_names=colnames(USMacroData),save=FALSE)
plot(bvar_obj,var_names=colnames(USMacroData),save=FALSE)
forecast(bvar_obj,shocks=TRUE,var_names=colnames(USMacroData),back_data=10,save=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.