Learn R Programming

BGVAR (version 2.0.1)

plot.bgvar.fevd: Plotting Function for Forecast Error Variance Decomposition

Description

Plots the decomposition of a specific time series into selected structural shocks.

Usage

# S3 method for bgvar.fevd
plot(x, ..., ts, k.max = 10)

Arguments

x

an object of class bgvar.fevd.

...

additional arguments.

ts

specify the decomposed time series to be plotted.

k.max

plots the k series with the highest for the decomposition of ts.

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",thin=1,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=48)

# calculates FEVD for variables US.Dp and EA.y
fevd.us.mp=fevd.decomp(obj=irf.chol.us.mp,var.slct=c("US.Dp","EA.y"))

plot(fevd.us.mp, ts="US.Dp", k.max=10)
# }

Run the code above in your browser using DataLab