rpca.m

% ------------------------------------------------------------------------
% Function: [rpc,rv,rd,ROD,RD]=rPCA(x,fn)
% ------------------------------------------------------------------------
% Aim:
% Robust Principal Component Analysis (with Croux and Ruiz-Gazen algorithm)  
% ------------------------------------------------------------------------
% Input: 
% x, matrix (n,p), data matrix n-objects, p-variables
% fn, scalar, number of robust PCs to be extracted
% ------------------------------------------------------------------------
% Output:
% rpc, matrix (n,f), containing in columns robust Principal Components
% rv, vector (1,f), with eigenvalues
% rd, matrix (n,f), containing in columns loadings 
% ROD, matrix (n,f), scaled Robust Orthogonal Distances obtained for each 
% object for increasing number of factors in the model computed as follows:
% {ROD-median(ROD)}/qn(ROD) (cut-off value e.g. 2.5 or 3)
% RD, matrix (n,f), scaled Robust Distances obtained for each object
% for increasing number of factors in the model computed as follows:
% {RD-median(RD)}/qn(RD) (cut-off value e.g. 2.5 or 3)
% ------------------------------------------------------------------------
% Example:
% [rpc,rv,rd,exRD,ROD,RD]=rPCA(x,fn)
% ------------------------------------------------------------------------
% References: 
% [1] C. Croux, A. Ruiz-Gazen, High breakdown estimators for principal 
% components: the projection-pursuit approach revisited, Journal of 
% Multivariate Analysis 95 (2005) 206-226 
% [2] M. Hubert, P. Rousseeuw, S. Verboven, A fast algorithm for 
% robust principal components with application to chemometrics, 
% Chemometrics and Intelligent Laboratory Systems 60 (2002) 101-111
% [3] I. Stanimirova, B. Walczak, D. L. Massart, V. Simeonov, 
% A comparison between two robust PCA algorithms,
% Chemometrics and Intelligent Laboratory Systems 71 (2004) 83-95
Valid CSS! Valid HTML 4.01!