simulateBehavior: Simulation of behavior scores from lesion maps

View source: R/simulateBehavior.R

simulateBehaviorR Documentation

Simulation of behavior scores from lesion maps

Description

Function simulate behavioral scores based on the lesion load of specific brain areas. Used to run simulation studies.

Usage

simulateBehavior(lesions.list, parcellation, label = NA, mask = NA,
  errorWeight = 0.5, binaryCheck = FALSE, exponent = 1)

Arguments

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.

Value

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.

Author(s)

Dorian Pustina

Examples

{
 ## 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)
}


dorianps/LESYMAP documentation built on June 1, 2024, 2:12 a.m.