This function computes the standard forecast error vector decomposition given the estimate of the VAR. There are common complaints and requests whether the computation is ok and why it does not follow the original Pesaran Shin (1998) article. So let me clear two things out. First, the \(\sigma\) in the equation on page 20 refers to elements of \(\Sigma\), not standard deviation. Second, the indexing is wrong, it should be \(\sigma_jj\) not \(\sigma_ii\). Look, for example, to Diebold and Yilmaz (2012) or ECB WP by Dees, Holly, Pesaran, and Smith (2007) for the correct version.
genFEVD(est, n.ahead = 100, no.corr = F)
a matrix that corresponds to contribution of ith variable to jth variance of forecast
the VAR estimate from the vars package
how many periods ahead should be taken into account
boolean if the off-diagonal elements should be set to 0.
Tomas Krehlik tomas.krehlik@gmail.com