Dear Statalist,
When I try to conduct a latent class analysis (LCA) with
some multiclass categorical variables
in Stata 15. I have some problems.I have four variables(income5q/edu/occ/housource
) that are three or five category. Because they are neither binary nor continuous, when I type:. gsem(income5q edu occ housource <- ), lclass(C 3)
.estimates store threeclass
.estat lcprob
.estat lcmean
.estat lcgof
I got the output results:
. estat lcprob
Latent class marginal probabilities Number of obs = 6,338
--------------------------------------------------------------
| Delta-method
| Margin Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
C |
1 | .4156174 .0066401 .4026647 .4286877
2 | .5217023 .009338 .5033792 .5399671
3 | .0626803 .0072906 .049822 .0785828
--------------------------------------------------------------
. estat lcmean
Latent class marginal means Number of obs = 6,338
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1 |
income5q | .6024641 .0147057 40.97 0.000 .5736414 .6312867
edu | 2.182525 .0133417 163.59 0.000 2.156376 2.208675
occ | 3.199904 .0142397 224.72 0.000 3.171995 3.227814
housource | 3.295172 .0233982 140.83 0.000 3.249312 3.341032
-------------+----------------------------------------------------------------
2 |
income5q | 3.281452 .013222 248.18 0.000 3.255538 3.307367
edu | 2.11298 .0165082 128.00 0.000 2.080625 2.145336
occ | 3.210702 .0146888 218.58 0.000 3.181913 3.239492
housource | 3.664078 .0220479 166.19 0.000 3.620865 3.707291
-------------+----------------------------------------------------------------
3 |
income5q | 3.442805 .0471244 73.06 0.000 3.350443 3.535167
edu | 3.328121 .0636223 52.31 0.000 3.203423 3.452818
occ | 2.302029 .0729742 31.55 0.000 2.159002 2.445055
housource | 3.593194 .0847707 42.39 0.000 3.427046 3.759341
------------------------------------------------------------------------------
. estat lcgof
----------------------------------------------------------------------------
Fit statistic | Value Description
---------------------+------------------------------------------------------
Information criteria |
AIC | 67769.182 Akaike's information criterion
BIC | 67890.759 Bayesian information criterion
----------------------------------------------------------------------------
My problems are:
1. How can I get the l
atent class marginal means of each category of the multivariate variables? Should I re
coded the four variables as binary (0 and 1)?2. When I typed "estat lcgof" I only got AIC and BIC, how can I get G², p and para etc.index that can show the goodness of fit?
Thanks,
Comment