pca_outliers | R Documentation |
Calculates Hotelling T^2 (score distance) and Q-residual (orthogonal distance) for each observation, given a chosen number of components.
pca_outliers(x, X, ncomp, cutoff = FALSE)
x |
A |
X |
The original data matrix used for PCA. |
ncomp |
Number of components to consider. |
cutoff |
Logical or numeric specifying threshold for labeling outliers. If |
A data frame with columns T2
and Q
, and optionally an outlier flag.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.