HRF_calc: Canonical HRF and Derivatives

View source: R/HRF_calc.R

HRF_calcR Documentation

Canonical HRF and Derivatives

Description

Calculate the HRF from a time vector and parameters, or its derivative with respect to delay or dispersion.

Usage

HRF_calc(
  t,
  deriv = 0,
  a1 = 6,
  b1 = 1,
  a2 = 16/6 * a1 * sqrt(b1),
  b2 = b1,
  c = 1/6,
  o = 0
)

Arguments

t

time vector (in units of seconds)

deriv

0 (default) for the HRF, 1 for the delay derivative of the HRF, or 2 for the dispersion derivative of the HRF.

a1

delay of response. Default: 6

b1

response dispersion. Default: 1

a2

delay of undershoot. Default: 16/6 * a1 * sqrt(b1) = 16

b2

dispersion of undershoot. Default: b1 = 1

c

scale of undershoot. Default: 1/6

o

onset of response. Default: 0

Value

HRF vector (or dHRF, or d2HRF) corresponding to time vector t

Examples

samples_per_sec <- 200
nsec <- 50
HRF_calc(seq(nsec*samples_per_sec)/samples_per_sec)


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