Hello,

I am using gsem in Stata 15 for an LCA, and although I have been using Stata for some time, I am new to LCAs and sem/gsem. I would like to identify the underlying latent class variable (categorical) using 7 observed binary variables: pthink_par_qual_bin cthink_par_qual_bin know_datr felt_nlove talk_diff resp_hpe wor_depr using weighted survey data. I am working on identifying the number of classes that would be most appropriate for the data and from a theoretical standpoint, but I have 2 issues:

1. I am unable to use the command
Code:
 estat lcgof
I receive an error message that the command is unrecognized. I'm sorry I cannot provide additional details on the precise error code and message because . . .

2. I am no longer able to use gsem. I was running the following model earlier in the day:

Code:
svy: gsem (pthink_par_qual_bin cthink_par_qual_bin know_datr felt_nlove talk_diff resp_hpe wor_depr <-), logit lclass(C 2)
It ran beautifully, and I was able to compute some postestimation stats, e.g., estat lcmean, estat lcprob, etc. with no issues (but not estat lcgof). However, a few hours later I ran the same code and received the error message
Code:
����DB�ж�V���_�C�P��W�H� invalid name
invalid syntax
invalid syntax
an error occurred when svy executed gsem
r(198);
I tried shutting Stata and the computer down, restarting, installing available updates, but nothing has worked. It is the exact same code and exact same data, so I do not understand why it will not run. (Also, I tried running it without using the survey prefix, but this did not help at all.)

Does anyone have any ideas what may be going on and how I can fix it?

Thank you in advance!