| g.fevd | R Documentation |
Computes the generalized forecast error variance decomposition of a VAR(p) for n.ahead steps.
g.fevd(x, n.ahead = 10, normalized = TRUE)
x |
Object of class ‘ |
n.ahead |
Integer specifying the steps ahead. |
normalized |
a logical value indicating whether the result should be normalized to sum up to 1, see Details |
When normalized=FALSE this function computes the generalized forecast error variance decomposition proposed by Pesaran and Shin (1998) which takes the form:
\alpha _{ij}^{g}(h) = \frac{\sigma_{ii}^{-1}\sum_{l=0}^{h-1}(\mathbf{e'}_{i}\Theta _{l}\Sigma_{\varepsilon}\mathbf{e}_{j})^{2}}{\sum_{l=0}^{h-1}(\mathbf{e'}_{i}\Theta _{l}\Sigma _{\varepsilon }\Theta'_{l}\mathbf{e}_{i})}, \quad i,j = 0,1,2\ldots, K
Where \mathbf{\Theta}_{l}, are the coefficients matrix of the MA representation of the VAR model, \mathbf{\Sigma}_{\varepsilon}
is the variance matrix of the reduced-form error vector \varepsilon, \sigma_{ii} is the standard deviation of the error term for the
ith equation and e_{i} and e_{j} are selection vectors with ones as the ith element and zeros elsewhere.
If normalized=TRUE (the default value) then g.fevd computes:
\tilde{a}_{ij}^{g}(h) = \frac{a_{ij}^{g}(h)} {\sum_{j=1}^{K} a_{ij}^{g}(h)}
This fact implies the normalization is simply each entry of the generalized fevd divided by the its corresponding row sum.
A list of length K holding the generalized forecast error variances as matrices. This is an object of class ‘varfevd’ from vars package.
Jilber Urbina
Pesaran, M. H. and Shin, Y. (1998). Generalized impulse response analysis in linear multivariate models. Economics Letters, 58(1):17-29.
library(vars)
data(stock.prices)
stocks <- stock.prices[,1:2]
VAR.1 <- VAR(stocks)
g.fevd(VAR.1, n.ahead = 10) # normalized
g.fevd(VAR.1, n.ahead = 10, normalized=FALSE) # Not normalized
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.