# PcaHubert

0th

Percentile

##### ROBPCA - ROBust method for Principal Components Analysis

The ROBPCA algorithm was proposed by Hubert et al (2005) and stays for 'ROBust method for Principal Components Analysis'. It is resistant to outliers in the data. The robust loadings are computed using projection-pursuit techniques and the MCD method. Therefore ROBPCA can be applied to both low and high-dimensional data sets. In low dimensions, the MCD method is applied.

Keywords
multivariate, robust
##### Usage
PcaHubert(x, ...)
## S3 method for class 'default':
PcaHubert(x, k = 0, kmax = 10, alpha = 0.75, mcd = TRUE,
maxdir=250, scale = FALSE, signflip = TRUE, trace=FALSE, \dots)
## S3 method for class 'formula':
PcaHubert(formula, data = NULL, subset, na.action, \dots)
##### Arguments
formula
a formula with no response variable, referring only to numeric variables.
data
an optional data frame (or similar: see model.frame) containing the variables in the formula formula.
subset
an optional vector used to select rows (observations) of the data matrix x.
na.action
a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is
...
arguments passed to or from other methods.
x
a numeric matrix (or data frame) which provides the data for the principal components analysis.
k

##### Value

• An S4 object of class PcaHubert-class which is a subclass of the virtual class PcaRobust-class.

##### Note

The ROBPCA algorithm is implemented on the bases of the Matlab implementation, available as part of LIBRA, a Matlab Library for Robust Analysis to be found at www.wis.kuleuven.ac.be/stat/robust.html

##### 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/.

##### Aliases
• PcaHubert
• PcaHubert.formula
• PcaHubert.default
##### Examples
## PCA of the Hawkins Bradu Kass's Artificial Data
##  using all 4 variables
data(hbk)
pca <- PcaHubert(hbk)
pca

## Compare with the classical PCA
prcomp(hbk)

## or
PcaClassic(hbk)

## If you want to print the scores too, use
print(pca, print.x=TRUE)

## Using the formula interface
PcaHubert(~., data=hbk)

## To plot the results:

plot(pca)                    # distance plot
pca2 <- PcaHubert(hbk, k=2)
plot(pca2)                   # PCA diagnostic plot (or outlier map)

## Use the standard plots available for prcomp and princomp
screeplot(pca)
biplot(pca)

## Restore the covraiance matrix
py <- PcaHubert(hbk)
cov.1