Learn R Programming

frequencyConnectedness (version 0.2.4)

genFEVD: Compute a forecast error vector decomposition in generalised VAR scheme.

Description

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.

Usage

genFEVD(est, n.ahead = 100, no.corr = F)

Value

a matrix that corresponds to contribution of ith variable to jth variance of forecast

Arguments

est

the VAR estimate from the vars package

n.ahead

how many periods ahead should be taken into account

no.corr

boolean if the off-diagonal elements should be set to 0.

Author

Tomas Krehlik tomas.krehlik@gmail.com