fmri_simulate_func: real-valued fMRI data simulation

Description Usage Arguments Details Value Author(s) Examples

View source: R/fmri_simulate_func.R

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

1
2
3
4
5
6
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

Author(s)

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

Examples

1
2
3
4
5
6
7
# 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 April 30, 2021, 5:08 p.m.