plot.plsc | R Documentation |
Plot latent components of plsc
or plslda
.
## S3 method for class 'plsc'
plot(x, dimen, ...)
## S3 method for class 'plslda'
plot(x, dimen, ...)
x |
An object of class |
dimen |
The index of latent components to be used for the plot. |
... |
Further arguments. See corresponding entry in
|
Two functions are methods for the generic function plot()
of
class plsc
and plslda
.
If the length of dimen
is greater than 2, a pairs plot is used.
If the length of dimen
is equal to 2, a scatter plot is drawn.
Otherwise, the dot plot is drawn for the single component.
An object of class "trellis"
.
Wanchang Lin
plsc
, predict.plsc
,plslda
,
predict.plslda
, pls_plot_wrap
,
panel.elli.1
.
data(abr1)
cl <- factor(abr1$fact$class)
dat <- abr1$pos
mod.plsc <- plsc(dat,cl,ncomp=4)
mod.plslda <- plslda(dat,cl,ncomp=4)
## Second component versus first
plot(mod.plsc,dimen=c(1,2),main = "Training data", ep = 2)
plot(mod.plslda,dimen=c(1,2),main = "Training data", ep = 2)
## Pairwise scatterplots of several components
plot(mod.plsc, main = "Training data", ep = 1)
plot(mod.plslda, main = "Training data", ep = 1)
## single component
plot(mod.plsc,dimen=c(1),main = "Training data")
plot(mod.plslda,dimen=c(1),main = "Training data")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.