Hi there, I am trying to look at the typologies of food outlets (within 1km from home) and eating behaviours. To do so, I have used the gsem command to fit a latent class model (I have ran the AIC BIC test and a three-class model deemed to be best fit):
gsem (supermarket butcher conveniencestore bakery fastfood cafe<-), logit lclass(c 3)
estat lcprob
estat lcmean
The next step is to examine the association between the 3 typologies and eating behaviour (continous outcome).
I got stuck on this step. I've tried different ways of modelling but kept getting error messages
e.g.
. gsem ( fruit_consumption -> lsupermarket butcher conveniencestore bakery fastfood cafe, logit), lclass(c 3)
option lclass() not allowed;
option lclass() is not allowed with models specified with continuous latent variables
Can anyone help assist with the second step? Is there a way to save each typology and run a regression separately?
Thanks in advance.
Related Posts with How to save each Latent Class model (n=3) as predictor to run a regression model?
Missing marital status between yearsHi all, What I am trying to do is identify all people who have reported being married but for two o…
Help: Can't format xtline plotDear community, I'm having three simple issues with with an 'xtline' plot. My plot looks as follow…
Stata not storing my matrix in MataHi all, I am running the code of DLW (2012) with using Stata 15. The command is meant to generate a…
Deflating Brent Crude Oil Prices ($US) with US CPII currently have Brent Crude Oil prices in US dollars. However, I'd like to deflate it with US CPI s…
Loop?I want to replicate this code up to stateid==32; from 1 to 32. How can I do this without typing it o…
Subscribe to:
Post Comments (Atom)
0 Response to How to save each Latent Class model (n=3) as predictor to run a regression model?
Post a Comment