cleanup_regressor: Small utility function to handle any NAs in the regressor...

View source: R/fmri_utility_fx.R

cleanup_regressorR Documentation

Small utility function to handle any NAs in the regressor specification. Also, optionally, removes values of 0 from the regressor prior to convolution. The latter is usually a good idea to avoid a non-event (zero) becoming an event after mean centering of a parametric regressor. Convolving a zero-height regressor with an HRF will maintain all zeros, whereas a non-zero value (resulting from mean centering) will not.

Description

Small utility function to handle any NAs in the regressor specification. Also, optionally, removes values of 0 from the regressor prior to convolution. The latter is usually a good idea to avoid a non-event (zero) becoming an event after mean centering of a parametric regressor. Convolving a zero-height regressor with an HRF will maintain all zeros, whereas a non-zero value (resulting from mean centering) will not.

Usage

cleanup_regressor(times, durations, values, rm_zeros = TRUE)

Arguments

times

Vector of times (in seconds) for regressor events

durations

Vector of durations (in seconds) for regressor events

values

Vector of values (parametric heights) for regressor events

rm_zeros

Logical indicating whether to remove zero-valued events from regressor

Author(s)

Michael Hallquist


PennStateDEPENdLab/dependlab documentation built on April 10, 2024, 5:15 p.m.