Ana Conesa wrote:

> I am using the mvr function of the package pls.pcr to compute PLS 
> resgression

You should consider switching to the package 'pls'.  It supersedes
'pls.pcr', which is no longer maintained (the last version came in 2005).

In pls, you would do the following to get R^2 and cross-validated R^2
(A.K.A. Q^2):

mypls <- plsr(Ytrain ~ Xtrain, ncomp = 1, validation="LOO")
## R^2:
R2(mypls, estimate = "train")
## cross-validated R^2:
R2(mypls)
## Both:
R2(mypls, estimate = "all")

-- 
Bjørn-Helge Mevik

______________________________________________
R-help@r-project.org 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.

Reply via email to