Hello
I fitted the following model, whitch worked great.
model <- '
level: 1
PoPWsum~PrPWsum
level: 2
PoPWsum~PrPWsum+P1+P2+P3+P4.1+P4oP4.1'
fit <- sem(model, MLC, cluster="ID_C", missing="fiml")
summary(fit, standardized=TRUE, rsquare=TRUE)
lavInspect(fit,"icc")
After that I tried to acess the residuals with lavResiduals(fit), to decide whether or not I 've got some problems with non-normality or heteroscedasticity of the residuals.
What I got is an error message, which I do not understand: Error in GG %*% ACOV.res[[g]] : non-conformable arguments
My question: How can I access the Residuals of my model?
I tried also to fit the model with a robust estimator (as Yves proposed to do in a workshop):
model <- '
level: 1
PoPWsum~PrPWsum
level: 2
PoPWsum~PrPWsum+P1+P2+P3+P4.1+P4oP4.1'
fit <- sem(model, MLC, cluster="ID_C",estimator = "MLR", missing = "ml")
summary(fit, standardized=TRUE, rsquare=TRUE)
lavInspect(fit,"icc")
Unfortunatly this call caused 40 warnings. But just one of them is displayed when I access them with the warnings(fit)-call. This one does not seem to be harmful:
1: In lav_data_full(data = data, group = group, cluster = cluster, ... :
lavaan WARNING: 34 cases were deleted due to missing values in
exogenous variable(s), while fixed.x = TRUE. Error in cat("1: In lav_data_full(data = data, group = group, cluster = cluster, ... :\n lavaan WARNING: 34 cases were deleted due to missing values in \n\t\t exogenous variable(s), while fixed.x = TRUE.", :
argument 2 (type 'S4') cannot be handled by 'cat'
My question: Where have all the warnings gone? Should I care for the other 39 undisplayed warnings?
Thank you so much!! lavaan is great!
Maurus