On 10/26/2016 03:13 PM, Torres wrote:
> Thank you Yves. I followed your instruction and I have rmr =.105 which
> is far greater than srmr= .045. I did not know how to explain such big
> difference.
But rmr is not srmr. rmr is the square root of the mean of the squared
raw residuals, while srmr is the square root of the mean of the
*standardized* residuals.
For example,
library(lavaan)
example(cfa)
# observed S
S <- lavInspect(fit, "observed")$cov
# implied Sigma
Sigma <- lavInspect(fit, "implied")$cov
R <- lav_matrix_vech(S - Sigma)
# RMR
sqrt(mean(R^2))
# 0.08218433
# SRMR (EQS style)
sqrt.d <- 1/sqrt(diag(S))
D <- diag(sqrt.d, ncol=length(sqrt.d))
ZR <- lav_matrix_vech( D %*% (S - Sigma) %*% D )
sqrt(mean(ZR^2))
# 0.06520506
Most people would be interested in the standardized version.
> Normally I get the information of some indices such as RMSEA, SRMR in
> the column of robust when I make use of estimator of MLM (robust form).
> But I could not find information of RMR at both ML as well as Robust
> column on the summary output. In my case, the score of rmr I got from
> fitMeasures(fit, "rmr") is the one that belongs to the Robust column,
> isn't it?
It does not matter: RMR or SRMR are the same for both plain ML or robust
ML. They are just based on the residuals.
Yves.