Learn R Programming

fMRItools (version 0.7.2)

scale_design_mat: 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)

Value

The scaled design matrix

Arguments

x

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

doRows

Scale the rows instead? Default: FALSE.

Examples

Run this code
scale_design_mat(cbind(seq(7), 1, rnorm(7)))

Run the code above in your browser using DataLab