CovTest2.2013Cai {CovTools}R Documentation

Two-Sample Covariance Test by Cai and Ma (2013)

Description

Given two sets of data, it performs 2-sample test for equality of covariance matrices where the null hypothesis is

H_0 : Σ_1 = Σ_2

where Σ_1 and Σ_2 represent true (unknown) covariance for each dataset based on a procedure proposed by Cai and Ma (2013). If statistic > threshold, it rejects null hypothesis.

Usage

CovTest2.2013Cai(X, Y, alpha = 0.05)

Arguments

X

an (m\times p) matrix where each row is an observation from the first dataset.

Y

an (n\times p) matrix where each row is an observation from the second dataset.

alpha

level of significance.

Value

a named list containing

statistic

a test statistic value.

threshold

rejection criterion to be compared against test statistic.

reject

a logical; TRUE to reject null hypothesis, FALSE otherwise.

References

Cai TT, Ma Z (2013). “Optimal hypothesis testing for high dimensional covariance matrices.” Bernoulli, 19(5B), 2359–2388. ISSN 1350-7265.

Examples

## generate 2 datasets from multivariate normal with identical covariance.
pdim  = 5
data1 = matrix(rnorm(100*pdim), ncol=pdim)
data2 = matrix(rnorm(150*pdim), ncol=pdim)

## run test
CovTest2.2013Cai(data1, data2)


[Package CovTools version 0.5.4 Index]