random_coefmats function

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

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

random_coefmats generates random VAR model coefficient matrices.

random_coefmats(d, how_many, scale)

Arguments

  • how_many: how many (dxd)(dxd) coefficient matrices AA should be drawn?
  • scale: non-diagonal elements will be drawn from mean zero normal distribution with sd=0.3/scale and diagonal elements from one with sd=0.6/scale. Larger scale will hence more likely result stationary coefficient matrices, but will explore smaller area of the parameter space. Can be for example 1 + log(2*mean(c((p-0.2)^(1.25), d))).

Returns

Returns ((howmanyd2)x1)((how_many*d^2)x1) vector containing vectorized coefficient matrices (vec(A1),...,vec(Ahowmany))(vec(A_{1}),...,vec(A_{how_many})). Note that if how_many==p, then the returned vector equals phi_{m} .

  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-02-27