Latent Class Analysis with lclogit and gllamm-wrapper lclogitml

#1
Latent Class Analysis in Stata (llclogit, lclogitml, gllamm)

Hi all,

I am having trouble fitting a latent class model with Stata.

I have a panel data set from an online discrete choice experiment. Each respondent was represented 12 choice sets with 2 alternatives and, therefore, had to make 12 choice decisions. One alternative was described by 8 attributes (3 attributes with 3 levels and 5 attributes with 6 levels). In the long formatted data set one respondent comprises 24 rows. Each row means one observation. All in all there are 13464 oservations (N=561 * 24 rows). Attributes were effects-coded. With L-1 parameter for each attribute I have 31 paramater for the model.

First I tried to fit a conditional logit model which worked fine:

.clogit choice V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V30 V31, group(CsetID)

Then I used the module lclogit in order to estimate a latent class model:

.lclogit choice V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V30 V31, group(CsetID) id(RespID) nclasses(2)

Afterwards I applied post-estimation command lclogitml (gllamm-wrapper) to get standard errors which worked fine too.

But then I failed doing the same for a latent class model with 3 classes. I repeated lclogit-procedure with nclasses(3). After recalling lclogitml command gllamm stopped initializing process with error message "equation z2_5_3 not found".

Code:
. lclogitml
-gllamm- is initializing. This process may take a few minutes.
[COLOR="red"]equation z2_5_3 not found[/COLOR]
[COLOR="blue"]r(111);[/COLOR]
I hope somebody can help me understand why I get this error message and gllamm does not proceed. (Using a different data set from another survey and a different computer gllamm came up with the same error.)

Thanks.

Andrew
 
Last edited: