hrf_spmg1: hrf_spmg1

View source: R/hrf.R

hrf_spmg1R Documentation

hrf_spmg1

Description

A hemodynamic response function based on the SPM canonical double gamma parameterization.

Usage

hrf_spmg1(t, P1 = 5, P2 = 15, A1 = 0.0833)

Arguments

t

A vector of time points.

P1

The first exponent parameter (default: 5).

P2

The second exponent parameter (default: 15).

A1

Amplitude scaling factor for the positive gamma function component; normally fixed at .0833

Details

This function models the hemodynamic response using the canonical double gamma parameterization in the SPM software. The HRF is defined by a linear combination of two gamma functions with different exponents (P1 and P2) and amplitudes (A1 and A2). It is commonly used in fMRI data analysis to estimate the BOLD (blood-oxygen-level-dependent) signal changes associated with neural activity.

Value

A vector of HRF values at the given time points.

See Also

Other hrf_functions: hrf_bspline(), hrf_gamma(), hrf_gaussian(), hrf_inv_logit(), hrf_mexhat(), hrf_sine(), hrf_time()

Examples

# Generate a time vector
time_points <- seq(0, 30, by=0.1)
# Compute the HRF values using the SPM canonical double gamma parameterization
hrf_values <- hrf_spmg1(time_points)
# Plot the HRF values
plot(time_points, hrf_values, type='l', main='SPM Canonical Double Gamma HRF')

bbuchsbaum/fmrireg documentation built on May 16, 2023, 10:56 a.m.