Learn R Programming

gmvarkit (version 1.1.3)

random_ind2: Create somewhat random parameter vector of a GMVAR model that is always stationary

Description

random_ind2 generates random mean-parametrized parameter vector that is always stationary.

Usage

random_ind2(p, M, d, mu_scale, mu_scale2, omega_scale, ar_scale = 1)

Arguments

p

a positive integer specifying the autoregressive order of the model.

M

a positive integer specifying the number of mixture components.

d

the number of time series in the system.

mu_scale

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". However, input (in initpop) and output (return value) parameter vectors can be intercept-parametrized.

mu_scale2

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.

omega_scale

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.

ar_scale

a positive real number adjusting how large AR parameter values are typically generated in some random mutations. See the function random_coefmats2 for details. This is ignored when estimating constrained models.

Value

Returns 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.

Details

The coefficient matrices are generated using the algorithm proposed by Ansley and Kohn (1986) which forces stationarity. It's not clear in detail how ar_scale affects the coefficient matrices but larger ar_scale seems to result in larger AR coefficients. 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!

References

  • 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.