[R] Partial Least Squares Regression independent variables

From: tommym <tommy.mcdermott_at_gmail.com>
Date: Wed, 20 Apr 2011 09:18:47 -0700 (PDT)


I'm running PLSR on the PLS package. I have 507 independent and one dependent variable.

model<-plsr(y~x1+x2+x3......, data = mydata, validation = "CV")

the problem with this is writing in 507 variable names is not realistic as I run out of line space in the command window.

I cannot run the model thus:


as is it is specifically warned against in the documentation.

In the example the independent variables have been collated and are represented by a single name ("NIR", represents numerous variables labelled NIR.1, NIR,2 etc). Can anyone advise on how this is done?


Tommy McDermott

View this message in context: http://r.789695.n4.nabble.com/Partial-Least-Squares-Regression-independent-variables-tp3463478p3463478.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 20 Apr 2011 - 16:36:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Apr 2011 - 17:10:32 GMT.

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

list of date sections of archive