Closed SilviaMorgenstern closed 1 year ago
Thanks for trying out lavaanPlot2 and sharing the error.
Does it give you the same error if you remove the significance stars?
I have tried removing the significance stars, but unfortunately it does not help. I have tried also in a different dataset, testing a slightly different model and I still have the same issue. All works fine, until I ask lavaanPlot2 to use stand = TRUE
Thanks for giving that a try. That's what I expected to happen, I just wanted to be sure.
Could you show me what it looks like when you do standardizedSolution()
with you model?
The output looks normal, here is a screenshot of the first lines
I'm looking for whether you have latent variable variances with a NA in the z column
Interesting! I do. I have no NA until I check the z of a covariate with itself, e.g., ATTITUDE ~~ ATTITUDE. In that case, for some variables I have a value of 0.000, sometimes it says NA. I never noticed before. Any idea why that would happen? I should not have any missing value in the dataset.
I think that is because those latent variable variances are fixed to 1 for the model estimation (you can change them to something else too I assume) so they're not estimated, and so they don't have a standard error or a z score.
I understand, any idea why that does not happen with lavaanPlot? Meanwhile, I am trying to understand how can I set lavaan to estimate them instead.
It's just to do with picayune details of the differences between lavaanPlot
and lavaanPlot2
.
I don't know if you can estimate them, I think it could be a necessary model constraint. Or you'd have to constrain the latent variable coefficients maybe.
I just pushed https://github.com/alishinski/lavaanPlot/commit/2292161266eb64cf261417124471f3f84f2ce77c which should fix the problem, give it a shot and let me know.
Wow, thank you so much! I will try and let you know!
It works! Thank you so much again! Any idea when this will be updated in CRAN? No rush, I ask just to avoid messing up between the dev version on GitHub and the stable on CRAN.
Glad to hear it!
I was planning to wait till I could iron out difficulties with the new stuff from 0.7.0 and 0.8.0 before I went to CRAN again. This helped towards that, I'll probably do it sometime in the next month or two.
But you can keep using the dev version, I haven't broken backwards compatibility so everything that worked in the newest CRAN version should still work the same with the dev version.
Great, thank you!
The package is great and the plots are so much better than semplot, but I have an issue in getting standard coefficients if I use lavaanPlot2. I am trying to plot a quite complex SEM with nine latent variables and more than 30 observed variables.
If I ask a plot with lavaanPlot everything works fine.
lavaanPlot(model = model, coefs = TRUE, stand = TRUE, sig = 0.05, stars = c("regress"))
The following with lavaanPlot2 works fine too
But if I replace "stand = FALSE" with "stand = TRUE", it does not work and gives this error
Any idea why? Has anyone had this issue before?