covequal: Hypothesis test for equality of a covariance matrix

View source: R/covariance_and_correlation_related_functions.R

Hypothesis test for equality of a covariance matrixR Documentation

Hypothesis test for equality of a covariance matrix

Description

Hypothesis test for equality of a covariance matrix.

Usage

covequal(x, sigma, a = 0.05)

Arguments

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.

Details

The likelihood-ratio test is used to test whether the sample covariance matrix from some data is equal to some pre-specifief covariance matrix.

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

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

See Also

covlikel, covdist, covar, cor_test

Examples

x <- as.matrix(iris[1:50, 1:4])
sigma <- cov(iris[, 1:4]) 
covequal(x, sigma)

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