in_paramspace_int {gmvarkit}R Documentation

Determine whether the parameter vector lies in the parameter space

Description

in_paramspace_int checks whether the parameter vector lies in the parameter space.

Usage

in_paramspace_int(
  p,
  M,
  d,
  params,
  model = c("GMVAR", "StMVAR", "G-StMVAR"),
  all_boldA,
  alphas,
  all_Omega,
  W_constraints = NULL,
  stat_tol = 0.001,
  posdef_tol = 1e-08,
  df_tol = 1e-08
)

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)((M(pd^2+d+d(d+1)/2+2)-M1-1)x1) and have the form θ\theta= = (υ\upsilon1_{1}, ...,υ\upsilonM_{M}, α1,...,αM1,\alpha_{1},...,\alpha_{M-1},ν\nu)), where

  • υ\upsilonm_{m} =(ϕm,0, = (\phi_{m,0},ϕ\phim_{m},σm),\sigma_{m})

  • ϕ\phim_{m}=(vec(Am,1),...,vec(Am,p) = (vec(A_{m,1}),...,vec(A_{m,p})

  • and σm=vech(Ωm)\sigma_{m} = vech(\Omega_{m}), m=1,...,M,

  • ν\nu=(νM1+1,...,νM)=(\nu_{M1+1},...,\nu_{M})

  • M1M1 is the number of GMVAR type regimes.

For constrained models:

Should be size ((M(d+d(d+1)/2+2)+qM11)x1)((M(d+d(d+1)/2+2)+q-M1-1)x1) and have the form θ\theta=(ϕ1,0,...,ϕM,0, = (\phi_{1,0},...,\phi_{M,0},ψ\psi, σ1,...,σM,α1,...,αM1,\sigma_{1},...,\sigma_{M},\alpha_{1},...,\alpha_{M-1},ν\nu), where

  • ψ\psi (qx1)(qx1) satisfies (ϕ\phi1_{1},...,,..., ϕ\phiM)=_{M}) = CψC \psi where CC is a (Mpd2xq)(Mpd^2xq) constraint matrix.

For same_means models:

Should have the form θ\theta=( = (μ\mu,ψ\psi, σ1,...,σM,α1,...,αM1,\sigma_{1},...,\sigma_{M},\alpha_{1},...,\alpha_{M-1},ν\nu)), where

  • μ\mu=(μ1,...,μg)= (\mu_{1},...,\mu_{g}) where μi\mu_{i} is the mean parameter for group ii and gg is the number of groups.

  • If AR constraints are employed, ψ\psi is as for constrained models, and if AR constraints are not employed, ψ\psi= = (ϕ\phi1_{1},...,,...,ϕ\phiM)_{M}).

For models with weight_constraints:

Drop α1,...,αM1\alpha_1,...,\alpha_{M-1} 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 θ\theta=(ϕ1,0,...,ϕM,0, = (\phi_{1,0},...,\phi_{M,0},ϕ\phi1,...,_{1},...,ϕ\phiM,vec(W),_{M}, vec(W),λ\lambda2,...,_{2},...,λ\lambdaM,α1,...,αM1,_{M},\alpha_{1},...,\alpha_{M-1},ν\nu)), where

  • λ\lambdam=(λm1,...,λmd)_{m}=(\lambda_{m1},...,\lambda_{md}) contains the eigenvalues of the mmth mixture component.

If AR parameters are constrained:

Replace ϕ\phi1_{1},...,,..., ϕ\phiM_{M} with ψ\psi (qx1)(qx1) that satisfies (ϕ\phi1_{1},...,,..., ϕ\phiM)=_{M}) = CψC \psi, as above.

If same_means:

Replace (ϕ1,0,...,ϕM,0)(\phi_{1,0},...,\phi_{M,0}) with (μ1,...,μg)(\mu_{1},...,\mu_{g}), as above.

If WW is constrained:

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

If λmi\lambda_{mi} are constrained via C_lambda:

Replace λ\lambda2,...,_{2},..., λ\lambdaM_{M} with γ\gamma (rx1)(rx1) that satisfies (λ\lambda2_{2} ,...,,..., λ\lambdaM)=_{M}) = CλγC_{\lambda} \gamma where CλC_{\lambda} is a (d(M1)xr)(d(M-1) x r) constraint matrix.

If λmi\lambda_{mi} are constrained via fixed_lambdas:

Drop λ\lambda2,...,_{2},..., λ\lambdaM_{M} from the parameter vector.

Above, ϕm,0\phi_{m,0} is the intercept parameter, Am,iA_{m,i} denotes the iith coefficient matrix of the mmth mixture component, Ωm\Omega_{m} denotes the error term covariance matrix of the mm:th mixture component, and αm\alpha_{m} is the mixing weight parameter. The WW and λmi\lambda_{mi} are structural parameters replacing the error term covariance matrices (see Virolainen, 2022). If M=1M=1, αm\alpha_{m} and λmi\lambda_{mi} are dropped. If parametrization=="mean", just replace each ϕm,0\phi_{m,0} with regimewise mean μm\mu_{m}. vec()vec() is vectorization operator that stacks columns of a given matrix into a vector. vech()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=MM1=M and ν\nu is dropped from the parameter vector. In the StMVAR model, M1=0M1=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 ν\nu 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.

all_boldA

3D array containing the ((dp)x(dp))((dp)x(dp)) "bold A" matrices related to each mixture component VAR-process, obtained from form_boldA. Will be computed if not given.

alphas

(Mx1) vector containing all mixing weight parameters, obtained from pick_alphas.

all_Omega

3D array containing all covariance matrices Ωm\Omega_{m}, obtained from pick_Omegas.

W_constraints

set NULL for reduced form models. For structural models, this should be the constraint matrix WW from the list of structural parameters.

stat_tol

numerical tolerance for stationarity of the AR parameters: if the "bold A" matrix of any regime has eigenvalues larger that 1 - stat_tol the model is classified as non-stationary. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error.

posdef_tol

numerical tolerance for positive definiteness of the error term covariance matrices: if the error term covariance matrix of any regime has eigenvalues smaller than this, the model is classified as not satisfying positive definiteness assumption. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error.

df_tol

the parameter vector is considered to be outside the parameter space if all degrees of freedom parameters are not larger than 2 + df_tol.

Details

The parameter vector in the argument params should be unconstrained and it is used for structural models only.

Value

Returns TRUE if the given parameter values are in the parameter space and FALSE otherwise. This function does NOT consider the identifiability condition!

References

@keywords internal


[Package gmvarkit version 2.1.2 Index]