| plot.fastPLS | R Documentation |
Draws a two-component score plot for a fitted fastPLS object. Optional
ellipses are computed either as data confidence ellipses or Hotelling T2
score ellipses. Axis labels include predictor-space variance explained when
it was requested during model fitting.
## S3 method for class 'fastPLS'
plot(
x,
comps = c(1L, 2L),
groups = NULL,
score.set = c("auto", "train", "test"),
ellipse = FALSE,
ellipse.type = c("confidence", "hotelling"),
conf = 0.95,
...
)
x |
A fitted |
comps |
Two component indices. |
groups |
Optional grouping vector used for point fills and grouped ellipses. |
score.set |
Plot |
ellipse |
Draw confidence ellipses when |
ellipse.type |
Use |
conf |
Confidence level. |
... |
Additional arguments passed to |
Invisibly returns the plotted score matrix.
X <- as.matrix(iris[, seq_len(4)])
fit <- pls(X, iris$Species,
ncomp = 2, fit = TRUE,
return_variance = TRUE, seed = 1
)
plot(fit, groups = iris$Species, ellipse = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.