开发者

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 a开发者_开发百科n 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.


In package biotools you can find the function boxM(data, grouping). It performs the Box's M-test for homogeneity of covariance matrices obtained from multivariate normal data according to one classification factor. The test is based on the chi-square approximation.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜