cmtwo {Docovt} | 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 : \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.
Usage
cmtwo(X, Y, alpha)
Arguments
X |
an |
Y |
an |
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.
Examples
## generate 2 datasets from multivariate normal with identical covariance.
p= 5; n1 = 100; n2 = 150; alpha=0.05
X=data1 = matrix(rnorm(n1*p), ncol=p)
Y=data2 = matrix(rnorm(n2*p), ncol=p)
# run test
cmtwo(X, Y, alpha)
[Package Docovt version 0.1 Index]