
Last chance! 50% off unlimited learning
Sale ends in
Groups' confidence ellipses
Ellipses(pts, groups, match.color=TRUE, usecolors=NULL, centers=FALSE,
c.pch=0, c.cex=3, level=0.95, ...)
Data points to plot
Grouping variable (mumerical)
Confidence level
Match colors
Use colors (palette)
Show centrs?
Color of center points
Scale of center points
Arguments to 'Confelli()' and finally to 'plot()'
Internally, uses 'Confelli()' function which plots an ellipse with covariance matrix C, center b, and P-content level according the F(2, df) distribution.
# 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