View source: R/CovTest2.2013Cai.R
CovTest2.2013Cai | R Documentation |
Given two sets of data, it performs 2-sample test for equality of covariance matrices where the null hypothesis is
H_0 : \Sigma_1 = \Sigma_2
where \Sigma_1
and \Sigma_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.
CovTest2.2013Cai(X, Y, alpha = 0.05)
X |
an |
Y |
an |
alpha |
level of significance. |
a named list containing
a test statistic value.
rejection criterion to be compared against test statistic.
a logical; TRUE
to reject null hypothesis, FALSE
otherwise.
cai_optimal_2013CovTools
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.