Dear lavaan team,
I am conducting a path model analysis for my master thesis using lavaan. As my data is partially nested (teachers from different schools, but no school variable for parents) I tried to control for the schools by including them as cluster:
Fit <- sem(model, data=sgmd, ordered="SD24", cluster="schools", missing="listwise")
Due to one endogenous dichotomous variable, I am using DWLS estimate and listwise deletion. I was wondering now how lavaan treats my partially nested structured - R responds with a warning ("lavaan warning: cluster variable "schools" contains missing values"), but in the summary statistics, all cases are still included, and results rarely differ whether or not I include the cluster. Is the partially two-level data structur controleld even if I get the warning on missing values? Or is there another way to control for partially nested structur in lavaan?
Thank you in advance,
Elisabeth