fevd.mvgam function

Calculate latent VAR forecast error variance decompositions

Calculate latent VAR forecast error variance decompositions

Compute forecast error variance decompositions from mvgam models with Vector Autoregressive dynamics

fevd(object, ...) ## S3 method for class 'mvgam' fevd(object, h = 10, ...)

Arguments

  • object: list object of class mvgam resulting from a call to mvgam()

    that used a Vector Autoregressive latent process model (either as VAR(cor = FALSE) or VAR(cor = TRUE))

  • ...: ignored

  • h: Positive integer specifying the forecast horizon over which to calculate the IRF

Returns

An object of class mvgam_fevd containing the posterior forecast error variance decompositions. This object can be used with the supplied S3 functions plot

Details

A forecast error variance decomposition is useful for quantifying the amount of information each series that in a Vector Autoregression contributes to the forecast distributions of the other series in the autoregression. This function calculates the forecast error variance decomposition using the orthogonalised impulse response coefficient matrices Ψh\Psi_h, which can be used to quantify the contribution of series jj to the h-step forecast error variance of series kk:

σk2(h)=j=1K(ψkj,02++ψkj,h12) \sigma_k^2(h) = \sum_{j=1}^K(\psi_{kj, 0}^2 + \ldots + \psi_{kj,h-1}^2) \quad

If the orthogonalised impulse reponses (ψkj,02++ψkj,h12)(\psi_{kj, 0}^2 + \ldots + \psi_{kj, h-1}^2)

are divided by the variance of the forecast error σk2(h)\sigma_k^2(h), this yields an interpretable percentage representing how much of the forecast error variance for kk can be explained by an exogenous shock to jj.

Examples

# Simulate some time series that follow a latent VAR(1) process simdat <- sim_mvgam( family = gaussian(), n_series = 4, trend_model = VAR(cor = TRUE), prop_trend = 1 ) plot_mvgam_series(data = simdat$data_train, series = "all") # Fit a model that uses a latent VAR(1) mod <- mvgam(y ~ -1, trend_formula = ~1, trend_model = VAR(cor = TRUE), family = gaussian(), data = simdat$data_train, chains = 2, silent = 2 ) # Calulate forecast error variance decompositions for each series fevds <- fevd(mod, h = 12) # Plot median contributions to forecast error variance plot(fevds) # View a summary of the error variance decompositions summary(fevds)

References

Lütkepohl, H (2006). New Introduction to Multiple Time Series Analysis. Springer, New York.

See Also

VAR, irf, stability

Author(s)

Nicholas J Clark