Learn R Programming

gmvarkit (version 1.1.1)

get_regime_autocovs: Calculate regimewise autocovariance matrices

Description

get_regime_autocovs calculates first p regimewise autocovariance matrices \(\Gamma_{m}(j)\) for the given GMVAR model

Usage

get_regime_autocovs(gmvar)

Arguments

gmvar

object of class 'gmvar' created with fitGMVAR or GMVAR.

Value

Returns an \((d x d x p+1 x M)\) array containing the first p regimewise autocovariance matrices. The subset [, , j, m] contains the j-1:th lag autocovariance matrix of the m:th regime.

References

  • Kalliovirta L., Meitz M. and Saikkonen P. 2016. Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.

  • Lutkepohl H. 2005. New Introduction to Multiple Time Series Analysis, Springer.

See Also

Other moment functions: cond_moments, get_regime_means, uncond_moments

Examples

Run this code
# NOT RUN {
# GMVAR(1,2), d=2 model:
params122 <- c(0.623, -0.129, 0.959, 0.089, -0.006, 1.006, 1.746,
 0.804, 5.804, 3.245, 7.913, 0.952, -0.037, -0.019, 0.943, 6.926,
 3.982, 12.135, 0.789)
mod122 <- GMVAR(p=1, M=2, d=2, params=params122)
get_regime_autocovs(mod122)

# GMVAR(2,2), d=2 model with AR-parameters restricted to be
# the same for both regimes:
C_mat <- rbind(diag(2*2^2), diag(2*2^2))
params222c <- c(1.031, 2.356, 1.786, 3.000, 1.250, 0.060, 0.036,
 1.335, -0.290, -0.083, -0.047, -0.356, 0.934, -0.152, 5.201, 5.883,
 3.560, 9.799, 0.368)
mod222c <- GMVAR(p=2, M=2, d=2, params=params222c, constraints=C_mat)
get_regime_autocovs(mod222c)
# }

Run the code above in your browser using DataLab