偏最小二乘法PLS回归NIPALS算法的Matlab程序及例子functionT,P,W,Wstar,U,b,C,B_pls,Bpls_star,Xori_rec,Yori_rec,R2_X,R2_Y=PLS_nipals(X,Y,nfactor)%USAGE:T,P,W,Wstar,U,b,C,Bpls,Bpls_star,Xhat,Yhat,R2X,R2Y=PLS_nipals(X,Y,nfact)%PLSregressionNIPALSalgorithmPLS回归NIPALS算法%ComputethePLSregressioncoefficientsPLS回归系数的计算%X=T*PY=T*B*C=X*BplsXandYbeingZ-scores%B=diag(b)%Y=X*Bpls_starwithXbeingaugmentedwithacolofones%andYandXhavingtheiroriginalunits%T*T=I(NBnormalizationvSAS)%W*W=I%Testfo