sim.fmri: Simulate FMRI Data

View source: R/sim-fmri.R

sim.fmriR Documentation

Simulate FMRI Data

Description

This function returns the synthetic spatiotemporal data set resembling functional MR Images (fMRI) data.

Usage

  sim.fmri(hrf, beta)

Arguments

hrf

haemodynamic response function, needs to be a vector of length T.

beta

scalar, defines the height of the activated area, in form of a cylinder.

Details

The returned data is simulated on a 20 x 20 grid.

Value

fmri

matrix, simulated fmri data.

Note

This function is solely for one covariate.

Author(s)

Maximilian Hughes

Examples

# non-transformed hr-function
T <- 210
seq.length <- T*3
index <- seq(3, T*3, by = 3)
hrf <- rep(c(-0.5, 0.5), each=30, times=ceiling(T/30*1.5))
hrf <- as.matrix(hrf[index])
# define height of activation area
beta <- 3
# use function to obtain fmri data
data <- sim.fmri(hrf, beta)$fmri

adaptsmoFMRI documentation built on Sept. 25, 2022, 5:06 p.m.