Learn R Programming

RMT4DS (version 0.0.1)

CovTest: High-dimensional Covariance Test

Description

Test of given population covariance matrix, test of equal covariance of two or more samples.

Usage

OneSampleCovTest(X, mean=NULL, S=NULL)
TwoSampleCovTest(X1, X2, mean=NULL)
MultiSampleCovTest(..., input=NULL)

Value

OneSampleCovTest tests given covariance matrix of one sample,

TwoSampleCovTest tests equal covariance matrices of two samples,

MultiSampleCovTest tests equal covariance matrices of multiple samples.

Arguments

X, X1, X2

input samples in the form n by p where p is the dimension.

mean

population mean of samples. If it is missing, sample mean will be used.

S

covariance matrix to be tested. If it is missing, test of identity covariance will be performed.

...

any samples to be tested.

input

list of samples to be tested. Please choose either ... or input as input form.

Author

Xiucai Ding, Yichen Hu

References

[1] Zheng, S., Bai, Z., & Yao, J. (2015). Substitution principle for CLT of linear spectral statistics of high-dimensional sample covariance matrices with applications to hypothesis testing. The Annals of Statistics, 43(2), 546-591.

Examples

Run this code
require(MASS)
n = 500
p = 100
S1 = diag(rep(1,p))
S2 = diag(sample(c(1,4),p,replace=TRUE))
OneSampleCovTest(mvrnorm(n,rep(0,p),S2), S=S1)
TwoSampleCovTest(mvrnorm(n,rep(0,p),S1), mvrnorm(n,rep(0,p),S2))
MultiSampleCovTest(mvrnorm(n,rep(0,p),S1), mvrnorm(n,rep(0,p),S2))

Run the code above in your browser using DataLab