Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gfevd

Generalized Forecast Error Variance Decomposition


Description

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.

Usage

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.

Value

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.

Author(s)

Maximilian Boeck, Martin Feldkircher

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

Examples


BGVAR

Bayesian Global Vector Autoregressions

v2.2.0
GPL-3
Authors
Maximilian Boeck [aut, cre] (<https://orcid.org/0000-0001-6024-8305>), Martin Feldkircher [aut] (<https://orcid.org/0000-0002-5511-9215>), Florian Huber [aut] (<https://orcid.org/0000-0002-2896-7921>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.