plot.forc.ecdf: Plots VAR forecasts and their empirical error bands

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Plots mean VAR forecasts and pointwise error bands

Usage

1
2
3
## S3 method for class 'forc.ecdf'
plot(x, probs = c(0.05, 0.95),
               xlab = "", ylab = "", ylim = NA, ...)

Arguments

x

N x nstep matrix of forecasts

probs

width of error band probabilities, default is 90% quantiles or c(0.05,0.95)

xlab

x-axis labels

ylab

y-axis labels

ylim

Bounds for y-axis in standard format c(lower,upper)

...

other plot parameters

Details

Plots the mean forecast and the pointwise empirical confidence region for a posterior sample of VAR forecasts.

Value

None.

Author(s)

Patrick T. Brandt

See Also

plot.forecast

Examples

 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)

Example output

##
## 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

MSBVAR documentation built on May 30, 2017, 1:23 a.m.