afni_hrf: construct an native AFNI hrf specification for '3dDeconvolve'...

View source: R/afni.R

afni_hrfR Documentation

construct an native AFNI hrf specification for '3dDeconvolve' with the 'stim_times' argument.

Description

construct an native AFNI hrf specification for '3dDeconvolve' with the 'stim_times' argument.

Usage

afni_hrf(
  ...,
  basis = c("spmg1", "block", "dmblock", "tent", "csplin", "poly", "sin", "sine", "gam",
    "gamma", "spmg2", "spmg3", "wav"),
  onsets = NULL,
  durations = NULL,
  prefix = NULL,
  subset = NULL,
  nbasis = 1,
  contrasts = NULL,
  id = NULL,
  lag = 0,
  precision = 0.3,
  summate = TRUE,
  start = NULL,
  stop = NULL
)

Arguments

...

Variables to include in the HRF specification

basis

Character string specifying the basis function type

onsets

Numeric vector of event onset times

durations

Numeric vector of event durations

prefix

Character string prefix for the term

subset

Expression for subsetting events

nbasis

Number of basis functions

contrasts

Contrast specifications

id

Character string identifier for the term

lag

Numeric lag in seconds

precision

Numeric precision for convolution

summate

Logical whether to summate overlapping responses

start

the start of the window for sin/poly/csplin models

stop

the stop time for sin/poly/csplin models

Value

an afni_hrfspec instance with class "afni_hrfspec"

Examples

# Create SPM canonical HRF specification
hrf1 <- afni_hrf(onsets = c(10, 30, 50), basis = "spmg1")

# Create block HRF with duration
hrf2 <- afni_hrf(onsets = c(10, 30, 50), durations = 5, basis = "block")

# Create tent basis HRF
hrf3 <- afni_hrf(onsets = c(10, 30, 50), basis = "tent", 
                 start = 0, stop = 20, nbasis = 10)

bbuchsbaum/fmrireg documentation built on June 10, 2025, 8:18 p.m.