HRF_main: Canonical (double-gamma) HRF

View source: R/HRF_calc.R

HRF_mainR Documentation

Canonical (double-gamma) HRF

Description

Calculate the HRF from a time vector and parameters. Optionally compute the first or second derivative of the HRF instead. Form of HRF is similar to SPM but here the response and undershoot are scaled so the difference of the HRFs peaks at 1 and -c

Usage

HRF_main(t, a1 = 6, b1 = 1, a2 = NULL, b2 = NULL, c = 1/6, o = 0)

Arguments

t

time vector (in seconds). Must be equally spaced.

a1

delay of response. Default: 6

b1

response dispersion. Default: 1

a2

delay of undershoot. Default: 16/6*a1 = 16

b2

dispersion of undershoot. Default: b1 = 1

c

scale of undershoot. Default: 1/6

o

onset of response (in seconds). Default: 0

Value

HRF vector corresponding to time vector t

Examples

upsample <- 100
HRF_main(seq(0, 30, by=1/upsample))


hrf documentation built on April 3, 2025, 10:36 p.m.