As the question / topic states, how can I evaluate if the residuals of a fitted model using Lavaan are normally distributed. Or more more meaningfully phrased: how can I assess if the departure from normality is not severe?
I didn't know I needed to assess this, until I came across the notion in the book of Todd D. Little: Longitudinal structural equation modeling (2013) ( https://www.guilford.com/books/Longitudinal-Structural-Equation-Modeling/Todd-Little/9781462510160 ).
What method did he recommend? Or was he simply stating assumptions (regardless of whether they can be verified)?
require(lavaan)
## The famous Holzinger and Swineford (1939) example
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data=HolzingerSwineford1939)
summary(fit, fit.measures=TRUE)
HS.resid <- resid(fit, type='cor')$cor
HS.resid
stem(HS.resid[lower.tri(HS.resid, diag=FALSE)])
Amonet,
Yes, these are the residuals for the sample moments, not individual values of variables. This is why I like to put the non-redundant off-diagonal values in a stem-and-leaf plot. If you have a small model with few observed variables, there is less to go on. With larger models, you have more residuals to work with.
When Todd cautions about heavy tails, he is referring to a pattern of residuals that are larger than would be expected by random normal deviations. Skewness also suggests a pattern of larger-than-expected residuals in the tail. Likewise an outlier is a larger-than-expected residual that appears outside the distribution. The describe() function in the psych package offers a convenient way to obtain numeric summary statistics for univariate distributions.
when I run the predict(fit) and lavPredict (fit)
the output shows the row names only.
Is there another way do get these residuals?
Hi Terrence,
Thank you so much =)
I found an easy way to get new model estimates after a spatial correction (spatial dependence): the “spatialCorrect” function. But, this function works only with the deprecated “semTools” version. Do you recommend another function with similar role in the new version (semTools v 1.1)?
Thank you again,
Edineusa
Sent from Mail for Windows 10
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.
the “spatialCorrect” function. But, this function works only with the deprecated “semTools” version. Do you recommend another function with similar role in the new version (semTools v 1.1)?
install.packages("semTools_0.4-12.tar.gz", repos = NULL, type = "source")