BoxMTest {multiUS} | R Documentation |
Box's test for equivalence of covariance matrices
Description
The function performs Box's test for testing the null hypothesis that two or more covariance matrices are equal.
Usage
BoxMTest(X, cl, alpha = 0.05, test = "any")
Arguments
X |
A data frame with the values of numberical variables. |
cl |
An normial or ordinal variable which defines groups (a partition) (must be of type |
alpha |
Significance level (default |
test |
Wheter the F-test ( |
Details
If the size of any group is at least 20 units (sufficiently large), the test takes a Chi-square approximation, otherwise it takes an F approximation.
Value
A list with the following elements:
-
MBox
- The value of the Box's M statistic. -
ChiSq
orF
- The approximation statistic test. -
p
- An observed significance level.
Author(s)
Andy Liaw and Aleš Žiberna (minor modifications)
References
Stevens, J. (1996). Applied multivariate statistics for the social sciences . 1992. Hillsdale, NJ: Laurence Erlbaum.
Examples
BoxMTest(X = mtcars[, c(1, 3, 4, 5)], cl = as.factor(mtcars[, 2]), alpha = 0.05)