Rob,

If 'sex' is indeed an exogenous variable (ie. predictor only), you can
simply code it as (1=male, 2=female) and use it as a covariate in any sem
model. In lavaan, you can explicitly use the argument 'fixed.x=TRUE', which
will regard all exogenous covariates as fixed variables. Their
means/variances/covariances are not included in the model estimation (so
they do not have to be normally distributed), but they are simply set at
their sample values. In essence, this is exactly what happens in ordinary
regression, when a categorical predictor is recoded as a dummy variable.

Yves.

--
View this message in context: 
http://r.789695.n4.nabble.com/binary-exogenous-variable-in-path-analysis-in-sem-or-lavaan-tp3355987p3401870.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to