Search code examples
rstatisticsspss

R Box'M test for homocedasticity


I'm trying to replicate a linear discriminant analysis output from SPSS in R, and I'm having difficulties to find a way to perform an m-box test.

The only thing I found was some code posted in a forum, to manually implement the process, but I was wondering if there is nothing for this purpose already incorporated in the language itself.


Solution

  • There is code that can be found with a simple rseek search. It's not typically done because it's very high sensitivity leads to significant p-values that may not mean much.

    EDIT: That old link doesn't work anymore but it turns out that the test is implemented in the biotools package with the function boxM. It was still a relatively easy search. And it's still true that you probably shouldn't bother using it like all such tests. You should probably just carefully examine your covariance matrix and your assumptions.