dual_reg: Dual Regression

View source: R/dual_reg.R

dual_regR Documentation

Dual Regression

Description

Dual Regression

Usage

dual_reg(
  BOLD,
  GICA,
  scale = c("local", "global", "none"),
  scale_sm_xifti = NULL,
  scale_sm_FWHM = 2,
  TR = NULL,
  hpf = 0.01,
  lpf = NULL,
  GSR = FALSE
)

Arguments

BOLD

Subject-level fMRI data matrix (V \times T). Rows will be centered.

GICA

Group-level independent components (V \times Q)

scale

"local" (default), "global", or "none". Local scaling will divide each data location's time series by its estimated standard deviation. Global scaling will divide the entire data matrix by the mean image standard deviation (mean(sqrt(rowVars(BOLD)))).

scale_sm_xifti, scale_sm_FWHM

Only applies if scale=="local" and BOLD represents CIFTI-format data. To smooth the standard deviation estimates used for local scaling, provide a "xifti" object with data locations in alignment with BOLD, as well as the smoothing FWHM (default: 2). If no "xifti" object is provided (default), do not smooth.

TR

The temporal resolution of the data, i.e. the time between volumes, in seconds. TR is required for detrending with hpf.

hpf, lpf

The frequencies at which to apply a highpass filter or lowpass filter to the data during pre-processing, in Hertz. Set either to NULL to disable filtering. Default: 0.01 Hertz for the highpass filter, and NULL for the lowpass filter.

The highpass filter serves to detrend the data, since low-frequency variance is associated with noise. Highpass filtering is accomplished by nuisance regression of discrete cosine transform (DCT) bases.

The lowpass filter removes high-frequency variance also thought to be associated with non-neuronal noise.

Note the TR argument is required for temporal filtering. If TR is not provided, hpf and lpf will be ignored.

GSR

Center BOLD across columns (each image)? This is equivalent to performing global signal regression. Default: FALSE.

Value

A list containing the subject-level independent components S (V \times Q), and subject-level mixing matrix A (TxQ).

Examples

nT <- 30
nV <- 400
nQ <- 7
mU <- matrix(rnorm(nV*nQ), nrow=nV)
mS <- mU %*% diag(seq(nQ, 1)) %*% matrix(rnorm(nQ*nT), nrow=nQ)
BOLD <- mS + rnorm(nV*nT, sd=.05)
GICA <- mU
dual_reg(BOLD=BOLD, GICA=mU, scale="local")


fMRItools documentation built on June 10, 2025, 9:09 a.m.