Dear Statalist,
I tried the latent class model with lclogit2 and lclogitml2 a few weeks ago.
The codes were as follows;
egen newgid = group(pid gid)
lclogit2 choice, rand(per tax sup audit fee type_obl contr_assoc contr_conglo) membership(ec_sales indus size) id(pid) group(newgid) ncl(4)
Now, I want to compare the results from lclogit2 with ones from mixed logit model by using cmmixlogit package.
And the codes are as follows;
cmset pid choice
cmmixlogit choice, rand(per tax sup audit fee type_obl contr_assoc contr_conglo) casevars(i.ec_sales indus size)
The questionnaire that I made has six questions(=gid) for each respondent(=pid).
And each question(=gid) has three alternatives.
While the text from per to contr_conglo) in the second code are the alternative-specific variables, ec_sales, indus and size are the case-specific variables.
But when I executed the first code, I got the message as follows;
. cmset pid choice
at least one choice set has more than one instance of the same alternative
r(459);
Any help would be greatly appreciated.
Thank you.
I tried the latent class model with lclogit2 and lclogitml2 a few weeks ago.
The codes were as follows;
egen newgid = group(pid gid)
lclogit2 choice, rand(per tax sup audit fee type_obl contr_assoc contr_conglo) membership(ec_sales indus size) id(pid) group(newgid) ncl(4)
Now, I want to compare the results from lclogit2 with ones from mixed logit model by using cmmixlogit package.
And the codes are as follows;
cmset pid choice
cmmixlogit choice, rand(per tax sup audit fee type_obl contr_assoc contr_conglo) casevars(i.ec_sales indus size)
The questionnaire that I made has six questions(=gid) for each respondent(=pid).
And each question(=gid) has three alternatives.
While the text from per to contr_conglo) in the second code are the alternative-specific variables, ec_sales, indus and size are the case-specific variables.
But when I executed the first code, I got the message as follows;
. cmset pid choice
at least one choice set has more than one instance of the same alternative
r(459);
Any help would be greatly appreciated.
Thank you.
Comment