pca_motion: small helper function for compressing motion parameters using...

View source: R/glm_helper_functions.R

pca_motionR Documentation

small helper function for compressing motion parameters using PCA

Description

small helper function for compressing motion parameters using PCA

Usage

pca_motion(motion_df, num_pcs = 3L, zscore = TRUE, verbose = FALSE)

Arguments

motion_df

volumes x motion parameters data frame for PCA compression

num_pcs

number of principal components to extract

zscore

whether to standardize motion parameters prior to PCA (this is a good idea)

verbose

whether to print the variance explained by PCs and the multiple correlations of among motion parameters

Value

A matrix of PCA-compressed motion regressors


UNCDEPENdLab/fmri.pipeline documentation built on April 3, 2025, 3:21 p.m.