| plot.plsc {mt} | R Documentation |
Plot Method for Class 'plsc' or 'plslda'
Description
Plot latent components of plsc or plslda.
Usage
## S3 method for class 'plsc'
plot(x, dimen, ...)
## S3 method for class 'plslda'
plot(x, dimen, ...)
Arguments
x |
An object of class |
dimen |
The index of latent components to be used for the plot. |
... |
Further arguments. See corresponding entry in
|
Details
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.
Value
An object of class "trellis".
Author(s)
Wanchang Lin
See Also
plsc, predict.plsc,plslda,
predict.plslda, pls_plot_wrap,
panel.elli.1.
Examples
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")