The M step function of the EM algorithm for the Gaussian linear (Markov-switching) regression as the emission distribution using the responses and covariates matrices and the estimated weight vectors
additive_reg_mstep(x, wt, control = list(K =5, lambda0 =0.01, resp.ind =1))
Arguments
x: the observation matrix
wt: the state probabilities matrix (number of observations times number of states)
control: the parameters to control the M-step function. The simillar name is chosen with that of dnorm_additive_reg, to be used in ... argument of the hhsmmfit function. Here, it contains the following items:
K the degrees of freedom for the B-spline, default is K=5
lambda0 the initial value of the smoothing parameter, default is lambda0=0.01
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 (nonparametric mixture of splines) parameters:
Langrock, R., Adam, T., Leos-Barajas, V., Mews, S., Miller, D. L., and Papastamatiou, Y. P. (2018). Spline-based nonparametric inference in general state-switching models. Statistica Neerlandica, 72(3), 179-200.