SEM with categorical complex survey data adjusting for cluster effect My data comes from a two stage stratified cluster sample. There are some categorical (ordinal) manifest (dependent/endogenous) variables. I believe these variables can be divided into three major groups and are manifested by three factors, such as 'economic independence', 'self-esteem' etc. which can also be related to each other. Some covariates and independent factors are also there which are supposed to be associated with these latent variables and manifest variables. I want to adjust for clustering and check for some statistical causal relationships among the latent factors and variables. As the data are supposed to have clustering, I want to adjust for the cluster effect as well. Could you tell me about the issues I should consider regarding such an analysis? I suppose there can also be a stratum effect. 
I wanted to perform Structural Equation Modelling (SEM) with categorical survey data. I found gsem function in Stata that can do it. But it takes too long, and I even wonder if it can handle complicated analysis with many variables. I also observe that it has some memory usage problem. If I want to account for clustering, survey nature of the data and at the same time want to perform SEM with some categorical variables, is there any other software available? Sections & Interest Groups suggests Mplus supports only continuous variables. I have also checked laavan-survey package in R. But that also only supports continuous data. Please correct me if I am wrong.
 A: You can fit a SEM model, while accounting for weights, stratification and the full sampling design if you have enough information from the survey data. If you use MPLUS you can fit a SEM model with either binary, ordinal, nominal or continuous indicators.  You can check the following MPLUS note to see some common specifications for complex sample survey.
The key issues is to distinguish the total weight, cluster, strata variables and to specify your indicators as categorical or nominal, or else, depending on what do you want to test. Additionally, you need to specify your method for variance estimation. Could be jackknife, balance replicated, bootstrap, taylor linearization, or else. 
Not sure if lavaan.survey can handle ordinal/categorical variables, yet lavaan can fit SEM with ordinal/categorical indicators, using a WLSMV estimator. Since the first depends on the second, I wouldn't be surprise if you can fit a SEM/path model with ordinal indicators.
I haven't used gsem in STATA so cannot comment on that option.
