-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: two-level SEM with random intercepts #39
Comments
have you tried it? |
Yes, I did. With the Galo example from Yves Rosseels slides, see http://users.ugent.be/~yrosseel/lavaan/tubingen2017/multilevelSEM_part1.pdf , page 121ff. I did the multiple imputation with library(semTools)
library(mice)
fit.mi <- sem.mi(model, data = Galo, cluster="school", fixed.x = FALSE,
verbose = TRUE, std.lv = TRUE, h1 = TRUE,
m = 5, miPackage="mice") and got Fehler in is.mids(data) : Argument "data" fehlt (ohne Standardwert) |
I found the problem that cause this error message and fixed it. But I tried running the example and it still fails. I found the first problem, which is that FYI, imputing the data correctly with |
OK, it mostly works, but I have only been able to check single-group multilevel model. I tried adding
|
Works like a charm, also with my data. I am curious if |
Turns out So The issues were resolved with all the other methods too. The only remaining issue is that the automatic baseline model fails to be fit in the multilevel case, so you currently have to fit your own and pass it to the |
Thank you to have investigated in this isssue! And thanky you for reporting it here! |
This
That means everything works fine for I'll post a final update whenever the |
I forget when, but it was resolved :-) |
Since lavaan v0.6-1 supports two-level SEM with random intercepts, do you intend to implement this feature in semTools for multiple imputations? Thank you very much!
The text was updated successfully, but these errors were encountered: