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?
What does 'egen newvar=cut(var), group(#)' meanDear Stata users, In the funtion -egen-, we can invoke -egen newvar=cut(var), group(#)- to generate…
how to obtain probability of point estimates in a two equation poisson models Code: * Example generated by -dataex-. To install: ssc install dataex clear input byte(y1 y2) float…
Smoothed plot using margins, marginsplotHi there! Does anyone know how to smooth a plot using margins and marginsplot? I ran the following…
Kernel matching - propensity scoresHi I have a few questions regarding Propensity Scores Matching with Kernel Matching. 1) If there ar…
Rolling regression for two independent variables from panel dataHello everyone, I am new to stata and for my dissertation I have panel data that looks like this. es…
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