plot.pcalda: Plot Method for Class 'pcalda'

View source: R/mt_pcalda.R

plot.pcaldaR Documentation

Plot Method for Class 'pcalda'

Description

Plot linear discriminants of pcalda.

Usage

## S3 method for class 'pcalda'
plot(x, dimen, ...)

Arguments

x

An object of class pcalda.

dimen

The index of linear discriminants to be used for the plot.

...

Further arguments. See corresponding entry in xyplot for non-trivial details. One argument is ep: an integer for plotting ellipse. 1 and 2 for plotting overall and group ellipse, respectively. Otherwise, none. For details, see panel.elli.1.

Details

This function is a method for the generic function plot() for class pcalda. 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

pcalda, predict.pcalda, lda_plot_wrap,panel.elli.1.

Examples

data(abr1)
cl   <- factor(abr1$fact$class)
dat  <- abr1$pos

model <- pcalda(dat,cl)

## Second component versus first
plot(model,dimen=c(1,2),main = "Training data",ep=2)
## Pairwise scatterplots of several components 
plot(model,main = "Training data",ep=1)

## The first component
plot(model,dimen=c(1),main = "Training data")

mt documentation built on June 22, 2024, 12:24 p.m.