lsm_ttestFast: T-tests for symptom mapping (fast)

Description Usage Arguments Value Author(s) Examples

View source: R/lsm_ttestFast.R

Description

Lesion to symptom mapping performed on a prepared matrix. T-tests are performed using each column of the matrix to split the behavioral scores in two groups. If var.equal=TRUE the Welch test is performed instead. This function relies on TTfast, a compiled version to run on thousands of voxels (about 60 faster then regular t-tests in R).

Usage

1
2
3
lsm_ttestFast(lesmat, behavior, var.equal = TRUE,
  alternative = "greater", checkAssumptions = TRUE, showInfo = TRUE,
  ...)

Arguments

lesmat

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

behavior

vector of behavioral scores.

var.equal

logical (default=TRUE) should the variance between groups considered equal (t-test) or unequal (Welch test).

alternative

(default='greater') Sets the expected relationship between voxel value and behavior. By default voxels with zero are not lesioned, and behavior is expected to be higher, thus alternative='greater'. If the relationship in your data is inverted, use alternative='less', and if you don't have a relationship hypothesis data, use alternative='two.sided'.

checkAssumptions

(default=TRUE) Check how many voxels violate the t-test assumptions (heteroscadsticity and/or normality).

showInfo

logical (default=TRUE), display time-stamped info messages

...

other arguments received from lesymap.

Value

List of objects returned:

Author(s)

Dorian Pustina

Examples

1
2
3
4
5
6
7
{
set.seed(123)
lesmat = matrix(rbinom(200,1,0.5), ncol=2)
set.seed(123)
behavior = rnorm(100)
result = lsm_ttestFast(lesmat, behavior)
}

neuroconductor-releases/LESYMAP documentation built on Nov. 13, 2020, 11:28 p.m.