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
params: a real valued vector specifying the parameter values. Should have the form θ=(ϕ1,0,...,ϕM,0,φ1,...,φM,σ,α,ν), where (see exceptions below):
ϕm,0= the (d×1) intercept (or mean) vector of the mth regime.
φm=(vec(Am,1),...,vec(Am,p))(pd2×1).
if cond_dist="Gaussian" or "Student":: σ=(vech(Ω1),...,vech(ΩM))
$(Md(d + 1)/2 \times 1)$.
if cond_dist="ind_Student" or "ind_skewed_t":: σ=(vec(B1),...,vec(BM)(Md2×1).
α= the (a×1) vector containing the transition weight parameters (see below).
if cond_dist = "Gaussian"):: Omit ν from the parameter vector.
if cond_dist="Student":: ν2 is the single degrees of freedom parameter.
if cond_dist="ind_Student":: ν=(ν1,...,νd)(d×1), νi2.
if cond_dist="ind_skewed_t":: ν=(ν1,...,νd,λ1,...,λd)(2d×1), νi2 and λi∈(0,1).
$(M - 1 \times 1)$, where $\alpha_m$ $(1\times 1), m=1,...,M-1$ are the transition weight parameters.
weight_function="logistic":: α=(c,γ)
$(2 \times 1)$, where $c\in\mathbb{R}$ is the location parameter and $\gamma >0$ is the scale parameter.
weight_function="mlogit":: α=(γ1,...,γM)((M−1)k×1), where γm(k×1), m=1,...,M−1 contains the multinomial logit-regression coefficients of the mth regime. Specifically, for switching variables with indices in I⊂{1,...,d}, and with p~∈{1,...,p} lags included, γm contains the coefficients for the vector zt−1=(1,z~min{I},...,z~max{I}), where z~i=(yit−1,...,yit−p~), i∈I. So k=1+∣I∣p~
where $|I|$ denotes the number of elements in $I$.
weight_function="exponential":: α=(c,γ)
$(2 \times 1)$, where $c\in\mathbb{R}$ is the location parameter and $\gamma >0$ is the scale parameter.
weight_function="threshold":: α=(r1,...,rM−1)
$(M-1 \times 1)$, where $r_1,...,r_{M-1}$ are the thresholds.
weight_function="exogenous":: Omit α from the parameter vector.
AR_constraints:: Replace φ1,...,φM with ψ as described in the argument AR_constraints.
mean_constraints:: Replace ϕ1,0,...,ϕM,0 with (μ1,...,μg) where μi,(d×1) is the mean parameter for group i and g is the number of groups.
weight_constraints:: If linear constraints are imposed, replace α with ξ as described in the argument weigh_constraints. If weight functions parameters are imposed to be fixed values, simply drop α
from the parameter vector.
identification="heteroskedasticity":: σ=(vec(W),λ2,...,λM), where W(d×d) and λm(d×1), m=2,...,M, satisfy Ω1=WW′ and Ωm=WΛmW′, Λm=diag(λm1,...,λmd), λmi>0, m=2,...,M, i=1,...,d.
B_constraints:: For models identified by heteroskedasticity, replace vec(W) with vec~(W)
that stacks the columns of the matrix $W$ in to vector so that the elements that are constrained to zero are not included. For models identified by non-Gaussianity, replace $vec(B_1),...,vec(B_M)$ with similarly with vectorized versions $B_m$ so that the elements that are constrained to zero are not included.
Above, ϕm,0 is the intercept parameter, Am,i denotes the ith coefficient matrix of the mth regime, Ωm denotes the positive definite error term covariance matrix of the mth regime, and Bm
is the invertible (d×d) impact matrix of the mth regime. νm is the degrees of freedom parameter of the mth regime. 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. Bvec()
is a vectorization operator that stacks the columns of a given impact matrix Bm into a vector so that the elements that are constrained to zero by the argument B_constraints are excluded.
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.
cond_dist: specifies the conditional distribution of the model as "Gaussian", "Student", "ind_Student", or "ind_skewed_t", where "ind_Student" the Student's t distribution with independent components, and "ind_skewed_t" is the skewed t distribution with independent components (see Hansen, 1994).
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".
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.
other_constraints: A list containing internally used additional type of constraints (see the options below).
**fixedlambdas(onlyif‘identification="heteroskedasticity"‘):∗∗:alengthd(M-1)numericvector(lambda{2}$$,...,lambda{M})withelementsstrictlylargerthanzerospecifyingthefixedparametervaluesfortheparameters\lambda_{mi}$ should be constrained to.
**B1constraints(onlyif‘identification="non−Gaussianity"‘):∗∗:settothestring"fixedsignandorder"toimposetheconstraintsthattheelementsofthefirstimpactmatrixB_1$ are strictly positive and that they are in a decreasing order.
all_boldA: 3D array containing the ((dp)x(dp)) "bold A" (companion form) matrices of each regime, obtained from form_boldA. Will be computed if not given.
all_Omegas: A 3D array containing the covariance matrix parameters obtain from pick_Omegas...
If cond_dist %in% c("Gaussian", "Student"):: all covariance matrices Ωm in [, , m].
If cond_dist=="ind_Student":: all impact matrices Bm of the regimes in [, , m].
weightpars: numerical vector containing the transition weight parameters, obtained from pick_weightpars.
distpars: A numeric vector containing the distribution parameters...
If cond_dist=="Gaussian":: Not used, i.e., a numeric vector of length zero.
If cond_dist=="Student":: The degrees of freedom parameter, i.e., a numeric vector of length one.
transition_weights: (optional; only for models with cond_dist="ind_Student" or identification="non-Gaussianity") A T×M matrix containing the transition weights. If cond_dist="ind_Student" checks that the impact matrix ∑m=1Mαm,t1/2Bm is invertible for all t=1,...,T.
allow_unstab: If TRUE, estimates not satisfying the stability condition are allowed. Always FALSE if weight_function="relative_dens".
stab_tol: numerical tolerance for stability of condition of the regimes: if the "bold A" matrix of any regime has eigenvalues larger that 1 - stat_tol the parameter is considered to be outside the parameter space. Note that if 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 parameter is considered to be outside the parameter space. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error.
distpar_tol: the parameter vector is considered to be outside the parameter space if the degrees of freedom parameters is not larger than 2 + distpar_tol (applies only if cond_dist="Student").
weightpar_tol: numerical tolerance for weight parameters being in the parameter space. Values closer to to the border of the parameter space than this are considered to be "outside" the parameter space.
Returns
Returns TRUE if the given parameter values are in the parameter space and FALSE otherwise. This function does NOT consider identification conditions!
Details
The parameter vector in the argument params should be unconstrained and reduced form.
References
Kheifets I.L., Saikkonen P.J. 2020. Stationarity and ergodicity of Vector STAR models. Econometric Reviews, 39 :4, 407-414.
Lütkepohl H. 2005. New Introduction to Multiple Time Series Analysis, Springer.
Lanne M., Virolainen S. 2025. A Gaussian smooth transition vector autoregressive model: An application to the macroeconomic effects of severe weather shocks. Unpublished working paper, available as arXiv:2403.14216.
Virolainen S. 2025. Identification by non-Gaussianity in structural threshold and smooth transition vector autoregressive models. Unpublished working paper, available as arXiv:2404.19707.