## Not run:
# data(IsraelPalestineConflict)
#
# # Fit a BVAR model
# fit.BVAR <- szbvar(IsraelPalestineConflict, p=6, z=NULL, lambda0=0.6,
# lambda1=0.1, lambda3=2, lambda4=0.5, lambda5=0,
# mu5=0, mu6=0, nu=3, qm=4, prior=0,
# posterior.fit=FALSE)
#
# # Fit a flat prior / MLE model
# fit.FREQ <- szbvar(IsraelPalestineConflict, p=6, z=NULL, lambda0=0.6,
# lambda1=0.1, lambda3=2, lambda4=0.5, lambda5=0,
# mu5=0, mu6=0, nu=3, qm=4, prior=2,
# posterior.fit=FALSE)
#
# # Generate unconditional forecasts for both models
# forecast.BVAR <- uc.forecast.var(fit.BVAR, nsteps=2,
# burnin=100, gibbs=1000)
#
# forecast.FREQ <- uc.forecast.var(fit.FREQ, nsteps=2,
# burnin=100, gibbs=1000)
#
# # Plot the densities for the forecasts in period of the forecast horizon
#
# mountains(forecast.BVAR$forecast[,2,1:2],
# forecast.FREQ$forecast[,2,1:2], varnames=c("I2P","P2I"), pts=c(0,0))
# ## End(Not run)
Run the code above in your browser using DataLab