plssim.m

% ------------------------------------------------------------------------
% Function: [B,C,P,T,U,R,R2X,R2Y]=plssim(X,Y,h,S,XtX)
% ------------------------------------------------------------------------
% Aim:
% Partial Least Squares for tall X matrices, SIM-PLS 
% ------------------------------------------------------------------------
% Input: 
% X, matrix (n,p), predictor matrix (assumed to be center)
% Y, matrix (n,m), predictand (assumed to be center)
% h, scalar, number of PLS factors
% S, matrix (n,m), S=X'*Y
% XtX, matrix (n,n), XtX=X'*X (boosts speed for tall X matrices n>>p)
% ------------------------------------------------------------------------
% Output: 
% B, matrix (p,m), regression coefficients
% C, matrix (m,h), Y loadings
% P, matrix (p,h), X loadings
% T, matrix (n,h), X scores (standardized) 
% U, matrix (n,h), Y scores
% R, matrix (p,h), X weights
% R2X, vecor (1,h), X-variance
% R2Y, vecor (1,h), Y-variance
% ------------------------------------------------------------------------
% Example: 
% 1/ for non tall matrix: 
% [B]=plssim(X,Y,10,[],X'*Y)
% 2/ for tall matrix:     
% [B]=plssim(X,Y,10,X'*Y,X'*X)
% ------------------------------------------------------------------------
% The above routine is included into the toolbox with personal agreement 
% of its author Sijmen de Jong
% ------------------------------------------------------------------------
% Reference:
% S. de Jong, SIMPLS: An alternative approach to partial least squares 
% regression, Chemometrics and Intelligent Laboratory Systems, 
% 18 (1993) 251-263
Valid CSS! Valid HTML 4.01!