lsm_chisq | R Documentation |
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.
lsm_chisq(lesmat, behavior, YatesCorrect = TRUE, runPermutations = F,
nperm = 2000, showInfo = TRUE, ...)
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 |
List of objects returned:
statistic
- vector of statistical values
pvalue
- vector of pvalues
zscore
- vector of zscores
Dorian Pustina
{
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.