Box's M test for equality of two or more covariance matrices {mvhtests} | R Documentation |
Box's M test for equality of two or more covariance matrices
Description
Box's M test for equality of two or more covariance matrices.
Usage
Mtest.cov(x, ina, a = 0.05)
Arguments
x |
A matrix containing Euclidean data. |
ina |
A vector denoting the groups of the data. |
a |
The significance level, set to 0.05 by default. |
Details
According to Mardia, Kent and Bibby (1979, pg. 140), it may be argued that if is small, then the log-likelihood ratio test (function
likel.cov
) gives too much weight to the contribution of . This consideration led Box (1949) to propose another test statistic in place of that seen in
likel.cov
. Box's is given by
where and
and
are the
-th unbiased covariance estimator and the pooled covariance matrix, respectively with
. Box's
also has an asymptotic
distribution with
degrees of freedom. Box's approximation seems to be good if each
exceeds 20 and if
and
do not exceed 5 (Bibby and Kent (1979) pg. 140).
Value
A vector with the the test statistic, the p-value, the degrees of freedom and the critical value of the test.
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Mardia K.V., Kent J.T. and Bibby J.M. (1979). Multivariate Analysis. London: Academic Press.
See Also
Examples
x <- as.matrix( iris[, 1:4] )
ina <- iris[, 5]
Mtest.cov(x, ina)