[R] PLS in R and SAS
Lukasz Komsta
luke at ariadna.cd
Mon May 21 22:31:09 CEST 2007
Dnia 2007-05-21 21:59, Użytkownik Kyle Rogers napisał:
> Any clarification on this matter will be greatly appreciated.
The result obtained with R is calculated with centering the x1-x3 matrix
around the column means. The SAS result is calculating without any
preprocessing of data.
Unfortunately, the pls package has no easy option to turn data centering
off. If you really want to turn it off, you must comment corresponding
lines in for example simpls.fit:
Xmeans <- colMeans(X)
X <- X - rep(Xmeans, each = nobj)
Ymeans <- colMeans(Y)
Y <- Y - rep(Ymeans, each = nobj)
I do not know what is your data, but you probably WANT to center them
around the column means. The uncentered version of PLS, PCR and other
multivariate regression can be considered only if all columns of X are
in the same unit and there is no expected intercept term (for example
spectral data). Any other approach requires at least centering. If you
fit uncentered version, you should compare its RMSEP with centered and
choose better variant.
Regards,
Lukasz
More information about the R-help
mailing list