Hi,
I'm trying to learn LCA/LPA using gsem command in Stata by walking myself through Masyn (2013) - cited in SEM example 52 - and trying to replicate the steps mentioned in her empirical examples.

In her article, it is recommended to cross validate the optimal number of classes in large samples.
In particular:
  • Divide the sample in two subsamples A and B.
  • Obtain the optimal number of classes (say K-class) in one of the sub samples; say A - using a long procedure explained in the text.
  • Estimate model (1): a K-class model in subsample B fixing all parameters to parameters obtained from a K-class model in subsample A.
  • Estimate model (2): an unrestricted K-class model in subsample B
  • Test Model (1) against Model (2).
My question is: using the @sign on each coefficient and equation separately is the only way to estimate the restricted model (1)? (Which will be time consuming in case of having large number of indicators). Or is there any other ways to do it? Moreover, in case of the LPA, one would need to fix the estimated variance and covariance as well. In particular, hw can one restrict the entire e(b) matrix to specific numbers?

Thanks in advance,
Emma


Reference:
Masyn, K. E. (2013). 25 latent class analysis and finite mixture modeling. The Oxford handbook of quantitative methods, 551.