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.
- What exactly does this entail? Does lavaan, not like lm, just use only complete observations?
- 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?