Learn Data & AI Skills | 50% off
Get 50% off unlimited learning

mvhtests (version 1.1)

Log-likelihood ratio test for equality of two or more covariance matrices: 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)

Value

A vector with the the test statistic, the p-value, the degrees of freedom and the critical value of the test.

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.

Author

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

Details

Tthe hypothesis test is that of the equality of at least two covariance matrices: H0:ΣΣ1==ΣΣ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λ=nlog|S|i=1knilog|Si|=i=1knilog|Si1S|, where Si is the i-th sample biased covariance matrix and S=n1i=1kniSi is the maximum likelihood estimate of the common covariance matrix (under the null hypothesis) with n=i=1kni. The degrees of freedom of the asymptotic chi-square distribution are 12(p+1)(k1).

References

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

See Also

equal.cov, Mtest.cov

Examples

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

Run the code above in your browser using DataLab