LC: Two-Sample Covariance Test by Li and Chen (2012)

View source: R/LC.R

LCR Documentation

Two-Sample Covariance Test by Li and Chen (2012)

Description

Given two sets of data matrices X and Y, where X is an n1 rows and p cols matrix and Y is an n2 rows and p cols matrix, we conduct hypothesis testing of the covariance matrix between two samples. The null hypothesis is:

H_0 : \Sigma_1 = \Sigma_2

\Sigma_1 and \Sigma_2 are the sample covariance matrices of X and Y respectively. This test method is based on the test method proposed by Li and Chen (2012). When the pval value is less than the significance coefficient (generally 0.05), the null hypothesis is rejected.

Usage

LC(X,Y,delta_sigma = NULL,alpha)

Arguments

X

A matrix of n1 by p

Y

A matrix of n2 by p

delta_sigma

A positive definite matrix

alpha

Significance level

Value

stat

a test statistic value.

pval

a test p_value.

power

a test power value.

FDR

a test FDR value.

References

Li, J. and Chen, S. X. (2012). Two sample tests for high-dimensional covariance matrices. The Annals of Statistics, 40(2):908-940.

Zhang, C., & Guo, G. (2025). The optimal subset estimation of distributed redundant data. IAENG International Journal of Applied Mathematics, 55(2), 270–277.

Examples

## generate X and Y.
p= 500;  n1 = 100; n2 = 150
X=matrix(rnorm(n1*p), ncol=p)
Y=matrix(rnorm(n2*p), ncol=p)
## run test
LC(X,Y,alpha=0.05)

Docovt documentation built on Oct. 19, 2026, 5:06 p.m.

Related to LC in Docovt...