BoxMTest | R Documentation |
The function performs Box's test for testing the null hypothesis that two or more covariance matrices are equal.
BoxMTest(X, cl, alpha = 0.05, test = "any")
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 ( |
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.
A list with the following elements:
MBox
- The value of the Box's M statistic.
ChiSq
or F
- The approximation statistic test.
p
- An observed significance level.
Andy Liaw and Aleš Žiberna (minor modifications)
Stevens, J. (1996). Applied multivariate statistics for the social sciences . 1992. Hillsdale, NJ: Laurence Erlbaum.
BoxMTest(X = mtcars[, c(1, 3, 4, 5)], cl = as.factor(mtcars[, 2]), alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.