signTest: Permutatation-based one-sample t-tests

View source: R/signTest.R

signTestR Documentation

Permutatation-based one-sample t-tests

Description

Performs sign-flipped one-sample t-tests.

Usage

signTest(X, B = 1000, alternative = "two.sided", seed = NULL, mask = NULL, rand = FALSE)

Arguments

X

data matrix where rows represent the m variables and columns the n observations.

B

numeric value. Number of permutations, default to 1000.

alternative

character string. It refers to the alternative hypothesis, must be one of "two.sided" (default), "greater" or "lower".

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. TRUE/FALSE in/out of the brain). Alternatively it may be a (character) NIfTI file name. If mask=NULL, it is assumed that non of the voxels have to be excluded.

rand

Boolean value. Default @FALSE. If rand = TRUE, the p-values are computed by rowRanks.

Value

Returns a list with the following objects: - Test: vector with length equals m. Observed one-sample 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)
out <- signTest(X = X, alternative = "two.sided")

angeella/ARIpermutation documentation built on Aug. 24, 2023, 3:36 p.m.