simulate_cifti_multiple: Simulate cifti data for task fMRI for multiple subjects,...

View source: R/simulate_cifti.R

simulate_cifti_multipleR Documentation

Simulate cifti data for task fMRI for multiple subjects, sessions, and runs

Description

Simulate cifti data for task fMRI for multiple subjects, sessions, and runs

Usage

simulate_cifti_multiple(
  wb_path,
  brainstructure = "both",
  n_subjects = 1,
  n_sessions = 1,
  n_runs = 1,
  ntasks = 2,
  ntime = 300,
  resamp_res = NULL,
  max_amplitude = 1,
  onsets = NULL,
  durations = NULL,
  TR = 1,
  subject_var = NULL,
  session_var = NULL,
  run_var = NULL,
  ar_error = NULL,
  surfL = NULL,
  surfR = NULL
)

Arguments

wb_path

Path to the connectome workbench (required)

brainstructure

Which structure(s) should be generated? One of "left", "right", "subcortical", or "both". The "both" option will return cortical surface simulations for the left hemisphere. It is currently not possible to simulate cortical surface and subcortical data in the same simuulation. Default is "both".

n_subjects

The number of subjects for which data should be generated

n_sessions

The number of sessions of data per subject to be generated

n_runs

The number of runs per session to be generated

ntasks

The number of tasks with which to simulate response time series

ntime

The length of the response time series

resamp_res

The resolution at which to resample the simuluated cifti data (default resamp_res = 5000).

max_amplitude

The maximum amplitude of the coefficients in percent signal change (default max_amplitude = 1)

onsets

A list of times for the onsets of tasks, each element representing a task. Overrides ntasks for determining the number of tasks if both are given.

durations

A list of durations for each task, each element representing a task. The list should have the same length as onsets, and each list element should have the same length as the respective element within onsets.

TR

The repetition time, in seconds. Must be a whole number.

subject_var

The amount of variance in the location of activations between subjects.

session_var

The amount of variance in the location of activations between sessions.

run_var

The amount of variance in the location of activations between runs.

ar_error

A vector of length p of the AR(p) coefficients for the error term. The default is NULL, which results in no autoregressive error. These coefficient values will be simulated to vary across the spatial field in order to more accurately reflect most cifti data

surfL

Left surface to use for the simulated cifti. If none are given, the default surfaces from ciftiTools are used.

surfR

Right surface to use for the simulated cifti. If none are given, the default surfaces from ciftiTools are used.

Value

A list of objects containing the simulated data and the relevant information used to create the data. The simulated response data are found within the cifti object. The simulated amplitude fields are found as cifti objects within the coefficients object. The simulated design matrix is found in the design object.

Examples

## Not run: 
simulate_cifti()

## End(Not run)

danieladamspencer/brainSim documentation built on April 14, 2022, 3:15 p.m.