Shows plot with variance values vs. number of components.
# S3 method for pls
plotVariance(
obj,
decomp = "xdecomp",
variance = "expvar",
type = "b",
labels = "values",
res = obj$res,
ylab = "Explained variance, %",
...
)
a PLS model (object of class pls
)
which decomposition to use ("xdecomp" for x or "ydecomp" for y)
which variance to use ("expvar", "cumexpvar")
type of the plot("b", "l" or "h")
what to show as labels for plot objects.
list with result objects to show the plot for (by defaul, model results are used)
label for y-axis
other plot parameters (see mdaplotg
for details)
See examples in help for pls
function.