Hi R community,

I am trying to fit a PLS model with response Y and predictor X, where X consists of at least 30 columns (say x1, x2, ..., x30).  Aside from studying the relationship of Y and x1, ..., x30, I am also interested in studying the effect of quadratic terms (x1^2, ..., x30^2) and two-way interactions (x1*x2, x1*x3, ..., x29*x30) on Y.

My R code is 

dat.pls<-plsr(Y ~ X^2 + I(X^2), ncomp = 2, method="oscorespls")

This code does not work for me.  I got this from Chapter 11 of "An Introduction to R."

Any suggestion of what the appropritae code should be is highly appreciated.

Thanks,


Jaclyn M.


      
	[[alternative HTML version deleted]]

