[R] package(pls) - extracting explained Y-variance
Bjørn-Helge Mevik
b.h.mevik at usit.uio.no
Mon Jun 28 10:25:33 CEST 2010
Christian Jebsen <jebsen at rz.uni-leipzig.de> writes:
> Dear R-help users,
>
> I'd like to use the R-package "pls" and want to extract the explained
> Y-variance to identify the important (PLS-) principal components in my
> model, related to the y-data. For explained X-variance there is a function:
> "explvar()". If I understand it right, the summary() function gives an
> overview, where the y-variance is shown, but I can't extract it for
> plotting.
If you look at the summary function (summary.mvr), you will see that it
uses the R2 function for this:
yve <- 100 * drop(R2(object, estimate = "train",
intercept = FALSE)$val)
(For cross-validated or test set validated models, it uses RMSEP.)
--
Bjørn-Helge Mevik
More information about the R-help
mailing list