contrast_weights.column_contrast_spec: Column Contrast Weights

View source: R/contrast.R

contrast_weights.column_contrast_specR Documentation

Column Contrast Weights

Description

Compute contrast weights for a column_contrast_spec object by targeting design matrix columns based on regex patterns.

Usage

## S3 method for class 'column_contrast_spec'
contrast_weights(x, term, ...)

Arguments

x

A column_contrast_spec object.

term

An event_term object.

...

Additional arguments (currently unused).

Value

A list containing the contrast details:

term

The original event_term object.

name

The name of the contrast.

weights

A numeric matrix where rows correspond to the full design matrix columns (from .condnames(term, expanded = TRUE)) and columns represent the contrast(s). Usually one column.

condnames

Character vector of all potential expanded condition names from term.

contrast_spec

The original column_contrast_spec object.


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