Learn R Programming

PEtests (version 0.1.0)

covtest: Two-sample covariance tests for high-dimensional data

Description

This function implements five two-sample covariance tests on high-dimensional covariance matrices. Let \(\mathbf{X} \in \mathbb{R}^p\) and \(\mathbf{Y} \in \mathbb{R}^p\) be two \(p\)-dimensional populations with mean vectors \((\boldsymbol{\mu}_1, \boldsymbol{\mu}_2)\) and covariance matrices \((\mathbf{\Sigma}_1, \mathbf{\Sigma}_2)\), respectively. The problem of interest is to test the equality of the two covariance matrices: $$H_{0c}: \mathbf{\Sigma}_1 = \mathbf{\Sigma}_2. $$ Suppose \(\{\mathbf{X}_1, \ldots, \mathbf{X}_{n_1}\}\) are i.i.d. copies of \(\mathbf{X}\), and \(\{\mathbf{Y}_1, \ldots, \mathbf{Y}_{n_2}\}\) are i.i.d. copies of \(\mathbf{Y}\). We denote dataX=\((\mathbf{X}_1, \ldots, \mathbf{X}_{n_1})^\top\in\mathbb{R}^{n_1\times p}\) and dataY=\((\mathbf{Y}_1, \ldots, \mathbf{Y}_{n_2})^\top\in\mathbb{R}^{n_2\times p}\).

Usage

covtest(dataX,dataY,method='pe.comp',delta=NULL)

Value

method the method type

stat the value of test statistic

pval the p-value for the test.

Arguments

dataX

an \(n_1\) by \(p\) data matrix

dataY

an \(n_2\) by \(p\) data matrix

method

the method type (default = 'pe.comp'); chosen from

  • 'clx': the \(l_\infty\)-norm-based covariance test, proposed in Cai et al. (2013);
    see covtest.clx for details.

  • 'lc': the \(l_2\)-norm-based covariance test, proposed in Li and Chen (2012);
    see covtest.lc for details.

  • 'pe.cauchy': the PE covariance test via Cauchy combination;
    see covtest.pe.cauchy for details.

  • 'pe.comp': the PE covariance test via the construction of PE components;
    see covtest.pe.comp for details.

  • 'pe.fisher': the PE covariance test via Fisher's combination;
    see covtest.pe.fisher for details.

delta

This is needed only in method='pe.comp'; see covtest.pe.comp for details. The default is NULL.

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.

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

Yu, X., Li, D., and Xue, L. (2022). Fisher’s combined probability test for high-dimensional covariance matrices. Journal of the American Statistical Association, (in press):1–14.

Yu, X., Li, D., Xue, L., and Li, R. (2022). Power-enhanced simultaneous test of high-dimensional mean vectors and covariance matrices with application to gene-set testing. Journal of the American Statistical Association, (in press):1–14.

Examples

Run this code
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(X,Y)

Run the code above in your browser using DataLab