Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: gllamm -- latent classes

From   "E. Michael Foster" <>
Subject   st: gllamm -- latent classes
Date   Wed, 11 May 2005 11:24:54 -0400

I've worked with a bunch of software, so I can't believe I can't figure out -gllamm--. I found some examples on the web, but I still can't figure out what I want. Part of the confusion seems to stem from the fact that one can estimate the latent class models in several ways. Anyway, here's what I have

I have a test that's administered four times. One passes or fails, so -test- is dichotomous.

foreach x in 1 4 7 10 { /* generate dummies -- same as -xi- */
gen admin`x'=admin==`x'
eq admin`x' : admin`x'

# delimit ;
xi: gllamm test , i(person)
nrf(4) eqs(admin1 admin4 admin7 admin10) /* four RE corresponding to four administrations */
weight(wt) /* I stacked my data up to improve the speed */
ip(f) nip(2) /* two latent classes */
link(logit) family(bin) trace nocons ;

I think (or hope) this is right, though I am having a problem with the starting values. I can fix that, I think.

I'd like to do two other things, assuming I can get this `simple' model to work.

I want to
- examine whether a third class is present in the data
- add a predictor of class membership


Michael Foster
Professor of Health Policy

* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index