covtest.clx {PEtests}R Documentation

Two-sample high-dimensional covariance test (Cai, Liu and Xia, 2013)

Description

This function implements the two-sample ll_\infty-norm-based high-dimensional covariance test proposed in Cai, Liu and Xia (2013). 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 is defined as

TCLX=max1i,jp(σ^ij1σ^ij2)2θ^ij1/n1+θ^ij2/n2,T_{CLX} = \max_{1\leq i,j \leq p} \frac{(\hat\sigma_{ij1}-\hat\sigma_{ij2})^2} {\hat\theta_{ij1}/n_1+\hat\theta_{ij2}/n_2},

where σ^ij1\hat\sigma_{ij1} and σ^ij2\hat\sigma_{ij2} are the sample covariances, and θ^ij1/n1+θ^ij2/n2\hat\theta_{ij1}/n_1+\hat\theta_{ij2}/n_2 estimates the variance of σ^ij1σ^ij2\hat{\sigma}_{ij1}-\hat{\sigma}_{ij2}. The explicit formulas of σ^ij1\hat\sigma_{ij1}, σ^ij2\hat\sigma_{ij2}, θ^ij1\hat\theta_{ij1} and θ^ij2\hat\theta_{ij2} can be found in Section 2 of Cai, Liu and Xia (2013). With some regularity conditions, under the null hypothesis H0c:Σ1=Σ2H_{0c}: \mathbf{\Sigma}_1 = \mathbf{\Sigma}_2, the test statistic TCLX4logp+loglogpT_{CLX}-4\log p+\log\log p converges in distribution to a Gumbel distribution Gcov(x)=exp(18πexp(x2))G_{cov}(x) = \exp(-\frac{1}{\sqrt{8\pi}}\exp(-\frac{x}{2})) as n1,n2,pn_1, n_2, p \rightarrow \infty. The asymptotic pp-value is obtained by

pCLX=1Gcov(TCLX4logp+loglogp).p_{CLX} = 1-G_{cov}(T_{CLX}-4\log p+\log\log p).

Usage

covtest.clx(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

Cai, T. T., Liu, W., and Xia, Y. (2013). Two-sample covariance matrix testing and support recovery in high-dimensional and sparse settings. Journal of the American Statistical Association, 108(501):265–277.

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.clx(X,Y)

[Package PEtests version 0.1.0 Index]