Calculate the dp-dimensional covariance matrices Σm,p in the transition weights with weight_function="relative_dens"
Calculate the dp-dimensional covariance matrices Σm,p in the transition weights with weight_function="relative_dens"
get_Sigmas calculatesthe dp-dimensional covariance matrices Σm,p in the transition weights with weight_function="relative_dens" so that the algorithm proposed by McElroy (2017) employed whenever it reduces the computation time.
get_Sigmas(p, M, d, all_A, all_boldA, all_Omegas)
Arguments
p: a positive integer specifying the autoregressive order
M: a positive integer specifying the number of regimes
d: the number of time series in the system, i.e., the dimension
all_A: 4D array containing all coefficient matrices Am,i, obtained from pick_allA.
all_boldA: 3D array containing the ((dp)x(dp)) "bold A" (companion form) matrices of each regime, obtained from form_boldA. Will be computed if not given.
all_Omegas: a [d, d, M] array containing the covariance matrix Omegas
Returns
Returns a [dp, dp, M] array containing the dp-dimensional covariance matrices for each regime.
Details
Calculates the dp-dimensional covariance matrix using the formula (2.1.39) in Lütkepohl (2005) when d*p < 12 and using the algorithm proposed by McElroy (2017) otherwise.
The code in the implementation of the McElroy's (2017) algorithm (in the function VAR_pcovmat) is adapted from the one provided in the supplementary material of McElroy (2017). Reproduced under GNU General Public License, Copyright (2015) Tucker McElroy.
References
Lütkepohl H. 2005. New Introduction to Multiple Time Series Analysis, Springer.
McElroy T. 2017. Computation of vector ARMA autocovariances. Statistics and Probability Letters, 124 , 92-96.