[R] question about stdize() in PLS package

From: <jz7_at_duke.edu>
Date: Thu 03 Aug 2006 - 07:29:47 EST


Dear all,

I am using the PLS package for PLSR analysis. And I have a basic question about the standardize procedure, which I feel the PLS manual does not explain clearly. I am hoping that I could get some help from the list.

>From the example in the "Standardization of Data Matrices" section, I can
standardize X matrix and make prediction by using:

mod=plsr(y~stdize(X),ncomp=6,data=NIR[NIR$train,]) pred=predict(mod,newdata=NIR[!NIR$train,])

In the manual, it is commented that the prediction is "automatically standardized". So I guess I won't need to standardize X matrix of the test set for the prediction.

However, what if I do not want a standardize model from the beginning? Then my code would be like:

mod=plsr(y~X,ncomp=6,data=NIR[NIR$train,])

But the R code for the prediction should still be the same (please correct me if any code is wrong):

pred=predict(mod,newdata=NIR[!NIR$train,])

Would this time the X matrix of the newdata be automatical standardized or not?

I am so confused about the "automatically standardization". Please share some experience. Really appreciate your kind help!

Sincerely,
Jeny



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu Aug 03 10:50:13 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 03 Aug 2006 - 12:18:38 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.