sort_and_standardize_alphas: Sort mixing weight parameters in a decreasing order and...

View source: R/parameterReforms.R

sort_and_standardize_alphasR Documentation

Sort mixing weight parameters in a decreasing order and standardize them to sum to one. For G-StMVAR models, the mixing weight parameters are sorted to a decreasing order for GMVAR and StMVAR type regimes separately.

Description

sort_and_standardize_alphas sorts mixing weight parameters in a decreasing order and standardizes them to sum to one. For G-StMVAR models, the mixing weight parameters are sorted to a decreasing order for GMVAR and StMVAR type regimes separately. Does not sort if AR constraints, lambda constraints, or same means are employed.

Usage

sort_and_standardize_alphas(
  alphas,
  M,
  model = c("GMVAR", "StMVAR", "G-StMVAR"),
  constraints = NULL,
  same_means = NULL,
  weight_constraints = NULL,
  structural_pars = NULL
)

Arguments

alphas

mixing weights parameters alphas, INCLUDING the one for the M:th regime (that is not parametrized in the model). Don't need to be standardized to sum to one.

M
For GMVAR and StMVAR models:

a positive integer specifying the number of mixture components.

For G-StMVAR models:

a size (2x1) integer vector specifying the number of GMVAR type components M1 in the first element and StMVAR type components M2 in the second element. The total number of mixture components is M=M1+M2.

model

is "GMVAR", "StMVAR", or "G-StMVAR" model considered? In the G-StMVAR model, the first M1 components are GMVAR type and the rest M2 components are StMVAR type.

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

same_means

Restrict the mean parameters of some regimes to be the same? Provide a list of numeric vectors such that each numeric vector contains the regimes that should share the common mean parameters. For instance, if M=3, the argument list(1, 2:3) restricts the mean parameters of the second and third regime to be the same but the first regime has freely estimated (unconditional) mean. Ignore or set to NULL if mean parameters should not be restricted to be the same among any regimes. This constraint is available only for mean parametrized models; that is, when parametrization="mean".

weight_constraints

a numeric vector of length M-1 specifying fixed parameter values for the mixing weight parameters \alpha_m, \ m=1,...,M-1. Each element should be strictly between zero and one, and the sum of all the elements should be strictly less than one.

structural_pars

If NULL a reduced form model is considered. Reduced models can be used directly as recursively identified structural models. For a structural model identified by conditional heteroskedasticity, should be a list containing at least the first one of the following elements:

  • W - a (dxd) matrix with its entries imposing constraints on W: NA indicating that the element is unconstrained, a positive value indicating strict positive sign constraint, a negative value indicating strict negative sign constraint, and zero indicating that the element is constrained to zero.

  • C_lambda - a (d(M-1) x r) constraint matrix that satisfies (\lambda_{2},..., \lambda_{M}) = C_{\lambda} \gamma where \gamma is the new (r x 1) parameter subject to which the model is estimated (similarly to AR parameter constraints). The entries of C_lambda must be either positive or zero. Ignore (or set to NULL) if the eigenvalues \lambda_{mi} should not be constrained.

  • fixed_lambdas - a length d(M-1) numeric vector (\lambda_{2},..., \lambda_{M}) with elements strictly larger than zero specifying the fixed parameter values for the parameters \lambda_{mi} should be constrained to. This constraint is alternative C_lambda. Ignore (or set to NULL) if the eigenvalues \lambda_{mi} should not be constrained.

See Virolainen (2022) for the conditions required to identify the shocks and for the B-matrix as well (it is W times a time-varying diagonal matrix with positive diagonal entries).

Value

Returns the given alphas in a (M x 1) vector sorted in decreasing order and their sum standardized to one. If AR constraints, lambda constraints, or same means are employed, does not sort but standardizes the alphas to sum to one. If weight_constraints are used, gives an error.

Warning

No argument checks!


gmvarkit documentation built on Nov. 15, 2023, 1:07 a.m.