Learn R Programming

BGVAR (version 2.0.1)

plot.bgvar.irf: Plot predictions of bgvar

Description

Plots the predictions of an object of class bgvar.predict.

Usage

# S3 method for bgvar.irf
plot(x, ..., resp, shock.nr = 1, cumulative = FALSE)

Arguments

x

an object of class bgvar.irf.

...

additional arguments.

resp

specify a variable to plot predictions.

shock.nr

specify shock to be plotted.

cumulative

whether cumulative impulse response functions should be plotted. Default is set to FALSE.

Value

No return value.

See Also

IRF

Examples

Run this code
# NOT RUN {
library(BGVAR)
data(eerData)
model.ssvs.eer<-bgvar(Data=eerData,W=W.trade0012,saves=100,burns=100,plag=1,prior="SSVS",
                      eigen=TRUE)
# US monetary policy shock
shocks<-list();shocks$var="stir";shocks$cN<-"US";shocks$ident="chol";shocks$scal=-100
irf.chol.us.mp<-IRF(obj=model.ssvs.eer,shock=shocks,nhor=24)
# plots an impulse response function
plot(irf.chol.us.mp,resp="US.y")
# }

Run the code above in your browser using DataLab