random_covmat function

Create random VAR model error term covariance matrix

Create random VAR model error term covariance matrix

random_covmat generates random VAR model (dxd)(dxd) error term covariance matrix Ω\Omega

from (scaled) Wishart distribution.

random_covmat(d, omega_scale)

Arguments

  • omega_scale: a size (dx1)(dx1) strictly positive vector specifying the scale and variability of the random covariance matrices in random mutations. The covariance matrices are drawn from (scaled) Wishart distribution. Expected values of the random covariance matrices are diag(omega_scale). Standard deviations of the diagonal elements are sqrt(2/d)*omega_scale[i]

    and for non-diagonal elements they are sqrt(1/d*omega_scale[i]*omega_scale[j]). Note that for d>4 this scale may need to be chosen carefully. 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".

Returns

Returns a (d(d+1)/2x1)(d(d+1)/2x1) vector containing vech-vectorized covariance matrix Ω\Omega.

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