Hi, I am working with a dataset in R's lavaan package for structural equation modelling. I have created the model and related the latent variables with observed variables. However, I am still getting an error. I tried to test my model by making a small dataframe of just the columns which will be used for regression, and I am still getting an error. Could it be because I have a few N/A values in my columns?? If yes, how do I resolve this error?? (Have included a screenshot of it)
Asked
Active
Viewed 158 times
0
-
Hi. Please don't add code and error messages as images; https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question . You will also find that you get better answer if you add a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – user20650 Sep 29 '22 at 19:17
-
1I think the way you create `new_df` will not have the names you expect -- did you look at it say, with `str(new_df)`. Is it what you expect? You could try creating it by explicitley naming the variables e.g. `data.frame(Q20=CEEW_RTS_COV$Q20, ...other variables)` – user20650 Sep 29 '22 at 19:22