term_matrices.fmri_model: Construct term matrices for an fMRI model

View source: R/fmrilm.R

term_matrices.fmri_modelR Documentation

Construct term matrices for an fMRI model

Description

This function constructs the term matrices for an fMRI model, which consists of event-related terms and baseline-related terms. The term matrices are used for building the design matrix in fMRI data analysis.

Usage

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

Arguments

x

An object of class "fmri_model" containing the event and baseline models.

blocknum

(Optional) A numeric vector specifying the block numbers to be included in the term matrices. By default, all unique block numbers in the event model are included.

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.

See Also

fmri_model


bbuchsbaum/fmrireg documentation built on May 16, 2023, 10:56 a.m.