permTest {pARI} | R Documentation |
Permutation Test
Description
Performs permutation-based two-sample t-tests.
Usage
permTest(X, B = 1000, alternative = "two.sided", seed = NULL,
mask = NULL, rand = FALSE, label = NULL)
Arguments
X |
data matrix where rows represent the |
B |
numeric value. Number of permutations, default to 1000. |
alternative |
character string. It refers to the alternative hypothesis, must be one of |
seed |
integer value. If you want to specify the seed. Default to @NULL |
mask |
NIfTI file or character string. 3D array of logical values (i.e. |
rand |
Boolean value. Default @FALSE. If |
label |
numeric/character vector. Labels of the observations, if |
Value
Returns a list with the following objects:
- Test
: vector with length equals m
. Observed two-samples t-tests, one for each m
variable,
- Test_H0
: matrix with dimensions m \times B-1
. Test statistics under H0,
- pv
: vector with length equals m
. observed p-values, one for each m
variable,
- pv_H0
matrix with dimensions m \times B-1
. P-values under H0.
Author(s)
Angela Andreella
Examples
X <- matrix(rnorm(100*20), ncol=20)
X[,1:10] <- X[,1:10] + rnorm(100*10, mean = 5)
out <- permTest(X = X, alternative = "two.sided", label = c(rep(1,10),rep(0,10)))