50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

gmvarkit (version 2.1.4)

get_regime_means_int: Calculate regime means μm

Description

get_regime_means calculates regime means μm=(IA)(1)) from the given parameter vector.

Usage

get_regime_means_int(
  p,
  M,
  d,
  params,
  model = c("GMVAR", "StMVAR", "G-StMVAR"),
  parametrization = c("intercept", "mean"),
  constraints = NULL,
  same_means = NULL,
  weight_constraints = NULL,
  structural_pars = NULL
)

Value

Returns a (dxM) matrix containing regime mean μm in the m:th column, m=1,..,M.

Arguments

p

a positive integer specifying the autoregressive order of the model.

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.

d

the number of time series in the system.

params

a real valued vector specifying the parameter values.

For unconstrained models:

Should be size ((M(pd2+d+d(d+1)/2+2)M11)x1) and have the form θ=(υ1, ...,υM, α1,...,αM1,ν), where

  • υm =(ϕm,0,ϕm,σm)

  • ϕm=(vec(Am,1),...,vec(Am,p)

  • and σm=vech(Ωm), m=1,...,M,

  • ν=(νM1+1,...,νM)

  • M1 is the number of GMVAR type regimes.

For constrained models:

Should be size ((M(d+d(d+1)/2+2)+qM11)x1) and have the form θ=(ϕ1,0,...,ϕM,0,ψ, σ1,...,σM,α1,...,αM1,ν), where

  • ψ (qx1) satisfies (ϕ1,..., ϕM)= Cψ where C is a (Mpd2xq) constraint matrix.

For same_means models:

Should have the form θ=(μ,ψ, σ1,...,σM,α1,...,αM1,ν), where

  • μ=(μ1,...,μg) where μi is the mean parameter for group i and g is the number of groups.

  • If AR constraints are employed, ψ is as for constrained models, and if AR constraints are not employed, ψ= (ϕ1,...,ϕM).

For models with weight_constraints:

Drop α1,...,αM1 from the parameter vector.

For structural models:

Reduced form models can be directly used as recursively identified structural models. If the structural model is identified by conditional heteroskedasticity, the parameter vector should have the form θ=(ϕ1,0,...,ϕM,0,ϕ1,...,ϕM,vec(W),λ2,...,λM,α1,...,αM1,ν), where

  • λm=(λm1,...,λmd) contains the eigenvalues of the mth mixture component.

If AR parameters are constrained:

Replace ϕ1,..., ϕM with ψ (qx1) that satisfies (ϕ1,..., ϕM)= Cψ, as above.

If same_means:

Replace (ϕ1,0,...,ϕM,0) with (μ1,...,μg), as above.

If W is constrained:

Remove the zeros from vec(W) and make sure the other entries satisfy the sign constraints.

If λmi are constrained via C_lambda:

Replace λ2,..., λM with γ (rx1) that satisfies (λ2 ,..., λM)= Cλγ where Cλ is a (d(M1)xr) constraint matrix.

If λmi are constrained via fixed_lambdas:

Drop λ2,..., λM from the parameter vector.

Above, ϕm,0 is the intercept parameter, Am,i denotes the ith coefficient matrix of the mth mixture component, Ωm denotes the error term covariance matrix of the m:th mixture component, and αm is the mixing weight parameter. The W and λmi are structural parameters replacing the error term covariance matrices (see Virolainen, 2022). If M=1, αm and λmi are dropped. If parametrization=="mean", just replace each ϕm,0 with regimewise mean μm. vec() is vectorization operator that stacks columns of a given matrix into a vector. vech() stacks columns of a given matrix from the principal diagonal downwards (including elements on the diagonal) into a vector.

In the GMVAR model, M1=M and ν is dropped from the parameter vector. In the StMVAR model, M1=0. In the G-StMVAR model, the first M1 regimes are GMVAR type and the rest M2 regimes are StMVAR type. In StMVAR and G-StMVAR models, the degrees of freedom parameters in ν should be strictly larger than two.

The notation is similar to the cited literature.

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.

parametrization

"intercept" or "mean" determining whether the model is parametrized with intercept parameters ϕm,0 or regime means μm, m=1,...,M.

constraints

a size (Mpd2xq) constraint matrix C specifying general linear constraints to the autoregressive parameters. We consider constraints of form (ϕ1,...,ϕM)=Cψ, where ϕm=(vec(Am,1),...,vec(Am,p)(pd2x1),m=1,...,M, contains the coefficient matrices and ψ (qx1) contains the related parameters. For example, to restrict the AR-parameters to be the same for all regimes, set C= [I:...:I]' (Mpd2xpd2) 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 M1 specifying fixed parameter values for the mixing weight parameters αm, m=1,...,M1. 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(M1)xr) constraint matrix that satisfies (λ2,..., λM)= Cλγ where γ is the new (rx1) 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 λmi should not be constrained.

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

See Virolainen (forthcoming) 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).

Warning

No argument checks!

References

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

  • Virolainen S. (forthcoming). A statistically identified structural vector autoregression with endogenously switching volatility regime. Journal of Business & Economic Statistics.

  • Virolainen S. 2022. Gaussian and Student's t mixture vector autoregressive model with application to the asymmetric effects of monetary policy shocks in the Euro area. Unpublished working paper, available as arXiv:2109.13648.

@keywords internal