lsm_chisq: Chi square tests for symptom mapping

View source: R/lsm_chisq.R

lsm_chisqR Documentation

Chi square tests for symptom mapping

Description

Lesion to symptom mapping performed on a prepared matrix. The behavior must be a binary vector. Chi square tests are performed at each voxel. By default the Yates correction is performed, use correct=FALSE if you need to disable it. The behavior must be a binary vector. Exact p-values can be obtained with permutation based estimatins.

Usage

lsm_chisq(lesmat, behavior, YatesCorrect = TRUE, runPermutations = F,
  nperm = 2000, showInfo = TRUE, ...)

Arguments

lesmat

binary matrix (0/1) of voxels (columns) and subjects (rows).

behavior

vector of behavioral scores (must be binary.

YatesCorrect

(default=T) logical whether to use Yates correction.

runPermutations

logical (default=FALSE) whether to use permutation based p-value estimation.

nperm

(default=2000) The number of permutations to run.

showInfo

display info messagges when running the function.

...

other arguments received from lesymap.

Value

List of objects returned:

  • statistic - vector of statistical values

  • pvalue - vector of pvalues

  • zscore - vector of zscores

Author(s)

Dorian Pustina

Examples

{
set.seed(123)
lesmat = matrix(rbinom(200,1,0.5), ncol=2)
set.seed(1234)
behavior = rbinom(100,1,0.5)
result = lsm_chisq(lesmat, behavior)
}


dorianps/LESYMAP documentation built on May 22, 2024, 1:41 p.m.