wimpls.m

% ------------------------------------------------------------------------
% Function: [B,C,P,T,U,R,R2X,R2Y]=wimpls(X,Y,A,D) 
% ------------------------------------------------------------------------
% Aim:
% Partial Least Squares for wide X matrices, WIM-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
% D, matrix (n,n), association matrix X*X' (optional)
% ------------------------------------------------------------------------
% 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), cumulative X-variance accounted for
% R2Y, vecor (1,h), cumulative Y-variance
% ------------------------------------------------------------------------
% Example:
% [B,C,P,T,U,R,R2X,R2Y]=wimpls(X,y,10,[])
% ------------------------------------------------------------------------
% The routine is included into the toolbox with personal agreement 
% of its author Sijmen de Jong
Valid CSS! Valid HTML 4.01!