Creating a covariance matrix for SEM

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?

• 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? – Tom Kisters Aug 26 '19 at 19:28