rcr.m

% ------------------------------------------------------------------------
% Function: [yp,B,T,P,W]=rcr(X,y,4,0.5,10)
% ------------------------------------------------------------------------
% Aim:
% Robust continuum regression estimator based on projection pursuit, RCR 
% ------------------------------------------------------------------------
% Input: 
% X, matrix (n,p), predictor matrix 
% y, vector (n,1), predictand
% h, scalar, number of factors
% delta, scalar in the interval [0 1], the value of the continuum 
%        parameter at which the outputs should be given
%        (O= robust MLR; 1= (approximatively) robust PCR)
% pct, scalar, percentage of trimming desired (assumed feaction of
%      outliers in the data)
% ------------------------------------------------------------------------
% Output: 
% yp, vector (n,h), predicted response for increasing number of factors
% B, vector (p,h), regression coefficients
% T, matrix (n,h), scores
% P, matrix (p,h), loadings
% W, matrix (p,h), weights
% ------------------------------------------------------------------------
% Example: [yp,B,T,P,W]=rcr(X,y,4,0.5,10)
% ------------------------------------------------------------------------
% Reference: 
% S. Serneels, P. Filzmoser, C. Croux, P.J. Van Espen, Robust Continuum
% Regression, Chemometrics and Intelligent Laboratory Systems,
% 76 (2005) 197-204
Valid CSS! Valid HTML 4.01!