data: a matrix or class 'ts' object with d>1 columns. Each column is taken to represent a univariate time series. Missing values are not supported.
p: a positive integer specifying the autoregressive order
M: a positive integer specifying the number of regimes
d: the number of time series in the system, i.e., the dimension
weight_function: What type of transition weights αm,t should be used?
"relative_dens":: c("alpham,t=\n", "fracalphamfm,dp(yt−1,...,yt−p+1)sumn=1Malphanfn,dp(yt−1,...,yt−p+1)"), where αm∈(0,1) are weight parameters that satisfy ∑m=1Mαm=1 and fm,dp(⋅) is the dp-dimensional stationary density of the mth regime corresponding to p
consecutive observations. Available for Gaussian conditional distribution only.
"logistic":: M=2, α1,t=1−α2,t, and α2,t=[1+exp{−γ(yit−j−c)}]−1, where yit−j is the lag j
observation of the $i$th variable, $c$ is a location parameter, and $\gamma > 0$ is a scale parameter.
"mlogit":: c("alpham,t=fracexplbracegammam′zt−1rbrace\n", "sumn=1Mexplbracegamman′zt−1rbrace"), where γm are coefficient vectors, γM=0, and zt−1(k×1) is the vector containing a constant and the (lagged) switching variables.
"exponential":: M=2, α1,t=1−α2,t, and α2,t=1−exp{−γ(yit−j−c)}, where yit−j is the lag j
observation of the $i$th variable, $c$ is a location parameter, and $\gamma > 0$ is a scale parameter.
"threshold":: αm,t=1 if rm−1<yit−j≤rm and 0 otherwise, where −∞≡r0<r1<⋯<rM−1<rM≡∞ are thresholds yit−j is the lag j
observation of the $i$th variable.
"exogenous":: Exogenous nonrandom transition weights, specify the weight series in weightfun_pars.
See the vignette for more details about the weight functions.
weightfun_pars: - If weight_function == "relative_dens":: Not used.
If weight_function %in% c("logistic", "exponential", "threshold"):: a numeric vector with the switching variable i∈{1,...,d} in the first and the lag j∈{1,...,p} in the second element.
If weight_function == "mlogit":: a list of two elements:
- **The first element `$vars`:**: a numeric vector containing the variables that should used as switching variables in the weight function in an increasing order, i.e., a vector with unique elements in $\lbrace 1,...,d \rbrace$.
- **The second element `$lags`:**: an integer in $\lbrace 1,...,p \rbrace$ specifying the number of lags to be used in the weight function.
If weight_function == "exogenous":: a size (nrow(data) - p x M) matrix containing the exogenous transition weights as [t, m] for time t and regime m. Each row needs to sum to one and only weakly positive values are allowed.
parametrization: "intercept" or "mean" determining whether the model is parametrized with intercept parameters ϕm,0 or regime means μm, m=1,...,M.
identification: is it reduced form model or an identified structural model; if the latter, how is it identified (see the vignette or the references for details)?
"reduced_form":: Reduced form model.
"recursive":: The usual lower-triangular recursive identification of the shocks via their impact responses.
"heteroskedasticity":: Identification by conditional heteroskedasticity, which imposes constant relative impact responses for each shock.
"non-Gaussianity":: Identification by non-Gaussianity; requires mutually independent non-Gaussian shocks, thus, currently available only with the conditional distribution "ind_Student".
AR_constraints: a size (Mpd2×q) constraint matrix C specifying linear constraints to the autoregressive parameters. The constraints are of the form (φ1,...,φM)=Cψ, where φm=(vec(Am,1),...,vec(Am,p))(pd2×1),m=1,...,M, contains the coefficient matrices and ψ(q×1) contains the related parameters. For example, to restrict the AR-parameters to be the identical across the regimes, set C=
[I:...:I]' (Mpd2×pd2) where I = diag(p*d^2).
mean_constraints: Restrict the mean parameters of some regimes to be identical? 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 identical 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 list of two elements, R in the first element and r in the second element, specifying linear constraints on the transition weight parameters α. The constraints are of the form α=Rξ+r, where R is a known (a×l)
constraint matrix of full column rank (a is the dimension of α), r is a known (a×1) constant, and ξ is an unknown (l×1) parameter. Alternatively , set R=0 to constrain the weight parameters to the constant r (in this case, α is dropped from the constrained parameter vector).
B_constraints: a (d×d) matrix with its entries imposing constraints on the impact matrix Bt: 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. Currently only available for models with identification="heteroskedasticity" or "non-Gaussianity" due to the (in)availability of appropriate parametrizations that allow such constraints to be imposed.
Returns
Does return anything but checks the constraints and throws an error if something is wrong.