I need to test the equality of two co variance matrices for my two subsets:
trains[1:5, c(3,6,8,11)] and trains[6:10, c(3,6,8,11)].
Should I be using a boxM test or something similar? Thanks
You can use
compareCov from the package
As an example I will use the
longely dataset from the
library(covmat) (Cl <- cor(longley)) compareCov(Cl, Cl, labels = c("Robust Croux", "Robust"))
You can find more examples and details in the package's Vignette.
If you're asking how to select the most appropriate statistical test, then that's more of a question for Cross Validated, like Ben Bolker just commented.