mkshaw / r2mlm

r2mlm: R Package for Calculating R-Squared in Multilevel Models
27 stars 1 forks source link

Change CWC designation to use absolute mean values. #41

Closed mkshaw closed 3 years ago

mkshaw commented 3 years ago

The code computes cluster means for all level-1 variables, sees if the means are roughly zero (< .0000001), and if yes then it assigns clustermeancentered = TRUE. This update changes the code to test whether the absolute value of the means are roughly zero, to address the case in which a cluster has a negative non-zero mean (that would otherwise mistakenly be assigned to clustermeancentered = TRUE because the negative number is less than 0.0000001).