hemodynamicRF: Linear Model for FMRI Data

Description Usage Arguments Details Value Author(s) References Examples

Description

Create the expected BOLD response for a given task indicator function. Borrowed from the fmri package.

Usage

1
2
3
  hemodynamicRF(scans = 1, onsets = c(1), durations = c(1), rt = 3,
                times= NULL, mean = TRUE,
                a1 = 6, a2 = 12, b1 = 0.9, b2 = 0.9, cc = 0.35)

Arguments

scans

number of scans

onsets

vector of onset times (in scans)

durations

vector of duration of ON stimulus in scans or seconds (if !is.null(times))

rt

time between scans in seconds (TR)

times

onset times in seconds. If present onsets arguments is ignored.

mean

logical. if TRUE the mean is substracted from the resulting vector

a1

parameter of the hemodynamic response function (see details)

a2

parameter of the hemodynamic response function (see details)

b1

parameter of the hemodynamic response function (see details)

b2

parameter of the hemodynamic response function (see details)

cc

parameter of the hemodynamic response function (see details)

Details

The functions calculates the expected BOLD response for the task indicator function given by the argument as a convolution with the hemodynamic response function. The latter is modelled by the difference between two gamma functions as given in the reference (with the defaults for a1, a2, b1, b2, cc given therein):

(x/d1)^a1 * exp(-(x - d1)/b1) - c * (x/d2)^a2 * exp(-(x - d2)/b2)

The parameters of this function can be changed through the arguments a1, a2, b1, b2, cc.

The dimension of the function value is set to c(scans,1).

If !is.null(times) durations are specified in seconds.

If mean is TRUE (default) the resulting vector is corrected to have zero mean.

Value

Vector with dimension c(scans, 1).

Author(s)

Karsten Tabelow tabelow@wias-berlin.de

References

Worsley, K.J., Liao, C., Aston, J., Petre, V., Duncan, G.H., Morales, F., Evans, A.C. (2002). A general statistical analysis for fMRI data. NeuroImage, 15:1-15.

Polzehl, J. and Tabelow, K. (2007) fmri: A Package for Analyzing fmri Data, R News, 7:13-17 .

Examples

1
2
  # Example 1
  hrf <- hemodynamicRF(107, c(18, 48, 78), 15, 2)

stnava/itkImageR documentation built on May 30, 2019, 7:21 p.m.