lsm_ttestFast.Rd
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).
lsm_ttestFast(lesmat, behavior, var.equal = TRUE, alternative = "greater", checkAssumptions = TRUE, showInfo = TRUE, ...)
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 |
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 |
List of objects returned:
statistic
- vector of statistical values
pvalue
- vector of pvalues
zscore
- vector of zscores
{ set.seed(123) lesmat = matrix(rbinom(200,1,0.5), ncol=2) set.seed(123) behavior = rnorm(100) result = lsm_ttestFast(lesmat, behavior) }#> #> 07:56:57 checking variance homogeneity... 0 voxels failed (0%) #> 07:56:57 checking distribution normality... 0 voxels failed (0%)