MS-ReVE: build temporal nuisance RDMs from a spec
Source:R/temporal_rdms.R
msreve_temporal_confounds.RdConvenience helper that produces a named list of condition-level temporal
nuisance RDMs for MS-ReVE analyses given an mvpa_design, a time index
(trial onsets or order), and a compact specification. Each entry can be a
kernel-based nuisance (delegates to temporal_nuisance_for_msreve) or
an HRF-overlap-based nuisance built trial-wise then reduced to condition level.
Usage
msreve_temporal_confounds(
mvpa_design,
time_idx,
spec,
reduce = c("min", "mean", "median", "nn_min"),
within_blocks_only = TRUE
)Arguments
- mvpa_design
an
mvpa_designobject- time_idx
numeric/integer time index per trial (seconds, TRs, or ordinal)
- spec
a named list of entries. For kernel entries: include
kerneland optionalwidth,power,lambda,sigma,units,TR,metric. For HRF entries, setkind="hrf"and includeTRplus optionaldurations,hrf,oversampling,length_s,similarity,metric.- reduce
reduction method for condition-level aggregation (
"min","mean","median","nn_min")- within_blocks_only
logical; if TRUE ignore across-run pairs