Closed bwiernik closed 5 years ago
Sure, it would be cleaner. I will not change this now, as including the (zero) diagonal or not makes no difference, but mostly because this chunk of code will be replaced soon, by extracting all rmr/srmr/crmr values from the (new) lav_residual_summary() function.
In https://github.com/yrosseel/lavaan/blob/c4d53f724f5cdad988028c20897acc8896ca1536/R/lav_fit_measures.R#L1077
CRMR is computed with
lower.tri(R.cor, diag = TRUE)
, but the diagonal of R.cor is all zeroes by constraint. I believe that it should bediag=FALSE
here and elsewhere where CRMR is calculated.cf. https://www.tandfonline.com/doi/full/10.1080/10705511.2017.1389611?scroll=top&needAccess=true