Compute principal component analysis (PCA) using robust measures of location and scale so that extreme observations have a reduced influence on the resulting components. The implementation centres each variable by its median and, when requested, scales by the median absolute deviation (MAD) before performing an iteratively reweighted singular value decomposition that down-weights observations with unusually large reconstruction errors.
Arguments
- x
A numeric matrix, data frame, or an object coercible to a numeric matrix. Missing values are not supported.
- center
Logical; should variables be centred by their median before applying PCA?
- scale
Logical; when
TRUE
, variables are scaled by the MAD after centring. Scaling requirescenter = TRUE
.- ncomp
Number of components to retain. Use
NULL
or a non-positive value to keep all components returned by the decomposition.
Value
A bigpca
object mirroring the structure of
pca_bigmatrix()
with robust estimates of location, scale, and
variance metrics.