Log-likelihood ratio test for equality of two or more covariance matrices {mvhtests}R Documentation

Log-likelihood ratio test for equality of two or more covariance matrices

Description

Log-likelihood ratio test for equality of two or more covariance matrices.

Usage

likel.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

Tthe hypothesis test is that of the equality of at least two covariance matrices: H_0:\pmb{\Sigma}_1=\ldots=\pmb{\Sigma}_k. The algorithm is taken from Mardia, Bibby and Kent (1979, pg. 140). The log-likelihood ratio test is the multivariate generalization of Bartlett's test of homogeneity of variances. The test statistic takes the following form

-2log{\lambda}=n\log{\left|{\bf S}\right|}-\sum_{i=1}^kn_i\log{\left|{\bf S_i}\right|}=\sum_{i=1}^kn_i\log{\left|{\bf S}_i^{-1}{\bf S}\right|},

where {\bf S}_i is the i-th sample biased covariance matrix and {\bf S}=n^{-1}\sum_{i=1}^kn_i{\bf S}_i is the maximum likelihood estimate of the common covariance matrix (under the null hypothesis) with n=\sum_{i=1}^kn_i. The degrees of freedom of the asymptotic chi-square distribution are \frac{1}{2}\left(p+1\right)\left(k-1\right).

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

equal.cov, Mtest.cov

Examples

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

[Package mvhtests version 1.0 Index]