y: a (T-p x q) matrix of observations.
X: a (T-p x p*q + const) matrix of lagged observations with a leading column of 1s.
x: a (T-p x p*q) matrix of lagged observations.
fitted: a (T x q) matrix of fitted values.
resid: a (T-p x q) matrix of residuals.
intercept: a (k x q) matrix of estimated intercepts of each process.
mu: a (k x q) matrix of estimated means of each process.
beta: a list containing k separate ((1 + p) x q) matrix of estimated coefficients for each regime.
phi: estimates of autoregressive coefficients.
Fmat: Companion matrix containing autoregressive coefficients.
stdev: List with k (q x q) matrices with estimated standard deviation on the diagonal.
sigma: List with k (q x q) matrices with estimated covariance matrix.
theta: vector containing: mu and vech(sigma).
theta_mu_ind: vector indicating location of mean with 1 and 0 otherwise.
theta_sig_ind: vector indicating location of variance and covariances with 1 and 0 otherwise.
theta_var_ind: vector indicating location of variances with 1 and 0 otherwise.
theta_P_ind: vector indicating location of transition matrix elements with 1 and 0 otherwise.
stationary: Boolean indicating if process is stationary if TRUE or non-stationary if FALSE.
n: number of observations (same as T).
p: number of autoregressive lags.
q: number of series.
k: number of regimes in estimated model.
P: a (k x k) transition matrix.
pinf: a (k x 1) vector with limiting probabilities of each regime.
St: a (T x k) vector with smoothed probabilities of each regime at each time t.
deltath: double with maximum absolute difference in vector theta between last iteration.
iterations: number of EM iterations performed to achieve convergence (if less than maxit).
theta_0: vector of initial values used.
init_used: number of different initial values used to get a finite solution. See description of input maxit_converge.
msmu: Boolean. If TRUE model was estimated with switch in mean. If FALSE model was estimated with constant mean.
msvar: Boolean. If TRUE model was estimated with switch in variance. If FALSE model was estimated with constant variance.
control: List with model options used.
logLike: log-likelihood.
AIC: Akaike information criterion.
BIC: Bayesian (Schwarz) information criterion.
Hess: Hessian matrix. Approximated using hessian and only returned if getSE=TRUE.
info_mat: Information matrix. Computed as the inverse of -Hess. If matrix is not PD then nearest PD matrix is obtained using nearest_spd. Only returned if getSE=TRUE.
nearPD_used: Boolean determining whether nearPD function was used on info_mat if TRUE or not if FALSE. Only returned if getSE=TRUE.
theta_se: standard errors of parameters in theta. Only returned if getSE=TRUE.
trace: List with Lists of estimation output for each initial value used due to use_diff_init > 1.