PcaLocantore {rrcov}R Documentation

Spherical Principal Components

Description

The Spherical Principal Components procedure was proposed by Locantore et al., (1999) as a functional data analysis method. The idea is to perform classical PCA on the data, projected onto a unit sphere. The estimates of the eigenvectors are consistent and the procedure is extremely fast. The simulations of Maronna (2005) show that this method has very good performance.

Usage

PcaLocantore(x, ...)
## Default S3 method:
PcaLocantore(x, k = 0, kmax = ncol(x), corr=FALSE, delta = 0.001, 
    na.action = na.fail, trace=FALSE, ...)
## S3 method for class 'formula':
PcaLocantore(formula, data = NULL, subset, na.action, ...)

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 na.fail if that is unset. The default is na.omit.
... arguments passed to or from other methods.
x a numeric matrix (or data frame) which provides the data for the principal components analysis.
k number of principal components to compute. If k is missing, or k = 0, the algorithm itself will determine the number of components by finding such k that l_k/l_1 >= 10.E-3 and Σ_{j=1}^k l_j/Σ_{j=1}^r l_j >= 0.8. It is preferable to investigate the scree plot in order to choose the number of components and then run again. Default is k=0.
kmax maximal number of principal components to compute. Default is kmax=10. If k is provided, kmax does not need to be specified, unless k is larger than 10.
corr a logical value indicating whether the calculation should use the correlation matrix or the covariance matrix (the correlation matrix can only be used if there are no constant variables). Default is corr=FALSE.
delta an accuracy parameter
trace whether to print intermediate results. Default is trace = FALSE

Details

PcaLocantore, serving as a constructor for objects of class PcaLocantore-class is a generic function with "formula" and "default" methods. For details see the relevant references.

Value

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

Author(s)

Valentin Todorov valentin.todorov@chello.at The SPC algorithm is implemented on the bases of the available from the web site of the book Maronna et al. (2006) code http://www.wiley.com/legacy/wileychi/robust_statistics/

References

N. Locantore, J. Marron, D. Simpson, N. Tripoli, J. Zhang and K. Cohen K. (1999), Robust principal components for functional data. Test, 8, 1-28.

R. Maronna, D. Martin and V. Yohai (2006), Robust Statistics: Theory and Methods. Wiley, New York.

R. Maronna (2005). Principal components and orthogonal regression based on robust scales. Technometrics, 47, 264-273.

Examples

## PCA of the Hawkins Bradu Kass's Artificial Data
##  using all 4 variables
    data(hbk)
    pca <- PcaLocantore(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
    PcaLocantore(~., data=hbk)

## To plot the results:

    plot(pca)                    # distance plot
    pca2 <- PcaLocantore(hbk, k=2)  
    plot(pca2)                   # PCA diagnostic plot (or outlier map)
    
## Use the standard plots available for for prcomp and princomp
    screeplot(pca)    
    biplot(pca)    

[Package rrcov version 0.5-01 Index]