covTest.multi {MNormTest} | R Documentation |
Test whether the covariance matrices of multiple multivariate normal populations are all equal. Suppose we have k populations, the null hypothesis is "H0: Sigma1 = Sigma2 = ... = Sigmak".
covTest.multi(X, label, alpha = 0.05, verbose = TRUE)
X |
The data matrix which is a matrix or data frame. |
label |
A vector of group labels. |
alpha |
The significance level. Default is 0.05. |
verbose |
A boolean value. Default is TRUE. If TRUE, the null hypothesis will be displayed. If FALSE, the test will be carried out silently. |
An object of class "testResult", which is a list with the following elements:
Conclusion |
The conclusion of the test. |
Stat |
A data frame containing the statistics, p value and critical value. |
SampMeanT |
The sample mean. |
SampMeanWithin |
The sample mean of each group. |
SdWithin |
The sample deviation of each group. |
SdWithinT |
The sample deviation within group. |
Df |
The degree of freedom. |
sampleSize |
The sample size of each group. |
d |
The Modified factor of the statistic. |
Xifeng Zhang
Huixuan, Gao. Applied Multivariate Statistical Analysis. Peking University Press, 2005: pp.88-89.
data(iris)
chart <- iris[, 1:4]
species <- iris[, 5]
# carry out the test
test1 <- covTest.multi(chart, species)
test2 <- covTest.multi(chart, species, verbose = FALSE)
# get the elements
test1$Stat
test1$SampMeanT
test1$sampleSize