leverage: Leverage

View source: R/leverage.R

leverageR Documentation

Leverage

Description

Computes the leverage of each observation in the PC score (U) or IC mixing (M) matrix for projection scrubbing. Can threshold to flag potential outliers.

Usage

leverage(Comps, are_norm = FALSE, median_cutoff = NULL)

Arguments

Comps

The n by Q PC score matrix/IC mixing matrix.

are_norm

Assume the columns of Comps are orthogonal and have 2-norms equal to 1? Speeds up the computation.

median_cutoff

The outlier cutoff, in multiples of the median leverage. Default: NULL (do not compute outliers).

Value

A list with entries "meas" (the leverage values), "cut" (the leverage cutoff value) and "flag" (logical vector indicating the outliers). If !is.null(median_cutoff), "cut" and "flag" are omitted.


fMRIscrub documentation built on Oct. 25, 2023, 9:07 a.m.