Description Usage Arguments Details Value Author(s) See Also Examples
Plots mean VAR forecasts and pointwise error bands
1 2 3 |
x |
N x nstep matrix of forecasts |
probs |
width of error band probabilities, default is 90% quantiles or
|
xlab |
x-axis labels |
ylab |
y-axis labels |
ylim |
Bounds for y-axis in standard format |
... |
other plot parameters |
Plots the mean forecast and the pointwise empirical confidence region for a posterior sample of VAR forecasts.
None.
Patrick T. Brandt
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 | ## 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)
# Generate unconditional forecasts for both models
forecast.BVAR <- uc.forecast(fit.BVAR, nsteps=12,
burnin=100, gibbs=1000)
# Plot the forecasts
par(mfrow=c(2,1))
plot(forecast.BVAR$forecast[,,1], probs=c(0.16,0.84),
main="I2P Forecast")
abline(h=0)
plot(forecast.BVAR$forecast[,,2], probs=c(0.16,0.84),
main="P2I Forecast")
abline(h=0)
## End(Not run)
|
##
## MSBVAR Package v.0.9-2
## Build date: Wed Oct 31 11:46:37 2018
## Copyright (C) 2005-2018, Patrick T. Brandt
## Written by Patrick T. Brandt
##
## Support provided by the U.S. National Science Foundation
## (Grants SES-0351179, SES-0351205, SES-0540816, and SES-0921051)
##
Gibbs Iteration = 500
Gibbs Iteration = 1000
Start time : Wed Oct 31 11:46:37 2018
End time : Wed Oct 31 11:46:39 2018
Warning messages:
1: In plot.window(...) : "probs" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "probs" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
"probs" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
"probs" is not a graphical parameter
5: In box(...) : "probs" is not a graphical parameter
6: In title(...) : "probs" is not a graphical parameter
Warning messages:
1: In plot.window(...) : "probs" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "probs" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
"probs" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
"probs" is not a graphical parameter
5: In box(...) : "probs" is not a graphical parameter
6: In title(...) : "probs" is not a graphical parameter
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.