random_ind2
generates random mean-parametrized parameter vector
that is always stationary
random_ind2(p, M, d, mu_scale, mu_scale2, omega_scale, ar_scale = 1)
a positive integer specifying the autoregressive order of the model.
a positive integer specifying the number of mixture components.
number of time series in the system.
a size \((dx1)\) vector defining means of the normal distributions from which each
mean parameter \(\mu_{m}\) is drawn from in random mutations. Default is colMeans(data)
. Note that
mean-parametrization is always used for optimization in GAfit
- even when parametrization=="intercept"
, but
input (in initpop
) and output (return value) parameter vectors may be intercept-parametrized.
a size \((dx1)\) strictly positive vector defining standard deviations of the normal
distributions from which each mean parameter \(\mu_{m}\) is drawn from in random mutations.
Default is 2*sd(data[,i]), i=1,..,d
.
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
.
a positive real number adjusting how large AR parameter values are typically generated in some random
mutations. See function random_coefmats2
for details. This is ignored when estimating constrained models.
Returns somewhat random mean-parametrized parameter vector that has form \(\theta\)\( = \)(\(\upsilon_{1}\), ...,\(\upsilon_{M}\), \(\alpha_{1},...,\alpha_{M-1}\)), where:
\(\upsilon_{m}\) \( = (\mu_{m},\)\(\phi_{m}\)\(,\sigma_{m})\)
\(\phi_{m}\)\( = (vec(A_{m,1}),...,vec(A_{m,1})\)
and \(\sigma_{m} = vech(\Omega_{m})\), m=1,...,M.
The coefficient matrices are generated using the algorithm described by Ansley
and Kohn (1986), which forces stationarity. It's not clear in detail how ar_scale
affects the coefficient matrices. Read the cited article by Ansley and Kohn (1986) AND
the source code for more information.
The covariance matrices are generated from (scaled) Wishart distribution.
Constrained models are not supported!
Ansley C.F., Kohn R. 1986. A note on reparameterizing a vector autoregressive moving average model to enforce stationarity. Journal of statistical computation and simulation, 24:2, 99-106.
Kalliovirta L., Meitz M. and Saikkonen P. 2016. Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.