Hello everyone, I'm conducting a DCE, and i am trying to run multiple latent class models with the command lclogit, as described by Pacifico, D. and Yoo, H. (2013), so as to choose the one that has better BIC and CAIC. The intention is to have a table with all the BIC and CAIC so as to compare, but I keep getting a notation error , although I am following the exact commands as described in the paper
But i keep getting the "option nclasses() invalid" error message. When I run individual lclogits models, manually choosing the number of "Nclasses" (i did it for 3 4 and 5) the code runs, but I am trying to get it in one go and within one table.
I would much appreciate any input ! My idea after choosing the right number of latent class models is to proceed to play with restrictions of coefficients so as to simulate attribute non-attendance (and compare results with eaalogit model)
Best regards,
Michael
Code:
forvalues c = 2/10 { lclogit choice bycatch freshness origin fcert , group(card) id(id) nclasses(`c´) membership( age sex educ inc ) seed(1234567890) matrix b = e(b) matrix ic = nullmat(ic)\`e(nclasses)´,`e(ll)´,`=colsof(b)´,`e(caic)´,`e(bic)´ } matrix colnames ic = "Classes" "LLF" "Nparam" "CAIC" "BIC" matlist ic, name(columns)
I would much appreciate any input ! My idea after choosing the right number of latent class models is to proceed to play with restrictions of coefficients so as to simulate attribute non-attendance (and compare results with eaalogit model)
Best regards,
Michael
Comment