View source: R/covariance_and_correlation_related_functions.R
Hypothesis test for equality of a covariance matrix | R Documentation |
Hypothesis test for equality of a covariance matrix.
covequal(x, sigma, a = 0.05)
x |
A numerical matrix with the data whose covariance matrix will be tested for equality. |
sigma |
The covariance matrix that is to be tested for equality. |
a |
The level of significance, default value is equal to 0.05. |
The likelihood-ratio test is used to test whether the sample covariance matrix from some data is equal to some pre-specifief covariance matrix.
A vector with the test statistic, its p-value, the degrees of freedom and the critical value of the test.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Mardia K. V., Kent J. T. and Bibby J. M. (1979, pg. 126-127). Multivariate Analysis. London: Academic Press.
covlikel, covdist, covar, cor_test
x <- as.matrix(iris[1:50, 1:4])
sigma <- cov(iris[, 1:4])
covequal(x, sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.