irf.plot {BGVAR}R Documentation

Function to plot impulse responses

Description

A function that plot median responses along with 25-75% and 16-84% credible sets.

Usage

irf.plot(irf.obj, resp, shock.nr = 1, B = NULL, N = 8, Main =NULL, cex.la = 1.2, cum = FALSE)

Arguments

irf.obj

An objected generated by function IRF.

resp

The name of the response variable that should be plotted. If only the country name is specified, irf.plot automatically plots impulses for all responses of that country.

shock.nr

The number of the identified shock for which impulse responses should be drawn. Default is 1 for the first shock.

B

The range of the plot. Default is NULL in which the range is automatically set.

N

The number of axis ticks with labels.

Main

A title. If set to NULL, names of the underlying data in the irf.obj are used.

cex.la

The size of the axis label.

cum

If TRUE, cumulative responses are computed.

Author(s)

Martin Feldkircher

Examples

 library(BGVAR)
  data(monthlyData)
  # estimates the model
  model.ssvs<-bgvar(Data=new.data,W=W,saves=100,burns=100,plag=1,Cpu=1,prior="SSVS",save_thin=1,eigen=TRUE,trim=1.05)

  EA_countries <- c("AT", "BE", "DE","ES", "FI","FR", "IE", "IT", "NL", "PT","GR","SK") #,"MT","CY","EE","LT","LV")

  # A simultaneous cholesky shock to long-term interest rates in the euro area countries, scaled to amount to -100 basis points (on average over the EA countries).
  # Note that the ordering of the variables influences the response, the ordering is exactly as in the country models, to use a different order you have re-estimate
  # the model (by gvar.ssvs)
  shocks<-list();shocks$shock="ltir";shocks$ccode<-EA_countries;shocks$ident="chol"
  irf.chol<-IRF(gvar.obj=model.ssvs,shockc=shocks,nhor=48)

  # Plots a specific variable (i.e., "DE.y")
  irf.plot(irf.chol, resp="DE.y",Main="Industrial Production (DE)")

  # Plots all variables of a given country
  irf.plot(irf.chol, resp="AT")

[Package BGVAR version 1.1.3 Index]