random_covmat {gmvarkit} | R Documentation |
Create random VAR model error term covariance matrix
Description
random_covmat
generates random VAR model (dxd)
error term covariance matrix \Omega
from (scaled) Wishart distribution for reduced form models and the parameters W
,\lambda_1,...,\lambda_M
for structural models (from normal distributions).
Usage
random_covmat(d, M, omega_scale, W_scale, lambda_scale, structural_pars = NULL)
Arguments
d |
the number of time series in the system. |
M |
|
omega_scale |
a size |
W_scale |
a size |
lambda_scale |
a length If the lambda parameters are constrained with the This argument is ignored if As with omega_scale and W_scale, this argument should be adjusted carefully if specified by hand. NOTE that if lambdas are constrained in some other way than restricting some of them to be identical, this parameter should be adjusted accordingly in order to the estimation succeed! |
structural_pars |
If
See Virolainen (forthcoming) for the conditions required to identify the shocks and for the B-matrix as well (it is |
Details
Note that for StMVAR type regimes, the error term covariance matrix is consists of an ARCH type scalar that multiplies a constant covariance matrix. This function generates the constant covariance matrix part of the error term covariance matrix.
Value
- For reduced form models:
Returns a
(d(d+1)/2x1)
vector containing vech-vectorized covariance matrix\Omega
.- For structural models:
Returns a length
d^2 - n_zeros - d*(M - 1)
vector of the form(Wvec(W),\lambda_2,...,\lambda_M)
where\lambda_m=(\lambda_{m1},...,\lambda_{md})
contains the eigenvalue parameters of them
th regime(m>1)
andn_zeros
is the number of zero constraints inW
. If lambdas areC_lambda
constrained, replaced*(M - 1)
in the length withr
and\lambda_2,...,\lambda_M)
with\gamma
. Iffixed_lambdas
are used, the\lambda_{mi}
parameters are not included. The operatorWvec()
vectorizes a matrix and removes zeros.