irf {FAVAR}R Documentation

Impulse Response Function for FAVAR

Description

Based on a shock to one standard deviation, compute the IRF.

Usage

irf(
  fit,
  irftype = "orth",
  tcode = "level",
  resvar = 1,
  impvar = NULL,
  nhor = 10,
  ci = 0.8,
  showplot = TRUE
)

Arguments

fit

a "favar" object.

irftype

'orth' is orthogonal IRF, and 'gen' is generalized IRF.

tcode

a scalar 'level' or a vector whose length equal ncol(X)+ncol(Y). X,Y is the parameters of the FAVAR function. If the variable is taken the logarithm('ln') or the first difference of logarithm('Dln'), the IRF needs to return to its level value, and you can set the parameters. Default is 'level'.

resvar

It's column indexes in cbind(XY) that specify response variables. It's a scalar or a vector. A change variable cause a change of another variable, and the former is viewed as impulse variable, the latter is viewed as response variable.

impvar

Specify a impulse variable. A numeric scalar which is position of variables in VAR equation. If it's NULL that is default, its position is the last.

nhor

IRF horizon, default is 10.

ci

confidence interval, default is 0.8.

showplot

whether show figure. TRUE is default. If multiple pictures would be printed, the package patchwork is needed to be loaded.

Value

A list containing 2 elements. The first element is a object from ggplot2::ggplot, the second element is raw data for IRF.

Examples

# see FAVAR function

[Package FAVAR version 0.1.3 Index]