scale_design_mat {fMRItools}R Documentation

Scale a design matrix

Description

Scale the columns of a matrix by dividing each column by its highest-magnitude value, and then subtracting its mean.

Usage

scale_design_mat(x, doRows = FALSE)

Arguments

x

A T×KT \times K numeric matrix. In the context of a design matrix for a GLM analysis of task fMRI, TT is the number of time points and KK is the number of task covariates.

doRows

Scale the rows instead? Default: FALSE.

Value

The scaled design matrix

Examples

scale_design_mat(cbind(seq(7), 1, rnorm(7)))

[Package fMRItools version 0.4.7 Index]