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.

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

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
#> [1] -3.6804016 0.6097458