I have a large dataset for which I have run a FMM model. I have realized that there are two latent classes in my dataset. I was curious to know what portion of my obs falls into each class. I followed Stata documentations, and I used the following piece of code:
Code:
estat lcprob
| Latent class marginal probabilities Number of obs = 2,382,941 | |||||
| -------------------------------------------------------------- | |||||
| | Delta-method | |||||
| | Margin Std. Err. [95% Conf. Interval] | |||||
| -------------+------------------------------------------------ | |||||
| Class | | |||||
| 1 | .7623763 .0021933 .7580509 .7666482 | |||||
| 2 | .2376237 .0021933 .2333518 .2419491 | |||||
| -------------------------------------------------------------- | |||||
Then, I calculated class posteriors by the following code to see the likelihood of class membership of each obs:
Code:
predict P, classposteriorpr
Code:
generate lgroup = P < 0.5 tab lgroup
| lgroup | Freq. ---- Percent ---- Cum. | |||
| ------------+----------------------------------- | |||
| 0 | 2,217,252 ----- 93.05 ---- 93.05 | |||
| 1 | 165,694 - ------ 6.95 ----- 100.00 | |||
| ------------+----------------------------------- | |||
| Total | 2,382,946 ------ 100.00 | |||
Do you see the issue? The percentage that I get here do not match with what I got lcprob command which is strange. A little bit of difference is fine but not this much!
I need help!
Thanks in advance
0 Response to FMM Class Probabilities
Post a Comment