Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/equalCorrelationMatricesTest.r
tests the equality of two correlation matrices coming from two independent (or paired) datasets, that can possibly be high dimensional.
1 2 3 4 5 |
D1 |
first population dataset in matrix n_1\times p form. |
D2 |
second population dataset in matrix n_2\times p form. If |
testStatistic |
test statistic used for the hypothesis testing: name that uniquely identifies |
testNullDist |
Null distribution approximation. Either assuming independence between sample coefficients ( |
nite |
number of iterations used to generate the permuted samples (only if
|
paired |
if |
threshold |
exceedance threshold used if |
excAdj |
weight for the exceedances test. If |
exact |
permuted samples method: if |
conf.level |
confidence level of the interval. |
saddlePoint |
saddle-point approximation is used to find the p-value for exceedances-based test under asymptotic independence null distribution (only for |
MINint |
minimum expected number of exceedances for saddle point approximation. |
MAXint |
maximum expected number of exceedances for saddle point approximation. |
... |
arguments passed to or from other methods to the low level. |
The extreme value test is the most powerful test against very sparse alternatives whereas sum of squares test is the most powerful when the true differential correlation matrix is dense. Otherwise, for a reasonable selection of the exceedance threshold, the exceedances test overperforms the power of the other two tests.
Paired structures can be used in this function. For instance, if paired = TRUE
then the correlation
between sample correlation coefficients in the two matrices is estimated to adjust the test statistic.
Asymptotic independence tests are fast since they do not compute permuted samples and can be used, even for paired data, under weakly dependent assumptions (very sparse correlation matrices) when sample sizes are large. If these assumptions do not hold, wrong representations of the p-values under H_0 could be found, in which case, permuted based null distributions should be used instead.
Testing if a correlation matrix is the identity matrix can also be performed when D2 = NULL
. Note that the same type of test statistics
and null distributions are available in this setting. Nevertheless, Monte Carlo simulations are used instead of permuted samples. Here null distributions are approximated by computing sample correlation matrices of generated data following a N_p(0,I) under the assumption of normality.
An object of class eqCorrMatTest
containing the test statistics, p-values and confidence intervals for the selected tests.
Caballe, Adria <a.caballe@sms.ed.ac.uk>, Natalia Bochkina, Claus Mayer and Ioannis Papastathopoulos.
To come
eqCorTestByRows
for testing linear independence and equality of sames rows in two correlation matrices.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #### data
EX2 <- pcorSimulatorJoint(nobs = 50, nclusters = 3, nnodesxcluster = c(40,40,40),
pattern = "pow", diffType = "cluster", dataDepend = "diag",
pdiff=0.5)
#### eq. corr. mat. test
## not run
#test1 <- eqCorrMatTest(EX2$D1, EX2$D2, testStatistic = c("AS", "exc", "max"),
# paired = TRUE, nite = 400)
#print(test1)
## not run
#test2 <- eqCorrMatTest(EX2$D1, NULL, testStatistic = c("AS", "exc", "max"),
# paired = TRUE, nite = 400)
#print(test2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.