GFEVD.LN {BGVAR} | R Documentation |
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.
GFEVD.LN(gvar.obj,nhor=24,cpu=1,running=TRUE)
gvar.obj |
A |
nhor |
The forecast horizon. |
cpu |
The number of cpu cores to calculate the decompositions over the MCMC draws. |
running |
Default is |
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 |
Martin Feldkircher
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.
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)