random_impactmat generates random VAR model (dxd) impact matrix B
with its elements drawn from specific normal distributions (see the source code). If not the first regime, will create the matrix Bm∗.
random_impactmat(d, B_scale, is_regime1 =TRUE)
Arguments
B_scale: a size (d×1) strictly positive vector specifying the mean and variability of the random impact matrices in random mutations. In Regime 1, the mean of the error term covariance matrix implied by the random impact matrix will be 0.95*diag(B_scale) and in the rest of the regimes diag(B_scale), whereas the variability increases with B_scale. Default in GAfit is var(stats::ar(data[,i], order.max=10)$resid, na.rm=TRUE), i=1,...,d. This argument is ignored if cond_dist != "ind_Student".
is_regime1: is the impact matrix for Regime 1? Regime 1 impact matrix is constrained so the elements in its first row are in a decreasing ordering and the diagonal elements are strictly positive.
Returns
Returns a (d2×1) vector containing the vectorized impact matrix B.
Details
If the impact matrix is not for Regime 1, will create the matrix Bm∗, which is related to the impact matrix Bm of Regime m as Bm∗=Bm−B1.