BMfast2_dualmatrix: Fast Brunner-Munzel tests (v2) - dual matrix

View source: R/RcppExports.R

BMfast2_dualmatrixR Documentation

Fast Brunner-Munzel tests (v2) - dual matrix

Description

Takes a binary matrix of voxels and a matrix of behavioral scores, one for each voxel, then runs Brunner-Munzel tests on each voxel with the repective behavior column. Function mostly used to estimate score biases with full brain simulations. This is a fast function that corrects for infinite values with a similar approach as the nparcomp package.

Usage

BMfast2_dualmatrix(X, Y, computeDOF = FALSE)

Arguments

X

binary matrix of voxels (columns) for all subjects (rows)

Y

matrix of voxel specific behavioral scores. Must be of same dimensions as X.

computeDOF

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

Value

List with two vectors:

  • statistic - BM values

  • dfbm - degrees of freedom

Author(s)

Dorian Pustina

Examples

set.seed(1234)
lesmat = matrix(rbinom(60,1,0.2), ncol=2)
set.seed(12345)
behavior = cbind( rnorm(30) )
set.seed(123456)
behavior = cbind ( behavior, rnorm(30) )
test = LESYMAP::BMfast2_dualmatrix(lesmat, behavior)
test$statistic[,1] # -3.6804016  0.6097458


dorianps/LESYMAP documentation built on June 1, 2024, 2:12 a.m.