covtest.clx {PEtests} | R Documentation |
Two-sample high-dimensional covariance test (Cai, Liu and Xia, 2013)
Description
This function implements the two-sample -norm-based
high-dimensional covariance test proposed in Cai, Liu and Xia (2013).
Suppose
are i.i.d.
copies of
, and
are i.i.d. copies of
. The test statistic is defined as
where and
are the sample covariances,
and
estimates the variance of
.
The explicit formulas of
,
,
and
can be found
in Section 2 of Cai, Liu and Xia (2013).
With some regularity conditions, under the null hypothesis
,
the test statistic
converges in distribution to
a Gumbel distribution
as
.
The asymptotic
-value is obtained by
Usage
covtest.clx(dataX,dataY)
Arguments
dataX |
an |
dataY |
an |
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)