condition_basis_list: Convert an 'event_term' to a per-condition basis list

View source: R/condition_basis_list.R

condition_basis_listR Documentation

Convert an event_term to a per-condition basis list

Description

A lightweight wrapper around convolve() that post-processes the resulting design matrix into a named list of T x d matrices - one per experimental condition ("base condition tag"). This keeps all of the heavy lifting inside fmrireg while exposing a minimal, pipe-friendly API that can be used anywhere a condition -> basis split is required (e.g. for CFALS).

Usage

condition_basis_list(
  x,
  hrf,
  sampling_frame,
  ...,
  output = c("condition_list", "matrix")
)

Arguments

x

An event_term object.

hrf

An HRF object to apply.

sampling_frame

A sampling_frame object defining the temporal grid.

...

Further arguments passed on to convolve() (e.g. drop.empty = FALSE).

output

Either "matrix" (default) for the ordinary design matrix or "condition_list" for the split-by-condition list.

Value

A numeric matrix or a named list of matrices, depending on output.


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