Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.lda

Plot Method for Class 'lda'


Description

Plots a set of data on one, two or more linear discriminants.

Usage

## S3 method for class 'lda'
plot(x, panel = panel.lda, ..., cex = 0.7, dimen,
     abbrev = FALSE, xlab = "LD1", ylab = "LD2")

Arguments

x

An object of class "lda".

panel

the panel function used to plot the data.

...

additional arguments to pairs, ldahist or eqscplot.

cex

graphics parameter cex for labels on plots.

dimen

The number of linear discriminants to be used for the plot; if this exceeds the number determined by x the smaller value is used.

abbrev

whether the group labels are abbreviated on the plots. If abbrev > 0 this gives minlength in the call to abbreviate.

xlab

label for the x axis

ylab

label for the y axis

Details

This function is a method for the generic function plot() for class "lda". It can be invoked by calling plot(x) for an object x of the appropriate class, or directly by calling plot.lda(x) regardless of the class of the object.

The behaviour is determined by the value of dimen. For dimen > 2, a pairs plot is used. For dimen = 2, an equiscaled scatter plot is drawn. For dimen = 1, a set of histograms or density plots are drawn. Use argument type to match "histogram" or "density" or "both".

References

Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.

See Also


MASS

Support Functions and Datasets for Venables and Ripley's MASS

v7.3-54
GPL-2 | GPL-3
Authors
Brian Ripley [aut, cre, cph], Bill Venables [ctb], Douglas M. Bates [ctb], Kurt Hornik [trl] (partial port ca 1998), Albrecht Gebhardt [trl] (partial port ca 1998), David Firth [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.