I have run a latent class model with a discrete choice experiment data (9882 observations) using the lclogit package written by Pacifico and Yoo (http://www.stata-journal.com/article.html?artic).
I would like to ask two questions:
- Why Stata shows me the model fit indicators of 2-7 classes multiple times? (I have a few guesses but I'd like to confirm)
Should I choose the 4-classes model? (see code below) Besides, if I remove all the membership variables, the best model is the 3-classes model.
- I have another model which can't converge if the number of classes is more than 5. In this case, should I use a 4-classes model if it is the best fit model?
Any thoughts and suggestions are greatly appreciated.
Many thanks!
Best,
Gengyang
Code:
. forvalues c = 2/7 {
2. quietly lclogit choice price attribute2 attribute3 attribute4 attribute5 attribute6, group(group) id(id) nclasses(`c') membe
> rship(x1 x2 x3 x4 x5 x6)
3. matrix b = e(b)
4. matrix ic = nullmat(ic) \ `e(nclasses)', `e(ll)',`=colsof(b)', `e(aic)', `e(caic)', `e(bic)'
5. }
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
Warning: variance matrix is nonsymmetric or highly singular
.
. matrix colnames ic = "Classess" "LLF" "Nparam" "AIC" "CAIC" "BIC"
.
. matlist ic, name(columns)
Classess LLF Nparam AIC CAIC BIC
-----------------------------------------------------------------
2 -2856.544 19 5751.088 5851.941 5832.941
3 -2809.69 31 5681.381 5845.932 5814.932
4 -2734.25 43 5554.501 5782.749 5739.749
5 -2703.635 55 5517.269 5809.215 5754.215
2 -2856.544 19 5751.088 5851.941 5832.941
3 -2809.691 31 5681.381 5845.932 5814.932
4 -2758.73 43 5603.461 5831.709 5788.709
5 -2705.848 55 5521.696 5813.642 5758.642
6 -2681.539 67 5497.077 5852.72 5785.72
7 -2657.916 79 5473.832 5893.172 5814.172
2 -2856.544 19 5751.088 5851.941 5832.941
3 -2809.691 31 5681.381 5845.932 5814.932
4 -2758.73 43 5603.461 5831.709 5788.709
5 -2705.848 55 5521.696 5813.642 5758.642
6 -2681.539 67 5497.077 5852.72 5785.72
7 -2657.914 79 5473.828 5893.168 5814.168
2 -2848.066 20 5736.131 5842.293 5822.293
3 -2799.096 33 5664.193 5839.36 5806.36
4 -2746.507 46 5585.015 5829.187 5783.187
5 -2692.474 59 5502.948 5816.126 5757.126
6 -2670.848 72 5485.697 5867.88 5795.88
7 -2641.101 85 5452.203 5903.391 5818.391
2 -2846.607 24 5741.214 5868.608 5844.608
3 -2796.342 41 5674.683 5892.316 5851.316
4 -2740.002 58 5596.004 5903.874 5845.874
5 -2684.407 75 5518.814 5916.922 5841.922
6 -2659 92 5502 5990.346 5898.346
7 -2627.486 109 5472.972 6051.555 5942.555
0 Response to Latent class logit with lclogit: problem with choosing the number of classes
Post a Comment