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, which can be used to quantify the contribution of series j to the h-step forecast error variance of series k:
σk2(h)=j=1∑K(ψkj,02+…+ψkj,h−12)
If the orthogonalised impulse reponses (ψkj,02+…+ψkj,h−12)
are divided by the variance of the forecast error σk2(h), this yields an interpretable percentage representing how much of the forecast error variance for k can be explained by an exogenous shock to j.
Examples
# Simulate some time series that follow a latent VAR(1) processsimdat <- 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 seriesfevds <- fevd(mod, h =12)# Plot median contributions to forecast error varianceplot(fevds)# View a summary of the error variance decompositionssummary(fevds)
References
Lütkepohl, H (2006). New Introduction to Multiple Time Series Analysis. Springer, New York.