Solved – Lavaan SEM Ordinal and Categorical variables

categorical datalavaanordinal-datastructural-equation-modeling

In my model I have dichotomous variables (gender, car ownership) and ordinal variables (Income, Employment,…). My question is whether it is possible to construct latent variables using dichotomous and ordered variables? Is that a problem for the analysis? If not, how should I treat them?

I am attaching the part of the model I am trying to make for which I get the warning message: lavaan WARNING: fit measures not available if model did not converge

model <- '

socio =~ x1 + x2 + x3
eco  =~ x4 + x5 + x7

eco ~ social
'
fit <- sem(model, data=dataset2, ordered=c("x2", "x3", "x1", "x4", "x5", "x7"))

Variables x1 – x3 are dichotomous

Variables x4 – x7 are ordinal on a scale 1-5

Best Answer

Yes, there are special ways to handle ordinal and binary variables in Lavaan, you can enter them as numeric variables then when you use the sem() function you specify which are ordinal using the ordered argument.

I wrote up a longer response but then came across this link...

That should give you everything you need to know.

Related Question