2
$\begingroup$

I would like to use lavaan for SEM. Specifically I want to use the paper: "Original Article Maximum Likelihood for Cross-lagged Panel Models with Fixed Effects", by Paul D. Allison, Richard Williams, and Enrique Moral-Benito.

I am have however struggling to get things running (I went through al the examples, but they always deal with these perfect datasets). I would like to, bit by bit, create a better grasp of what I should do.

I have a quite large two period panel data set. The data consists of many survey questions (ordinal and categorical), some numerical data, and, not unimportantly, it has a lot of scattered NA's.

I read that for most estimations the data has to be complete.

  1. What exactly does this entail? Does lavaan, not like lm, just use only complete observations?
  2. Here, it says that if I have no full dataset, but I do have a sample covariance matrix, you can still fit your model. As explained, my dataset however has many variables, some are numerical, some are categorical, some ordinal. How do I create a sample covariance for something like that?
$\endgroup$
0
$\begingroup$
  • Yes, most estimators need complete data. If you don't have complete data, don't use one of them. I tend to use MLR the most.

  • Don't create a covariance matrix, analyze the data. (Many years ago, the analysis was a two stage process - first, create covariance matrix, then analyze it. Nowadays, you just analyze the data directly).

P.S. I have edited your question because this is true of every SEM package, not just lavaan.

$\endgroup$
  • $\begingroup$ Thank you very much for your answer (and for editing my question). Could you perhaps elaborate a little bit more on the reasoning behind your comments? With respect to the first answer, are you saying that I should not use SEM because my data is incomplete? And if so, is that because the sample (of complete observations) would no longer be random? Or are you simply saying that I should first remove all incomplete observations (of which I do not immediately see the purpose, see my comment about lm). With respect to the second answer. Do you mean that the text/link I quoted is outdated? $\endgroup$ – Tom Kisters Aug 26 '19 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.