Create a class “tsregime
” object composed of: \(Y_t\) and \(X_t\) stochastics processes such that \(Y_t=[Y_{1t},...,Y_{kt}]\)', \(X_t=[X_{1t},...,X_{\nu t}]'\) and \(Z_t\) is a univariate process. Where \(Y_t\) follows a MTAR model with threshold variable \(Z_t\)
$$
Y_t= \Phi_{0}^(j)+\sum_{i=1}^{p_j}\Phi_{i}^{(j)} Y_{t-i}+\sum_{i=1}^{q_j} \beta_{i}^{(j)} X_{t-i} + \sum_{i=1}^{d_j} \delta_{i}^{(j)} Z_{t-i}+ \Sigma_{(j)}^{1/2} \epsilon_{t}
$$
$$if r_{j-1}< Z_t \leq r_{j}$$
Missing data is allowed for processes \(Y_t\), \(X_t\) and \(Z_t\) (can then be estimated with “mtarmissing
” function). In the case of known r, the output returns the percentages of observations found in each regimen.