covtest.lc {PEtests}R Documentation

Two-sample high-dimensional covariance test (Li and Chen, 2012)

Description

This function implements the two-sample l2l_2-norm-based high-dimensional covariance test proposed by Li and Chen (2012). Suppose {X1,,Xn1}\{\mathbf{X}_1, \ldots, \mathbf{X}_{n_1}\} are i.i.d. copies of X\mathbf{X}, and {Y1,,Yn2}\{\mathbf{Y}_1, \ldots, \mathbf{Y}_{n_2}\} are i.i.d. copies of Y\mathbf{Y}. The test statistic TLCT_{LC} is defined as

TLC=An1+Bn22Cn1,n2,T_{LC} = A_{n_1}+B_{n_2}-2C_{n_1,n_2},

where An1A_{n_1}, Bn2B_{n_2}, and Cn1,n2C_{n_1,n_2} are unbiased estimators for tr(Σ12)\mathrm{tr}(\mathbf{\Sigma}^2_1), tr(Σ22)\mathrm{tr}(\mathbf{\Sigma}^2_2), and tr(Σ1Σ2)\mathrm{tr}(\mathbf{\Sigma}_1\mathbf{\Sigma}_2), respectively. Under the null hypothesis H0c:Σ1=Σ2H_{0c}: \mathbf{\Sigma}_1 = \mathbf{\Sigma}_2, the leading variance of TLCT_{LC} is σTLC2=4(1n1+1n2)2tr2(Σ2)\sigma^2_{T_{LC}} = 4(\frac{1}{n_1}+\frac{1}{n_2})^2 \rm{tr}^2(\mathbf{\Sigma}^2), which can be consistently estimated by σ^LC2\hat\sigma^2_{LC}. The explicit formulas of An1A_{n_1}, Bn2B_{n_2}, Cn1,n2C_{n_1,n_2} and σ^TLC2\hat\sigma^2_{T_{LC}} can be found in Equations (2.1), (2.2) and Theorem 1 of Li and Chen (2012). With some regularity conditions, under the null hypothesis H0c:Σ1=Σ2H_{0c}: \mathbf{\Sigma}_1 = \mathbf{\Sigma}_2, the test statistic TLCT_{LC} converges in distribution to a standard normal distribution as n1,n2,pn_1, n_2, p \rightarrow \infty. The asymptotic pp-value is obtained by

pLC=1Φ(TLC/σ^TLC),p_{LC} = 1-\Phi(T_{LC}/\hat\sigma_{T_{LC}}),

where Φ()\Phi(\cdot) is the cdf of the standard normal distribution.

Usage

covtest.lc(dataX,dataY)

Arguments

dataX

an n1n_1 by pp data matrix

dataY

an n2n_2 by pp data matrix

Value

stat the value of test statistic

pval the p-value for the test.

References

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

Examples

n1 = 100; n2 = 100; pp = 500
set.seed(1)
X = matrix(rnorm(n1*pp), nrow=n1, ncol=pp)
Y = matrix(rnorm(n2*pp), nrow=n2, ncol=pp)
covtest.lc(X,Y)

[Package PEtests version 0.1.0 Index]