Dear Researchers, please give a function or code to do CV and mean separation. I could not get cv directly from ANOVA summary, and Cant seed the mean and its least significance separation?
For the CV from a model, be aware that if the dependent variable isn't always positive, or if dividing the errors by the mean doesn't make sense, the CV doesn't have a lot of utility
For the Sodium ~ Instructor example I cited above, you can calculate CV from the model:
library(car)
Anova(model)
sqrt(1487812 / 57) / mean(Data$Sodium) * 100
sqrt(Residual SS / df-res) / grand mean
You can also use a function I wrote that reports measures of accuracy from the model directly.
library(rcompanion)
accuracy(model)
You'll find that these two methods may produce somewhat different results. I'm not sure why the results are a bit different. Something I should probably figure out.