Closed zstickley closed 9 months ago
I ran into the same issue with cfa.mi giving "Error in if (categorical.flag) { : argument is of length zero" when summary is called.
This is probably a result of lavaan's upgrade to version 0.6-17. semTools worked (and still works) fine with lavaan 0.6-16. The following is reproducible code.
require(remotes) install_version("lavaan", version = "0.6-16", repos = "http://cran.us.r-project.org") library(semTools) library(Amelia) ceer_parent_amelia <- amelia(ss, m = 5, ncpus = 11) imputes <- ceer_parent_amelia$imputations
CEER_Model <- ' dysreg =~ temper + argues + blame + touchy + spiteful + uncooperative + moodswing + frustrated + irritable '
ceer_by_sex_parent <- cfa.mi(CEER_Model, data = imputes, group = "male", estimator = "DWLS")
summary(ceer_by_sex_parent) lavaan.mi object based on 5 imputed data sets. See class?lavaan.mi help page for available methods.
Convergence information: The model converged on 5 imputed data sets
Rubin's (1987) rules were used to pool point and SE estimates across 5 imputed data sets, and to calculate degrees of freedom for each parameter's t test and CI.
Parameter Estimates:
Standard errors Standard Information Expected Information saturated (h1) model Unstructured
. . . rest of the output follows .......
Yes, that bug should be resolved now. Try installing the latest software:
remotes::install_github("yrosseel/lavaan")
remotes::install_github("simsem/semTools/semTools")
Thanks so much. I confirm that semTools 0.5-6.933 work with lavaan 0.6-18.1989. Much appreciated!
This update works for me as well. Thank you very much!
Hello everyone!
I've been running into an issue recently when running CFA models on imputed data. Whenever I run summary() on the fit object from cfa.mi, I get model fit information but not parameter estimates. Instead, I receive the following error:
I made sure that I'm using the most current versions of R (4.3.2), lavaan (0.6-17), and semTools (0.5-6).
Here is a reproducible example: