plo_cor {morepls} | R Documentation |
Plot of correlations
Description
Plots the correlations between (X and Y) variables and the components (X scores) of a PLS regression.
Usage
plo_cor(object, comps = 1:2, which = "both", min.cor = NULL,
lim = NULL, circles = NULL, col = NULL, size = 3.88)
Arguments
object |
an object of class |
comps |
the components to use. Default is |
which |
character string. If |
min.cor |
numerical value. The minimal correlation with one or the other component for a variable to be plotted. If |
lim |
numerical value. The limit of the scale (in absolute value). If |
circles |
vector of numeric values. Circles are added to the plot at radiuses specified in |
col |
colors for the names of the variables. Only one value should be provided if |
size |
numerical value. The size of the names of the variables. |
Value
a ggplot2
object
Note
This is what Tenenhaus calls the univariate interpretation of the PLS components, as opposed to the multivariate interpretation (see plo_var
).
Author(s)
Nicolas Robette
References
Martens, H., Næs, T. (1989) Multivariate calibration. Chichester: Wiley.
Tenenhaus, M. (1998) La Regression PLS. Theorie et Pratique. Editions TECHNIP, Paris.
See Also
Examples
library(pls)
data(yarn)
pls <- mvr(density ~ NIR,
ncomp = 5,
data = yarn,
validation = "CV",
method = "oscorespls")
plo_cor(pls)
# plot with circles corresponding to
# correlations of 0.5 and 1
plo_cor(pls, lim = 1, circles = c(0.5, 1), col = c("pink", "purple"))