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

pca.distances

Compute score and orthogonal distances for Principal Components (objects of class 'Pca')


Description

Compute score and orthogonal distances for an object (derived from)Pca-class.

Usage

pca.distances(obj, data, r, crit=0.975)

Arguments

obj

an object of class (derived from) "Pca".

data

The data matrix for which the "Pca" object was computed.

r

rank of data

crit

Criterion to use for computing the cutoff values.

Details

This function calculates the score and orthogonal distances and the appropriate cutoff values for identifying outlying observations. The computed values are used to create a vector a of flags, one for each observation, identifying the outliers.

Value

An S4 object of class derived from the virtual class Pca-class - the same object passed to the function, but with the score and orthogonal distances as well as their cutoff values and the corresponding flags appended to it.

Author(s)

References

M. Hubert, P. J. Rousseeuw, K. Vanden Branden (2005), ROBPCA: a new approach to robust principal components analysis, Technometrics, 47, 64–79.

Todorov V & Filzmoser P (2009), An Object Oriented Framework for Robust Multivariate Analysis. Journal of Statistical Software, 32(3), 1–47. URL http://www.jstatsoft.org/v32/i03/.

Examples

## PCA of the Hawkins Bradu Kass's Artificial Data
##  using all 4 variables
data(hbk)
pca <- PcaHubert(hbk)
pca.distances(pca, hbk, rankMM(hbk))

rrcov

Scalable Robust Estimators with High Breakdown Point

v1.5-5
GPL (>= 2)
Authors
Valentin Todorov [aut, cre] (<https://orcid.org/0000-0003-4215-0245>)
Initial release
2020-07-31

We don't support your browser anymore

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