fevd.decomp {BGVAR} | R Documentation |
This function calculates forecast error variance decompositions (FEVDs) for cholesky and sign restriction identified shocks. Since the calculations are very time consuming, the FEVDs are based on the posterior median only (as opposed to calculating FEVDs for each MCMC draw). In case the underlying shock has been identified via sign restrictions, the rotation matrix corresponds to the one that fulfills the sign restrictions at the posterior median of the estimated coefficients. More precisely, the algorithm searches for 50 rotation matrices that fulfill the sign restrictions at the posterior median of the coefficients and then singles out the rotation matrix tha minimizes the distance to the median of the impulse responses as suggested in Frey and Pagan 2011.
fevd.decomp(irf.obj,R=NULL,var.slct=NULL)
irf.obj |
An item fitted with |
R |
If |
var.slct |
A character vector that contains the variables for which forecast error variance decompositions should be performed. If |
FEVD |
is a three-dimensional array, with the first dimension referring to the K time series, the second to the forecast horizon and the third dimension refers to the variables for which the forecasts errors are decomposed. |
Martin Feldkircher and Florian Huber
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) # US monetary policy shock shocks<-list();shocks$shock="stir";shocks$ccode<-"US";shocks$ident="chol";shocks$scal=-100 irf.chol.us.mp<-IRF(gvar.obj=model.ssvs.eer,shockc=shocks,nhor=48) # calculates FEVD for variables US.Dp and EA.y fevd.us.mp=fevd.decomp(irf.obj=irf.chol.us.mp,var.slct=c("US.Dp","EA.y")) # NOT RUN - calculates FEVDs for all variables in the system, very time consuming #fevd.us.mp=fevd.decomp(irf.obj=irf.chol.us.mp,var.slct=NULL)