random_covmat
generates random VAR model \((dxd)\) error term covariance matrix \(\Omega\)
from (scaled) Wishart distribution.
random_covmat(d, omega_scale)
Returns a \((d(d+1)/2x1)\) vector containing vech-vectorized covariance matrix
\(\Omega\).
a size \((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"
.