covlikel: Hypothesis tests for equality of multiple covariance matrices

View source: R/covariance_and_correlation_related_functions.R

Hypothesis tests for equality of multiple covariance matricesR Documentation

Hypothesis tests for equality of multiple covariance matrices

Description

Hypothesis tests for equality of multiple covariance matrices.

Usage

covlikel(x, ina, a = 0.05)
covmtest(x, ina, a = 0.05)

Arguments

x

A numerical matrix with the data whose covariance matrices will be tested for equality.

ina

A vector with the grouping variable that defines the groups.

a

The level of significance, default value is equal to 0.05.

Details

The likelihood-ratio test and the Box's M-test for testing equality of multiple covariance matrices. The log-likelihood ratio test is the multivariate generalization of Bartlett's test of homogeneity of variances. According to Mardia (1979, pg. 140), it may be argued that if n_i is small, then the log-likelihood ratio test gives too much weight to the contribution of \bf S. This consideration led Box (1949) to propose his test statistic.

Value

A vector with the test statistic, its 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

Aitchison J. (2003, pg. 155). The Statistical Analysis of Compositional Data. New Jersey: (Reprinted by) The Blackburn Press.

Mardia K. V., Kent J. T. and Bibby J. M. (1979, p.g. 140). Multivariate Analysis. London: Academic Press.

See Also

covequal, covdist, covar, cor_test

Examples

x <- as.matrix(iris[, 1:4])
ina <- iris[, 5]
covlikel(x, ina)

Rfast2 documentation built on Aug. 8, 2023, 1:11 a.m.