irf.bgvarest: Impulse Response Function for a GVAR Submodel

View source: R/irf.bgvarest.R

irf.bgvarestR Documentation

Impulse Response Function for a GVAR Submodel

Description

Computes the impulse response coefficients of an object of class "ctryvarest" for n.ahead steps.

A plot function for objects of class "bgvarestirf".

Usage

## S3 method for class 'bgvarest'
irf(
  x,
  impulse,
  response,
  n.ahead = 5,
  ci = 0.95,
  shock = 1,
  type = "feir",
  cumulative = FALSE,
  keep_draws = FALSE,
  period = NULL,
  ctry = NULL,
  ...
)

## S3 method for class 'bgvarestirf'
plot(x, ...)

Arguments

x

an object of class "bgvarestirf", usually, a result of a call to irf.bgvarest.

impulse

name of the impulse variable.

response

name of the response variable.

n.ahead

number of steps ahead.

ci

a numeric between 0 and 1 specifying the probability mass covered by the credible intervals. Defaults to 0.95.

shock

size of the shock.

type

type of the impulse response. Possible choices are forecast error "feir" (default), orthogonalised "oir", structural "sir", generalised "gir", and structural generalised "sgir" impulse responses.

cumulative

logical specifying whether a cumulative IRF should be calculated.

keep_draws

logical specifying whether the function should return all draws of the posterior impulse response function. Defaults to FALSE so that the median and the credible intervals of the posterior draws are returned.

period

integer. Index of the period, for which the IR should be generated. Only used for TVP or SV models. Default is NULL, so that the posterior draws of the last time period are used.

ctry

character. Name of the element in argument x, for which IRFs should be obtained. If NULL (default), all submodels are used.

...

further graphical parameters.

Value

A time-series object of class "bvarirf" and if keep_draws = TRUE a simple matrix.

References

Lütkepohl, H. (2006). New introduction to multiple time series analysis (2nd ed.). Berlin: Springer.

Pesaran, H. H., Shin, Y. (1998). Generalized impulse response analysis in linear multivariate models. Economics Letters, 58, 17-29.


franzmohr/bgvars documentation built on Sept. 2, 2023, 12:45 p.m.