design_matrix.event_term: Construct a design matrix for an event_term.

View source: R/event_vector.R

design_matrix.event_termR Documentation

Construct a design matrix for an event_term.

Description

This function creates a design matrix from an event_term object by first populating a local environment with event values and then applying model.matrix to the formula derived from the event_term.

Usage

## S3 method for class 'event_term'
design_matrix(x, drop.empty = TRUE, ...)

Arguments

x

An event_term object.

drop.empty

Logical; if TRUE, columns with no events are removed.

...

Additional arguments.

Value

A tibble representing the design matrix.


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