Learn R Programming

GDAtools (version 1.3)

conc.ellipse: Adds concentration ellipses to a correspondence analysis graph.

Description

Adds concentration ellipses to the individuals factor map of a correspondence analysis.

Usage

conc.ellipse(resmca, var, sel = 1:length(levels(varb)), col = rainbow(length(sel)), axes = c(1, 2), cex = 0.2)

Arguments

resmca
object of class 'MCA', 'speMCA', 'csMCA', 'multiMCA' or 'stMCA'
var
supplementary variable to plot
sel
numeric vector of indexes of the categories to plot (by default, ellipses are plotted for every categories)
col
vector of colors for the ellipses of plotted categories (by default, rainbow palette is used)
axes
length 2 vector specifying the components to plot (default is c(1,2))
cex
numerical value giving the amount by which ellipse contour should be magnified (default is 0.2)

Details

This function has to be used after the cloud of individuals has been drawn.

References

Le Roux B. and Rouanet H., Multiple Correspondence Analysis, SAGE, Series: Quantitative Applications in the Social Sciences, Volume 163, CA:Thousand Oaks (2010).

Le Roux B. and Rouanet H., Geometric Data Analysis: From Correspondence Analysis to Stuctured Data Analysis, Kluwer Academic Publishers, Dordrecht (June 2004).

See Also

plot.speMCA, plot.csMCA, plot.multiMCA, plot.stMCA

Examples

Run this code
## Performs specific MCA (excluding 'NA' categories) of 'Taste' example data set,
## plots the cloud of categories
## and adds concentration ellipses for gender variable
data(Taste)
mca <- speMCA(Taste[,1:11],excl=c(3,6,9,12,15,18,21,24,27,30,33))
plot(mca,type='i')
conc.ellipse(mca,Taste$Gender)

## Draws a blue concentration ellipse for men only
plot(mca,type='i')
conc.ellipse(mca,Taste$Gender,sel=1,col='blue')

Run the code above in your browser using DataLab