convolve.event_term: Convolve an event-related design matrix with an HRF.

View source: R/event_vector.R

convolve.event_termR Documentation

Convolve an event-related design matrix with an HRF.

Description

This function takes an event-related design matrix and convolves it with a given HRF to produce a new design matrix suitable for fMRI analysis.

Usage

## S3 method for class 'event_term'
convolve(
  x,
  hrf,
  sampling_frame,
  drop.empty = TRUE,
  summate = TRUE,
  precision = 0.3,
  ...
)

Arguments

x

A data frame with the design matrix.

hrf

The HRF function.

sampling_frame

Data frame specifying the sampling frame.

drop.empty

Logical; if TRUE, remove empty rows.

summate

Logical; if TRUE, sum the convolved HRF.

precision

Numeric; the convolution precision (default: 0.3).

...

Additional arguments.

Value

A tibble of the convolved design matrix.


bbuchsbaum/fmrireg documentation built on March 1, 2025, 11:20 a.m.