Closed sammerk closed 7 years ago
I don't know what version of lavaan or semTools you are using, but runMI does not currently work with the latest development version of lavaan. I am in the process of completely rewriting runMI, and I can tell you is that the new version returns a value similar in magnitude to the complete-data SRMR (around .06). Until the new versions of lavaan and semTools are released on CRAN, you could calculate SRMR on your own from the resid()
output:
R <- resid(out, type = "cor")
covR <- R$cov # or R[[1]]$cor, for each group
mR <- R$mean # or R[[1]]$mean, for each group
sqR <- c(covR[lower.tri(covR, diag = TRUE)], mR)^2 # add other groups if necessary
sqrt(mean(sqR)) # SRMR
OK - thank you! Does it make sense to install the development version of {semTools}
via devtools::install_git()
?
I have not yet replaced the source code with my revisions. I am hesitant to do so because it relies on experimental features in lavaan that are being developed (multiple updates in the past week) along with the changes in semTools. Neither can be submitted to CRAN until simsem is also updated, but I expect to have a development version of semTools available via github in a couple weeks.
That sounds great ...
Hi Sam,
Thanks to the lavaan developer's help, I was able to get a good working copy of the new runMI()
ready. There are still a few issues with categorical outcomes to work out (the fitted
and residuals
methods, the standardized solution and SRMR), but everything else seems to be working fine. You can install the development version using devtools::install_git("simsem/semTools/semTools")
I get strange (high) SRMR values using cfa.mi().
A minimal example from the help:
This gives me