> plsrcue<- plsr(cue~fb+cn+n+ph+fung+bact+resp, data = cue, ncomp=7,
> na.action = NULL, method = "kernelpls", scale=FALSE, validation = "LOO",
> model = TRUE, x = FALSE, y = FALSE)
> and I got this output, where I think I can choose the number of components
> based on RMSEP, but how do I choose it?
There are no "hard" rules for how to choose the number of components,
but one rule of thumb is to stop when the RMSEP starts to flatten out,
or to increase. In your case, I would say 4 components. An easier way
to look at the RMSEP values is with plot(RMSEP(plsrcue)).
(There are some algorithms that can suggest the number of components for
you. Two of those are implemented in the development of the plsr
package (hopefully released during Christmas). You can check it out
here if you wish: https://github.com/bhmevik/pls . Disclaimer: I am the
maintainer of the package. :) )
> - and also, how to proceed from here?
That depends on what you want to do/learn about the system you
aremodelling. Many researchers in fields like spectroscopy or
chemometrics (where PLSR originated) plot loadings and scores and infer
> - and how to make a correlation plot?
corrplot(plsrcue) - at least if you mean a correlation loadings plot.
See ?corrplot for details
> - what to do with the values, coefficients that I get in the Environment
> (pls values)
Again, that depends on what you want with your model.
> Thanks for your reply on pls!
> I have tried to do a correlation plot but I get the following group of
> graphs. Any way of having only 1 plot?
> This is my script:
> corrplot(plsrcue1, comp = 1:4, radii = c(sqrt(1/2), 1), identify = FALSE,
> type = "p" )
"Correlation loadings" are the correlations between each variable and
the selected components, so I don't see how you can have more than two
sets of correlations (i.e., more than two components) in a single
scatter plot. You could have three sets in a 3d plot, of course, but
that you would have to implement yourself. :)