March 2019
Beginner to intermediate
448 pages
13h 14m
English
As it happens with the univariate case, we should also check whether the covariance matrices are the same between the two samples. This obviously requires a more sophisticated test (compared to the univariate test), because we are now working with matrices. There are several possible strategies, although a simple one is to use Box's M test, which can be obtained via the heplots package.
We need to create a combined dataset and a grouping variable to use boxM:
library(heplots) class1$group = "1" class2$group = "2" combined = rbind(class1,class2) combined$group = as.factor(combined$group) boxM(cbind(combined$Math,combined$History,combined$Sociology)~group,data = combined)
The preceding code generate the following output for ...
Read now
Unlock full access