Stata Multilevel SEM
Multilevel models can only be fit by -gsem-.
Contents
Example
A multilevel SEM is best understood as an extension of a 'normal' SEM. This is a model of mathematical ability, which is measured by 8 math questions. These individuals' scores are predicted by the latent ability.
use https://www.stata-press.com/data/r19/gsem_cfa gsem (MathAb -> q1-q8), logit
Now consider extending the model with a school effect. There is now a latent variable which is constant within a cluster, but varies across clusters.
use https://www.stata-press.com/data/r19/gsem_cfa gsem (MathAb M1[school] -> q1-q8), logit
