fevd.mvgam {mvgam} | R Documentation |
Calculate latent VAR forecast error variance decompositions
Description
Compute forecast error variance decompositions from
mvgam
models with Vector Autoregressive dynamics
Usage
fevd(object, ...)
## S3 method for class 'mvgam'
fevd(object, h = 10, ...)
Arguments
object |
|
... |
ignored |
h |
Positive |
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 \Psi_h
, which can be used to
quantify the contribution of series j
to the
h-step forecast error variance of series k
:
\sigma_k^2(h) = \sum_{j=1}^K(\psi_{kj, 0}^2 + \ldots + \psi_{kj,
h-1}^2) \quad
If the orthogonalised impulse reponses (\psi_{kj, 0}^2 + \ldots + \psi_{kj, h-1}^2)
are divided by the variance of the forecast error \sigma_k^2(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
.
Value
An object of class mvgam_fevd
containing the posterior forecast error
variance decompositions. This
object can be used with the supplied S3 functions plot
Author(s)
Nicholas J Clark
References
Lütkepohl, H (2006). New Introduction to Multiple Time Series Analysis. Springer, New York.
See Also
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)