The M step function of the EM algorithm for the mixture of Gaussian linear (Markov-switching) regressions as the emission distribution using the responses and covariates matrices and the estimated weight vectors
mixlm_mstep(x, wt1, wt2, resp.ind =1)
Arguments
x: the observation matrix including responses and covariates
wt1: the state probabilities matrix (number of observations times number of states)
wt2: the mixture components probabilities list (of length nstate) of matrices (number of observations times number of mixture components)
resp.ind: a vector of the column numbers of x which contain response variables. The default is 1, which means that the first column of x is the univariate response variable
Returns
list of emission (mixture of Gaussian linear regression models) parameters: (intercept, coefficients, csigma (conditional covariance) and mix.p)
Kim, C. J., Piger, J. and Startz, R. (2008). Estimation of Markov regime-switching regression models with endogenous switching. Journal of Econometrics, 143(2), 263-273.