GFEVD.LN {BGVAR}R Documentation

Generalized Forecast error variance decomposition (GFEVD) akin to Lanne-Nyberg (2016)

Description

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

Usage

GFEVD.LN(gvar.obj,nhor=24,cpu=1,running=TRUE)

Arguments

gvar.obj

A gvar.obj fitted with bgvar.

nhor

The forecast horizon.

cpu

The number of cpu cores to calculate the decompositions over the MCMC draws.

running

Default is TRUE and implies that only a runing mean over the posterior draws is calculated. A full analysis including posterior bounds is likely to cause memory issues.

Value

GFEVD_post

is 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 nhor forecast horizons. In case running=TRUE only posterior mean ("mean"), else also 16% and 84% credible intervals contained in the fourth dimension.

Author(s)

Martin Feldkircher

References

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

Examples

library(BGVAR)
data(eerData)
model.ssvs.eer<-bgvar(Data=eer.data,W=W.trade0012,saves=100,burns=100,plag=1,Cpu=1,prior="SSVS",save_thin=1,eigen=TRUE, trim=1.05)

# Calculates GFEVDs for all variables in the system and for all MCMC draws (very time consuming)
GFEVD<-GFEVD.LN(model.ssvs.eer,nhor=24,cpu=1)


[Package BGVAR version 1.1.3 Index]