Learn R Programming

BayesBrainMap (version 0.1.3)

dim_reduce: PCA-based Dimension Reduction and Prewhitening

Description

Performs dimension reduction and prewhitening based on probabilistic PCA using SVD. If dimensionality is not specified, it is estimated using the method described in Minka (2008).

Usage

dim_reduce(X, Q = NULL, Q_max = 100)

Value

A list containing the dimension-reduced data (data_reduced, a \(V \times Q\) matrix), prewhitening/dimension reduction matrix (H, a \(QxT\) matrix) and its (pseudo-)inverse (Hinv, a \(TxQ\)

matrix), the noise variance (sigma_sq), the correlation matrix of the dimension-reduced data (C_diag, a \(QxQ\) matrix), and the dimensionality (Q).

Arguments

X

A numeric matrix, with each column being a centered timeseries. For fMRI data, X should be T timepoints by V brain locations.

Q

Number of latent dimensions to estimate. If NULL (default), estimated using PESEL (Sobczyka et al. 2020).

Q_max

Maximal number of principal components for automatic dimensionality selection with PESEL. Default: 100.