Learn R Programming

gmvarkit (version 1.1.1)

random_ind: Create somewhat random mean-parametrized parameter vector of GMVAR model, that may not be stationary!

Description

random_ind generates random mean-parametrized parameter vector that may not be stationary

Usage

random_ind(p, M, d, constraints = NULL, mu_scale, mu_scale2, omega_scale)

Arguments

p

a positive integer specifying the autoregressive order of the model.

M

a positive integer specifying the number of mixture components.

d

number of time series in the system.

constraints

a size \((Mpd^2 x q)\) constraint matrix \(C\) specifying general linear constraints to the autoregressive parameters. We consider constraints of form (\(\phi\)\(_{1}\)\(,...,\)\(\phi\)\(_{M}) = \)\(C \psi\), where \(\phi\)\(_{m}\)\( = (vec(A_{m,1}),...,vec(A_{m,p}) (pd^2 x 1), m=1,...,M\) contains the coefficient matrices and \(\psi\) \((q x 1)\) contains the constrained parameters. For example, to restrict the AR-parameters to be the same for all regimes, set \(C\)= [I:...:I]' \((Mpd^2 x pd^2)\) where I = diag(p*d^2). Ignore (or set to NULL) if linear constraints should not be employed.

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", but input (in initpop) and output (return value) parameter vectors may 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.

Value

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.

References

  • Kalliovirta L., Meitz M. and Saikkonen P. 2016. Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.