Test of Homogeneity of Covariance Matrices given by Ahmad 2017
Ahmad2017(x, ...)
x | data as a data frame, list of matrices, grouped data frame, or resample object |
---|---|
... | other options passed to covTest method |
A list with class "htest" containing the following components:
statistic |
the value of homogeneity of covariance test statistic |
parameter |
the degrees of freedom for the chi-squared statistic |
p.value |
the p=value for the test |
estimate |
the estimated covariances if less than 5 dimensions |
null.value |
the specified hypothesized value of the covariance difference |
alternative |
a character string describing the alternative hyposthesis |
method |
a character string indicating what type of homogeneity of covariance test was performed |
The homogeneityCovariances
function is a wrapper function that formats the data
for the specific covTest
functions.
Ahmad, R. (2017). Location-invariant test of homogeneity of large-dimensional covariance matrices. Journal of Statistical Theory and Practice, 11(4):731-745. 10.1080/15598608.2017.1308895
irisSpecies <- unique(iris$Species) iris_ls <- lapply(irisSpecies, function(x){as.matrix(iris[iris$Species == x, 1:4])} ) names(iris_ls) <- irisSpecies Ahmad2017(iris_ls)#> #> Ahmad 2017 Homogeneity of Covariance Matrices Test #> #> data: setosa, versicolor and virginica #> Standard Normal = 1.1193, Mean = 0, Variance = 1, p-value = 0.1315 #> alternative hypothesis: true difference in covariance matrices is not equal to 0 #>