term_matrices.fmri_model: Extract Term Matrices from an fMRI Model

View source: R/fmrilm.R

term_matrices.fmri_modelR Documentation

Extract Term Matrices from an fMRI Model

Description

This function extracts the term matrices from an fmri_model, which consists of event-related terms and baseline-related terms. These matrices are used to build the design matrix in fMRI data analysis.

Usage

## S3 method for class 'fmri_model'
term_matrices(x, blocknum = NULL)

Arguments

x

An fmri_model object containing the event and baseline models.

blocknum

(Optional) A numeric vector specifying the block numbers to include. Defaults to all blocks.

Value

A named list of term matrices, with event terms followed by baseline terms. Attributes "event_term_indices" and "baseline_term_indices" store the indices of event and baseline terms, "blocknum" stores the block numbers, and "varnames" stores the variable names.


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