Hi everybody.
I'm currently estimating a Finite Mixture Model (FMM) with Stata 15. My model is of the form:
fmm 2, lcprob(z1 z2): regress y1 x1 x2
My model has way more covariates, but the syntax is to set ideas.
What I want to do is the following:
1. Estimate the model
fmm 2: regress y1 x1 x2
2. Store the values of the parameters, both of x1 and x2 for each regime, and for the latent class probabilities.
3. Estimate the model
fmm 2, lcprob(z1 z2): regress y1 x1 x2
But using as initial values for the class probabilities and for the parameters the output of the previous regressions (which I stored in step 2).
Could anyone help me on this? FMM has an option of the form startv(g1 g2), where g1 and g2 are variables that contain the class probabilities for each observation. I tried running this option, but the log-likelihood reports a discontinuity in the second iteration. Besides, this only allows me to set as initial values the class probabilities, and not the values of the parameters x1 and x2, which I also want.
Thanks!
Alejandro.
I'm currently estimating a Finite Mixture Model (FMM) with Stata 15. My model is of the form:
fmm 2, lcprob(z1 z2): regress y1 x1 x2
My model has way more covariates, but the syntax is to set ideas.
What I want to do is the following:
1. Estimate the model
fmm 2: regress y1 x1 x2
2. Store the values of the parameters, both of x1 and x2 for each regime, and for the latent class probabilities.
3. Estimate the model
fmm 2, lcprob(z1 z2): regress y1 x1 x2
But using as initial values for the class probabilities and for the parameters the output of the previous regressions (which I stored in step 2).
Could anyone help me on this? FMM has an option of the form startv(g1 g2), where g1 and g2 are variables that contain the class probabilities for each observation. I tried running this option, but the log-likelihood reports a discontinuity in the second iteration. Besides, this only allows me to set as initial values the class probabilities, and not the values of the parameters x1 and x2, which I also want.
Thanks!
Alejandro.
Comment