View source: R/rowPearsonCorrelationTests.R
rowPearsonCorrelationTests | R Documentation |
Pearson's correlation test for rows of a matrix
rowPearsonCorrelationTests(X, categ, alternative = "two.sided")
X |
A |
categ |
Either a numeric vector of continuous covariate for the observations |
alternative |
A character string specifying the alternative hypothesis.
Must be one of "two.sided" (default), "greater" or "less". As in
|
This function is a wrapper around the row_cor_pearson function
in the 'matrixTests' package.
A list containing the following components:
the value of the t-statistics
the degrees of freedom for the t-statistics
the p-values for the tests
the correlation
Each of these elements is a matrix of size m x B
, coerced to a vector of length m
if B=1
Nicolas Enjalbert Courrech
matrixTests::row_cor_pearson()
m <- 300
n <- 38
mat <- matrix(rnorm(m*n), ncol=n)
categ <- rnorm(n, mean = 10)
system.time(fwt <- rowPearsonCorrelationTests(mat, categ, alternative = "greater"))
str(fwt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.