fevd: Forecast Error Variance Decomposition

View source: R/fevd.R

fevdR Documentation

Forecast Error Variance Decomposition

Description

Computes the forecast error variance decomposition (FEVD) from an RBFM-VAR model.

Usage

fevd(object, horizon = 20)

Arguments

object

An rbfmvar object from rbfmvar.

horizon

Integer. Number of periods for the FEVD. Default is 20.

Details

The FEVD shows the proportion of the forecast error variance of each variable that is attributable to shocks in each of the structural innovations. The decomposition is based on the Cholesky identification scheme, so the ordering of variables matters.

At each horizon h, the FEVD sums to 1 (100

Value

An object of class "rbfmvar_fevd" containing:

fevd

Array of FEVD values (horizon x n x n). Element [h, i, j] is the proportion of variable i's forecast error variance at horizon h explained by shocks in variable j.

horizon

FEVD horizon.

varnames

Variable names.

References

Lutkepohl, H. (2005). New Introduction to Multiple Time Series Analysis. Springer-Verlag. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-540-27752-1")}

Examples

# Simulate VAR data
set.seed(123)
n <- 200
e <- matrix(rnorm(n * 3), n, 3)
y <- matrix(0, n, 3)
colnames(y) <- c("y1", "y2", "y3")
for (t in 3:n) {
  y[t, ] <- 0.3 * y[t-1, ] + 0.2 * y[t-2, ] + e[t, ]
}

fit <- rbfmvar(y, lags = 2)
fv <- fevd(fit, horizon = 20)
plot(fv)


rbfmvar documentation built on April 9, 2026, 9:08 a.m.