Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pcaDiagplot

Diagnostics plot for PCA


Description

Score distances and orthogonal distances are computed and plotted.

Usage

pcaDiagplot(X, X.pca, a = 2, quantile = 0.975, scale = TRUE, plot = TRUE, ...)

Arguments

X

numeric data frame or matrix

X.pca

PCA object resulting e.g. from princomp

a

number of principal components

quantile

quantile for the critical cut-off values

scale

if TRUE then X will be scaled - and X.pca should be from scaled data too

plot

if TRUE a plot is generated

...

additional graphics parameters, see par

Details

The score distance measures the outlyingness of the onjects within the PCA space using Mahalanobis distances. The orthogonal distance measures the distance of the objects orthogonal to the PCA space. Cut-off values for both distance measures help to distinguish between outliers and regular observations.

Value

SDist

Score distances

ODist

Orthogonal distances

critSD

critical cut-off value for the score distances

critOD

critical cut-off value for the orthogonal distances

Author(s)

Peter Filzmoser <P.Filzmoser@tuwien.ac.at>

References

K. Varmuza and P. Filzmoser: Introduction to Multivariate Statistical Analysis in Chemometrics. CRC Press, Boca Raton, FL, 2009.

See Also

Examples

data(glass)
require(robustbase)
glass.mcd <- covMcd(glass)
rpca <- princomp(glass,covmat=glass.mcd)
res <- pcaDiagplot(glass,rpca,a=2)

chemometrics

Multivariate Statistical Analysis in Chemometrics

v1.4.2
GPL (>= 3)
Authors
Peter Filzmoser and Kurt Varmuza
Initial release
2017-03-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.