I'm currently building a path analysis model with model-based corrections for measurement error, using a latent variable structural equation model (i.e., each observed variable serves as a single indicator for a latent variable representing that construct, where factor loading is set to 1.0 and error variance is fixed to a value based on a reliability estimate of that measure). While all variables in the model are continuous, I want to include sex (dummy coded 0/1) as a covariate for each path. My question is whether maximum likelihood estimators are still appropriate, even with robust variants, or whether I need to resort to using an adjusted diagonally weighted least squares estimator. I am using the 'lavaan' package in R, though I am familiar with MPlus too.
For exogenous categorical predictors, maximum likelihood estimation is fine. As long as you treat the exogenous variables as fixed, you are not modeling their distribution, so you can be agnostic about their distribution and treat them as if they were any continuous variable. If you decide to treat them as random, you can assume the binary variable is a dichotomized version of an underlying continuous normal (or logistic) latent variable and model the correlation between the underlying variable and the other observed variables in your data, in which case you would use DWLS. For sex, this doesn't really make sense, and treating it as truly binary is the best way to proceed.