Log-likelihood ratio test for equality of one covariance matrix {mvhtests} | R Documentation |
Log-likelihood ratio test for equality of one covariance matrix
Description
Log-likelihood ratio test for equality of one covariance matrix.
Usage
equal.cov(x, Sigma, a = 0.05)
Arguments
x |
A matrix containing Euclidean data. |
Sigma |
The hypothesis covariance matrix. |
a |
The significance level, set to 0.05 by default. |
Details
The hypothesis test is that the the sample covariance is equal to some specified covariance matrix: , with
unknown. The algorithm for this test is taken from Mardia, Bibby and Kent (1979, pg. 126-127).
The test is based upon the log-likelihood ratio test. The form of the test is
where is the sample size,
is the specified covariance matrix under the null hypothesis,
is the sample covariance matrix and
is the dimensionality of the data (or the number of variables). Let
and
denote the arithmetic mean and the geometric mean respectively of the eigenvalues of
, so that
and
, then the test statistic becomes
The degrees of freedom of the distribution are
.
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
Examples
x <- as.matrix( iris[, 1:4] )
s <- cov(x) * 1.5
equal.cov(x, s)