Closed MarkHuisman-jme closed 1 month ago
Error in if (categorical.flag) { : argument is of length zero
If you install the GitHub version, this has been resolved. But the lavaan.mi
functionality has been deprecated. I have updated much functionality in the new lavaan.mi
package, which you can also install from GitHub: https://github.com/TDJorgensen/lavaan.mi
There are still a couple of things to resolve before I can finally send these new versions to CRAN.
Thanks!
Hello,
I am running a SEM on an imputed data set using the sem.mi( ) function of the semTools package. LCMmod0 <- sem.mi(mvict13, combined_datasets, m) summary(LCMmod0, rsquare = T, fmi = T)
On my laptop there is no problem at all and results are presented, although the versions of R and the packages semTools and lavaan are somewhat old (not too old though; R 4.2.2, semTools 0.5-6, lavaan 0.6-13). On my desktop (at work), the sem.mi function did not work, and gave the error message Error in slot(value, what) : no slot of name "version" for this object of class "lavaanList"
After updating my desktop to the latest versions (R 4.4.1, semTools 0.5-6, lavaan 0.6-18), this error was fixed (did not appear anymore), but instead the following warning was given, for each imputed dataset (m=10) 1: lavaan->modindices():
the modindices() function ignores equality constraints; use lavTestScore() to assess the impact of releasing one or multiple constraints.
Although i did not ask for modindices, it seems not a problem, and it looks like results are computed. However the summary function gives the following output, and error
Fitmeasures can be obtained with the fitMeasures( ) function, but parameter estimates are not computed. Is this a bug, or did I something wrong? As I said before, older versions on my laptop gave (seemingly good) results.
Best, Mark