Description Usage Arguments Value Author(s) Examples
View source: R/simulateBehavior.R
Function simulate behavioral scores based on the lesion load of specific brain areas. Used to run simulation studies.
1 2 | simulateBehavior(lesions.list, parcellation, label = NA, mask = NA,
errorWeight = 0.5, binaryCheck = FALSE, exponent = 1)
|
lesions.list |
list of lesions (antsImages) or vector of filenames. |
parcellation |
mask or parcellation image. If a parcellation is passed, lesion load will be computed for each different label (value) in the image. Zero and non-affected labels are not returned by default. The parcellation input can be an antsImage or a character vector pointing to a file. |
label |
(default=NA) if a parcellation scheme id being used, you can select which labels to simulate behaviors for (i.e., c(101,43) to simulate behavior for labels with value 101 and 43 only). If not set a simulation will be returned from each parcel. |
mask |
mask to restrict the count of lesioned voxels. It is not recommended to use a mask, because lesions should affect behavior as they are, without the user restricting the lesions to masks defined in post-processing. |
errorWeight |
(default=0.5) the amount of error to be added, i.e., 0.5 means half of the simulation will be error, the other half signal |
binaryCheck |
(default=FALSE) check to make sure all lesions are binary |
exponent |
power exponent to elevate behavior in order to increase non-linearity relationship with lesion load. 1 is default, and 3 is what Wang (2013) reported as lesion load relationship with behavior. |
List of objectas returned:
behavload
- a matrix of simulated behavioral scores.
Each column shows simulation for a single parcel. Column names
indicate the label number in the parcellation file.
lesload
- same as behavload, but indicates lesions
loads of the simulated regions.
lesbehavCorrelation
- vector of Pearson correlations
between lesion load and simulated scores.
LesvolBehavCorrelation
- vector of Pearson
correlations between lesion size and simulated scores.
Dorian Pustina
1 2 3 4 5 6 7 8 9 10 11 12 | {
## Not run:
lesydata = file.path(find.package('LESYMAP'),'extdata')
parcellation = antsImageRead(
Sys.glob(file.path(lesydata, 'template', 'Parcellation_403areas.nii.gz')))
filenames = Sys.glob(file.path(lesydata, 'lesions', '*.nii.gz'))
lesions = imageFileNames2ImageList(filenames)
simBehavior = simulateBehavior(lesions.list = lesions, parcellation =
parcellation, label = c(101,43))
## End(Not run)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.