Latent class analysis using runmplus with Stata

#1
Latent class analysis using gllamm or runmplus with Stata

I would like to perform a latent class analysis on my dataset using the runmplus package in Stata.
Briefly this is what my database looks like

N=6000

ID age gender [continuous variables] var1-var5 [binary variables] var6-var10

Following a theory I would like to group the subjects into three or four groups with subsequent probability to be in each of the group according to the different independent variables.


I would also like to add a second level of analysis where I also consider the sub-domains of var5 (8 in total var5_1-var5_8) but this is something that will come later.

I am struggling with running the LCA in Stata using the runmplus, what would the code be?
 
Last edited:
#2
I am also trying to do the same using gllamm (which seems to give less problems in Stata when trying to perform a LCA). I normally use gllamm for some multilevel analyses but never used it for LCA and all the examples I am finding consider a dependent variable y while in my case there is no dependent variable, only independent variables that I should use to define my latent class variable.

Thanks for the help!