test_correlation | R Documentation |
This function conducts statistical tests for hypotheses
regarding correlation matrices.
Users can either select from predefined hypotheses or
provide their own contrast matrix C
and vector Xi
for custom hypotheses.
It supports both bootstrap and Monte Carlo resampling methods to
obtain the p-value of the ANOVA-type statistic (ATS).
test_correlation(
X,
nv = NULL,
C = NULL,
Xi = NULL,
hypothesis = NULL,
method = "BT",
repetitions = 1000
)
X |
A list or a matrix containing the observation vectors. If a list,
each entry is a group, with observations as columns. If a matrix,
all groups are combined, and |
nv |
(Optional) A vector indicating group sizes, needed when
|
C |
(Optional) A user-defined contrast matrix for testing custom
hypotheses. Must match dimensions with |
Xi |
(Optional) A numeric vector used in combination with |
hypothesis |
A character string describing the null hypothesis.
Must be one of |
method |
A character indicating the resampling method:
|
repetitions |
Number of repetitions to use for the resampling method (default: 1000, should be >= 500). |
An object of class "CovTest"
.
Sattler, P. and Pauly, M. (2024). Testing hypotheses about correlation matrices in general MANOVA designs. TEST, 33(2), 496–516. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11749-023-00906-6")}
# Example with one group:
set.seed(31415)
X <- matrix(rnorm(5 * 100), nrow = 5)
test_correlation(X, hypothesis = "uncorrelated",
method = "BT", repetitions = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.