Specifying starting values from previous class in flexmix I am using the flexmix package in R to perform latent class analysis with covariates using model with 1 to 3 classes/components.
For model with 3 classes, I'd like to use coefficients from model with 2 classes as the starting values but not sure how to do that.
I know that we can use the posterior probabilities from model with same class by specifying the cluster argument, but this is only suitable for model with same number of class/component and this uses posterior probabilities not coefficients.
m2 <- flexmix(Y ~ x1+x2+x3, data = NPreg, cluster = posterior(m1), k = 3)

Is there a way I can specify starting values of coefficients from model with 1 or 2 classes?
Detailed documentation of this package can be found here: https://cran.rapporter.net/web/packages/flexmix/vignettes/mixture-regressions.pdf
 A: It is maybe late for an answer and I am no flexmix expert, but I have been using it a little bit and here is what I came with concerning your question.
First, flexmix uses an EM algorithm to estimate the model parameters (flexmix paper sec 2.1). In the M-step, we update the coefficients using the posterior class probabilities that we have so far (and maybe the previous estimates of the coefficients as well, since this is an iterative process - see however point 2 below). In the E-step, we update the posterior class probabilities.
That being said, two things may be put into evidence:

*

*It seems that flexmix starts by the M-step (here). That's why we have an argument allowing us to define the starting values of the posterior class probabilities, but not of the coefficients.

*Moreover, the default M-step of flexmix for gaussian models (called FLXMRglm) does not need coefficients as starting value. As we can see here, this solver uses a weighted least squares formula). That being said, the "and maybe the previous estimates of the coefficients" that we mentioned above does not apply for the default case, and start values for the coefficients would not be used, even if provided...

So no, we cannot choose the start values for the coefficients, but there may be something you can do to overcome that limitation.
Supposing that by using the coefficients of a 2-class model with a 3-class model you mean, for instance, taking the coefficients of class 1 (old model) for both classes 1 and 2 (new model), and taking the coefficients of class 2 (old model) to class 3 (new model), than you may choose the posterior class probabilities to emulate that behavior. This is an idea, that I will illustrate with an example:

*

*Let's say that there are 4 observations and that the final posterior class probabilities of the old model are [(0.8,0.2),(0.6,0.4),(0.7,0.3),(0.5,0.5)]

*We would then use the following starting values for the posterios class probabilities of the new model: [(0,4,0.4,0.2),(0.3,0.3,0.4),(0.35,0.35,0.3),(0.25,0.25,0.5)]
By using this trick, class 3 (new model) would have the same probabilities as class 2 (old model), while classes 1 and 2 (new model) would be "equal" and, together, represent class 1 (old model). I could not meditate about this heuristic and what it means mathematically, but here is it as an idea anyway.
