[R] question about plsr() results

Bjørn-Helge Mevik b.h.mevik at usit.uio.no
Fri Dec 2 11:59:07 CET 2011

Vytautas Rakeviius <vytautas1987 at yahoo.com> writes:

> But still I have question about results interpretation. In the end I
> want to construct prediction function in form:
> Y=a1x1+a2x2

The predict() function does the prediction for you.  If you want to
construct the prediction _equation_, you can extract the coefficients
from the model with

coef(yourmodel, ncomp = thenumberofcomponents, intercept = TRUE)

See ?coef.mvr for details.

> Documentation do not describe this.

The pls package is designed to work as much as possible like the lm()
function and its methods, helpers.  So read any introduction to linear
models in R, and you will come a long way.

There is also a paper in JSS about the pls package: http://www.jstatsoft.org/v18/i02/

Bjørn-Helge Mevik

More information about the R-help mailing list