PCA Outlier Diagnostics
pca_outliers.RdCalculates Hotelling T^2 (score distance) and Q-residual (orthogonal distance) for each observation, given a chosen number of components.
Arguments
- x
A
pcaobject.- X
The original data matrix used for PCA.
- ncomp
Number of components to consider.
- cutoff
Logical or numeric specifying threshold for labeling outliers. If
TRUE, uses some typical statistical threshold (F-dist) for T^2, or sets an arbitrary Q limit. If numeric, treat it as a cutoff. Default isFALSE(no labeling).