-
Notifications
You must be signed in to change notification settings - Fork 36
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
error with S4 slot names between lavaan and semTools (with reproducible example) #120
Comments
Not a good long term solution out, but I forked this and modified the definition of |
There should be no I can look further into it, but first try the latest development version of
The only time I see
I have wanted to redo the standardized solution options anyway, and will try to resolve this when I have time. Until then, maybe I'll just add a flag in the |
Thanks for looking into this more deeply. Your long term solutions sound great. I use semTools quite often. Working with survey data, I often have ordinal indicators. In this case, I wanted I realize your solution is better from a coding perspective (i.e., I can get results without additional changes); however, this path is the path of greatest interest in a project that I'm working on. If I want the most robust estimates in the meantime, is there any reason I should not just fork the repo and add a slot called implied? If I understand correctly, This seemed like less work than going into lavaan and making this compatible from their end, but I'm open to your advice. |
I'm not sure what you mean by "robust". From my understanding, the primary reason to condition on X (rather than merely treating X as "fixed") is that it is easier on the optimizer to find a solution. When you condition on X with ordinal outcomes, Step 1 of DWLS is to estimate a matrix of polychoric/polyserial correlations among endogenous residuals, whereas merely If the robustness you are referring to is not wanting to treat your binary exogenous predictor as normal, then setting |
Thank you very much for this detailed answer; I'll go your route for the solution. I greatly appreciate your hard work and extensive contributions to structural equation modeling. |
I made a reproducible example (below) to demonstrate the issue.
In some cases, the
lavaan.mi
class object made bycfa.mi()
has slot names which do not work with lavaan's expected slots. This occurs with several functions, includingsummary()
andparameterestimates()
, but others too.The problem does not occur in all situations, but does when endogenous variables are categorical and the latent variable is regressed on some manifest variable.
I do some data conversion to the HolzingerSwineford data; obviously this model doesn't make any sense, but it demonstrates the example.
The text was updated successfully, but these errors were encountered: