CovTest {RMT4DS} | R Documentation |
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)
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 |
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.
Author(s)
Xiucai Ding, Yichen Hu
Source
Maximal likelihood tests fail in high-dimensional settings, so corrections are made. Note all tests are one-sided. Large statistics indicate violation of null hypothesis.
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
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))