Partial Least Squares Regression independent variables

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Partial Least Squares Regression independent variables

tommym
Hi,

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:

model<-plsr(dataframeY~dataframeX.......)

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?

Thanks

Tommy McDermott