DCLX: Distributed Two-Sample Covariance Matrix Testing (CLX Method)

View source: R/DCLX.R

DCLXR Documentation

Distributed Two-Sample Covariance Matrix Testing (CLX Method)

Description

Given two sets of data matrices X and Y, where X is an n_1 \times p matrix and Y is an n_2 \times p matrix, we conduct hypothesis testing of the covariance matrix between two samples. The null hypothesis is

H_0 : \Sigma_1 = \Sigma_2,

where \Sigma_1 and \Sigma_2 are the sample covariance matrices of X and Y respectively. The test is based on the method proposed by Cai, Liu and Xia (2013). When the p-value is less than the significance level (generally 0.05), the null hypothesis is rejected.

Usage

DCLX(X, Y, K, alpha = 0.05)

Arguments

X

A numeric matrix of dimension n_1 \times p.

Y

A numeric matrix of dimension n_2 \times p.

K

Integer, number of blocks.

alpha

Numeric, significance level. Default is 0.05.

Value

A list with components:

stat

the test statistic.

pval

the p-value.

power

the estimated power.

fdr

the estimated false discovery rate.

Xopt

the selected block of X.

Yopt

the selected block of Y.

References

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

Examples

## Not run: 
## generate data from multivariate normal with trivial covariance
p  <- 500
n1 <- 100
n2 <- 150
K  <- 10
X <- matrix(rnorm(n1 * p), ncol = p)
Y <- matrix(rnorm(n2 * p), ncol = p)
## run test
DCLX(X, Y, K)

## End(Not run)


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

Related to DCLX in Docovt...