plotellipses {FactoMineR}R Documentation

Draw confidence ellipses around the categories

Description

Draw confidence ellipses around the categories.

Usage

plotellipses(model, keepvar = "all", axis = c(1, 2), means=TRUE, level = 0.95, 
    magnify = 2, cex = 0.5, pch = 20, pch.means=15, type = c("g","p"), 
    keepnames = TRUE, namescat = NULL, ...)

Arguments

model an object of class MCA
keepvar a boolean or numeric vector of indexes of variables or a character vector of names of variables. If keepvar is "all", "quanti" or "quanti.sup" variables which are plotted are all the qualitative variables, only those which are used to compute the MCA (active variables) or only the supplementary qualitative variables. If keepvar is a numeric vector of indexes or a character vector of names of variables, only relevant variables are plotted.
axis a length 2 vector specifying the components to plot
means boolean which indicates if the confidence ellipses are for (the coordinates of) the means of the categories (the empirical variance is divided by the number of observations) or for (the coordinates of) the observations of the categories
level the confidence level for the ellipses
magnify numeric which control how the level names are magnified. A value of 2 means that the level names have character expansion equal to two times cex
cex cf. function par in the graphics package
pch plotting character for coordinates, cf. function par in the graphics package
pch.means plotting character for means, cf. function par in the graphics package
type cf. function xyplot in the lattice package
keepnames a boolean or numeric vector of indexes of variables or a character vector of names of variables. If keepnames is TRUE, names of levels are taken from the (modified) dataset extracted from modele, if FALSE trimming names is done. When trimming, names of levels are taken from the (modified) dataset extracted from modele, then, the corresponding number of characters of names of original variables plus 1 is removed. If keepnames is a vector of indexes or names, trimming is done on all variables excepted whose in keepnames
namescat a vector giving for each observation the value of qualitative variable, each variable are stacked under each other. If NULL, names are taken from the (modified) dataset extracted from modele
... further arguments passed to or from other methods

Value

Return a graph with the ellipses.

Author(s)

Pierre-Andre Cornillon, Francois Husson Francois.Husson@agrocampus-ouest.fr

See Also

MCA

Examples

## Not run: 
data(poison)
res.mca = MCA(poison, quali.sup = 3:4, quanti.sup = 1:2)
plotellipses(res.mca,c(1,2))
plotellipses(res.mca,c(1,2),keepvar=1:4)
## End(Not run)

data(decathlon)
res.pca <- PCA(decathlon, quanti.sup = 11:12, quali.sup=13)
plotellipses(res.pca,keepvar=13)

[Package FactoMineR version 1.12 Index]