gfevd function

Generalized Forecast Error Variance Decomposition

Generalized Forecast Error Variance Decomposition

This function calculates a complete generalized forecast error variance decomposition (GFEVDs) based on generalized impulse response functions akin to Lanne-Nyberg (2016). The Lanne-Nyberg (2016) corrected GFEVD sum up to unity.

gfevd(x, n.ahead=24, running=TRUE, applyfun=NULL, cores=NULL, verbose=TRUE)

Arguments

  • x: an object of class bgvar.
  • n.ahead: the forecast horizon.
  • running: Default is set to TRUE and implies that only a running mean over the posterior draws is calculated. A full analysis including posterior bounds is likely to cause memory issues.
  • applyfun: Allows for user-specific apply function, which has to have the same interface than lapply. If cores=NULL then lapply is used, if set to a numeric either parallel::parLapply() is used on Windows platforms and parallel::mclapply() on non-Windows platforms.
  • cores: Specifies the number of cores which should be used. Default is set to NULL and applyfun is used.
  • verbose: If set to FALSE it suppresses printing messages to the console.

Returns

Returns a list with two elements

  • GFEVD: a three or four-dimensional array, with the first dimension referring to the K time series that are decomposed into contributions of K time series (second dimension) for n.ahead forecast horizons. In case running=TRUE only the posterior mean else also its 16% and 84% credible intervals is contained in the fourth dimension.
  • xglobal: used data of the model.

Examples

library(BGVAR) data(testdata) model.eer<-bgvar(Data=testdata, W=W.test, draws=50, burnin=50, plag=1, prior="SSVS", eigen=TRUE) GFEVD<-gfevd(model.eer, n.ahead=24)

References

Lanne, M. and H. Nyberg (2016) Generalized Forecast Error Variance Decomposition for Linear and Nonlinear Multivariate Models. Oxford Bulletin of Economics and Statistics, Vol. 78(4), pp. 595-603.

See Also

bgvar.

Author(s)

Maximilian Boeck, Martin Feldkircher

  • Maintainer: Maximilian Boeck
  • License: GPL-3
  • Last published: 2024-09-30