fmri_simulate_func: real-valued fMRI data simulation

View source: R/fmri_simulate_func.R

fmri_simulate_funcR Documentation

real-valued fMRI data simulation

Description

a real-valued fMRI data simulation function, used to simply generate a 3D fMRI data associated with brain area with activated parts inside.

Usage

fmri_simulate_func(
  dim_data,
  mask = NULL,
  ons = c(1, 21, 41, 61, 81, 101, 121, 141),
  dur = c(10, 10, 10, 10, 10, 10, 10, 10)
)

Arguments

dim_data

a vector of length 3 to identify the dimension of fMRI data user wants to simulate

mask

a 3D array of 1’s and 0’s or NULL. To specify the area inside the brain shell. One may use the mask data provided by this package, or generate a 3D array of 1’s and 0’s of the same dimension with the fMRI data to be generated. If NULL, then the function would generate a 3D sphere mask.

ons

a vector of the start time points of the time period when the fMRI data receives stimulation

dur

a vector of the time period when the fMRI data receives stimulation

Details

The function fmri_simulate_func is used to simulate fMRI data with specified dimension and total time points. The fMRI data can be brain-shaped by using the mask data provided in our package, if the dimension fits the same as our data (c(64, 64. 40)). Otherwise, the function will generate a 3D sphere data with multiple activated part inside. The activated parts can be detected based on the p values.

Value

an array with the specified dimension

a list of four elements

  • fmri_data - the fMRI data generated by the function as specialized values.

  • mask - mask of the fMRI data.

  • ons - a vector of the start time points of the time period when the fMRI data receives stimulation.

  • dur - a vector of the time period when the fMRI data receives stimulation. Notice that the length of ons is equal to the length of dur, and all the time period when the data does not receive the simulations have the same duration as its former 'on' time period.

  • on_time - a vector that specifies when motion happens.

Author(s)

SOCR team <http://socr.umich.edu/people/>

Examples

# sample 3D data of mask provided by the package
dim(mask)

# the input dimension is the dimension we want for our simulated fMRI data
fmri_generate = fmri_simulate_func(dim_data = c(64, 64, 40), mask = mask, 
                                   ons = c(1, 21, 41, 61, 81, 101, 121, 141), 
                                   dur = c(10, 10, 10, 10, 10, 10, 10, 10))


TCIU documentation built on Oct. 6, 2023, 5:09 p.m.