Learn R Programming

MSBVAR (version 0.2.2)

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

Description

Computes the m dimensional decomposition of forecast error variance (DFEV) for a VAR/BVAR/BSVAR model. User can specify the decomposition of the contemporaneous innovations.

Usage

dfev(varobj, A0 = NULL, k)
dfev.VAR(varobj, A0 = t(chol(varobj$mean.S)), k)
dfev.BVAR(varobj, A0 = t(chol(varobj$mean.S)), k)
dfev.BSVAR(varobj, A0 = t(solve(varobj$A0.mode)), 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/BVAR/BSVAR system. It is computed by finding the moving average representation (MAR) of the VAR/BVAR/BSVAR model and then tracing out the path of innovations through the system. For each of the M innovations in a VAR/BVAR/BSVAR, 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(dat.dfev)
    summary(dat.dfev)

Run the code above in your browser using DataLab