random_coefmats2 function

Create random stationary VAR model (dxd)(dxd) coefficient matrices AA.

Create random stationary VAR model (dxd)(dxd) coefficient matrices AA.

random_coefmats2 generates random VAR model coefficient matrices.

random_coefmats2(p, d, ar_scale = 1)

Arguments

  • p: a positive integer specifying the autoregressive order
  • ar_scale: a positive real number. Larger values will typically result larger AR coefficients.

Returns

Returns ((pd2)x1)((pd^2)x1) vector containing stationary vectorized coefficient matrices (vec(A1),...,vec(Ap)(vec(A_{1}),...,vec(A_{p}).

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. Read the cited article by Ansley and Kohn (1986) and the source code for more information.

Note that when using large ar_scale with large p or d, numerical inaccuracies caused by the imprecision of the float-point presentation may result in errors or nonstationary AR-matrices. Using smaller ar_scale facilitates the usage of larger p or d.

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.
  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-02-27

Downloads (last 30 days):