rescale_columns_01_to_neg1_pos1: Rescale columns of a design matrix to (-1,1).

View source: R/event_model.R

rescale_columns_01_to_neg1_pos1R Documentation

Rescale columns of a design matrix to (-1,1).

Description

Rescale columns of a design matrix to (-1,1).

Usage

rescale_columns_01_to_neg1_pos1(
  DM,
  handle_constant = c("to_zero", "error", "skip")
)

Arguments

DM

A numeric matrix or data frame (e.g. from design_matrix(event_model)).

handle_constant

Whether to force constant (zero-range) columns to zero, or raise an error, or skip them. Default "to_zero" sets them all to 0.

Value

A matrix the same size as DM with each column scaled to (-1,1).


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