trialwise: trialwise

View source: R/hrf-formula.R

trialwiseR Documentation

trialwise

Description

Generate one regressor per trial (plus an optional grand-mean column) by delegating everything to hrf().

Usage

trialwise(
  basis = "spmg1",
  lag = 0,
  nbasis = 1,
  add_sum = FALSE,
  label = "trial"
)

Arguments

basis, lag, nbasis

Passed straight to hrf().

add_sum

If TRUE, append a column that is the average of all trialwise columns (useful as a conventional main effect).

label

Term label / prefix for the generated columns.

Details

Use it only on the RHS of an event-model formula:

onset ~ trialwise(basis = "spmg1", add_sum = TRUE)

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