BMperm: Fast Brunner-Munzel tests (v2) with permutations

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Takes a binary matrix of voxels and a vector of behavior and runs Brunner-Munzel tests on each voxel. This is a fast function that corrects for infinite values with a similar approach as the nparcomp package. It calculates p-values by running permutations of each voxel and using the ratio of times the real BM score exceeds the permuted BM score.

Usage

1
BMperm(X, y, computeDOF = TRUE, npermBM = 20000L, alternative = 1L)

Arguments

X

binary matrix ov voxlels (columns) for all subjects (rows)

y

vector of behavioral scores.

computeDOF

(default true) chooses whether to compute degrees of freedom. Set to false to save time during permutations.

npermBM

(default 20000) number of permutations to run at each voxel

alternative

(default 1) integer to select the tail of pvalues. 1-greater, 2-less, 3-two.sided

Value

List with these objects:

Author(s)

Dorian Pustina

Examples

1
2
3
4
5
6
7
8
set.seed(1234)
lesmat = matrix(rbinom(40,1,0.2), ncol=2)
set.seed(1234)
behavior = rnorm(20)
test = LESYMAP::BMperm(lesmat, behavior, alternative=3)
test$statistic[,1] # -2.0571825 -0.8259754
test$dfbm[,1] # 16.927348  7.563432
test$pvalue[,1] # 0.1427929 0.4102795

neuroconductor-releases/LESYMAP documentation built on Dec. 10, 2019, 12:14 a.m.