random_impactmat function

Create random VAR model impact matrix

Create random VAR model impact matrix

random_impactmat generates random VAR model (dxd)(dxd) impact matrix BB

with its elements drawn from specific normal distributions (see the source code). If not the first regime, will create the matrix BmB_m*.

random_impactmat(d, B_scale, is_regime1 = TRUE)

Arguments

  • B_scale: a size (d×1)(d \times 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)(d^2 \times 1) vector containing the vectorized impact matrix BB.

Details

If the impact matrix is not for Regime 1, will create the matrix BmB_m*, which is related to the impact matrix BmB_m of Regime m as Bm=BmB1B_m* = B_m - B_1.

  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-02-27