5

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

Jeremy Miles
  • 13,917
  • 6
  • 30
  • 64

2 Answers2

4

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.

Dimitris Rizopoulos
  • 17,519
  • 2
  • 16
  • 37
Haututu
  • 41
  • 2
  • 3
    Its a good idea to post long answers even if a link covers it - this protects against link rot or 3rd party websites updating content. https://stats.stackexchange.com/help/how-to-answer – ReneBt Oct 19 '18 at 08:26
  • Based on the link in Dimitris' answer, I have a difficult time to understand what lavaan actually does when an endogenous variables is declared to be "ordered". For example, if there is only one endogenous variable in the model, will lavaan then estimate an ordered probit with latent factors? Similarly, it is not really clear to me how discrete measurements are treated - e.g. OpenMx is very clear that discrete measurements are assumed to be interval censored draws from a latent normal distribution. It would be great if someone who's knowledgeable could clarify what's actually going on! – A.Fischer Jul 28 '21 at 15:40
0

Ordinal and binary variables are fine in SEM.

The fact that the model does not converge is (mostly) unrelated. We need more information to diagnose that.

Jeremy Miles
  • 13,917
  • 6
  • 30
  • 64
  • Jeremy, thank you for trying to help me solve the problem. The sample size is 620, so I believe the problem is not in the sample size. Is there a specific way ordinal and binary variables should be treated prior to conducting SEM? Any help is really appreciated! – Milica Maricic Jul 24 '18 at 11:25