Learn R Programming

MSBVAR (version 0.1.1)

dfev: Decompositions of Forecast Error Variance (DFEV) for VAR models

Description

Computes the M dimensional decomposition of forecast error variance for a VAR model. User can specify the decomposition of the contemporaneous innovations.

Usage

dfev(var.obj, A0 = t(chol(var.obj$mean.S)), k)

Arguments

Value

Returns a list witherrorsM x M x K of the percentage of the innovations in variable i explained by the other M variables.std.errM x k dimension matrix of the forecast standard errors.namesVariable names

Details

The decomposition of the forecast error variance (DFEV) provides a measure of the relationship among forecast errors or impact of shocks to a VAR system. It is computed by finding the moving average representation (MAR) of the VAR model and then tracing out the path of innovations through the system. For each of the M innovations in a VAR, the amount of the variance in these forecast errors or innovations is computed and returned in a table. The table can be accessed via the print.dfev and summary.dfev functions.

See Also

See also print.dfev and summary.dfev for a nicely formatted tables and an output example

Examples

Run this code
data(IsraelPalestineConflict)
    varnames <- colnames(IsraelPalestineConflict)
    fitted.BVAR <- szbvar(IsraelPalestineConflict, p=6, z=NULL,
                           lambda0=0.6, lambda1=0.1,
                           lambda3=2, lambda4=0.25, lambda5=0, mu5=0,
                           mu6=0, nu=3, qm=4, prior=0,
                           posterior.fit=FALSE)

    A0 <- t(chol(fitted.BVAR$mean.S))
    dat.dfev <- dfev(fitted.BVAR, A0, 24)

    print.dfev(dat.dfev)
    summary.dfev(dat.dfev)

Run the code above in your browser using DataLab