Learn R Programming

shipunov (version 1.0)

Ellipses: Groups' confidence ellipses

Description

Groups' confidence ellipses

Usage

Ellipses(pts, groups, match.color=TRUE, usecolors=NULL, centers=FALSE,
 c.pch=0, c.cex=3, level=0.95, ...)

Arguments

pts

Data points to plot

groups

Grouping variable (mumerical)

level

Confidence level

match.color

Match colors

usecolors

Use colors (palette)

centers

Show centrs?

c.pch

Color of center points

c.cex

Scale of center points

...

Arguments to 'Confelli()' and finally to 'plot()'

Details

Internally, uses 'Confelli()' function which plots an ellipse with covariance matrix C, center b, and P-content level according the F(2, df) distribution.

See Also

Hulls

Examples

Run this code
# NOT RUN {
iris.p <- prcomp(iris[, 1:4], scale=TRUE)$x[, 1:2]
plot(iris.p, type="n", xlab="PC1", ylab="PC2")
text(iris.p, labels=abbreviate(iris[, 5], 1, method="both.sides"))
Ellipses(iris.p[, 1:2], as.numeric(iris[, 5]), centers=TRUE)
# }

Run the code above in your browser using DataLab