Learn R Programming

FactoMineR (version 1.34)

CA: Correspondence Analysis (CA)

Description

Performs Correspondence Analysis (CA) including supplementary row and/or column points.

Usage

CA(X, ncp = 5, row.sup = NULL, col.sup = NULL, quanti.sup=NULL, quali.sup = NULL, graph = TRUE, axes = c(1,2), row.w = NULL, excl=NULL)

Arguments

X
a data frame or a table with n rows and p columns, i.e. a contingency table
ncp
number of dimensions kept in the results (by default 5)
row.sup
a vector indicating the indexes of the supplementary rows
col.sup
a vector indicating the indexes of the supplementary columns
quanti.sup
a vector indicating the indexes of the supplementary continuous variables
quali.sup
a vector indicating the indexes of the categorical supplementary variables
graph
boolean, if TRUE a graph is displayed
axes
a length 2 vector specifying the components to plot
row.w
an optional row weights (by default, a vector of 1 and each row has a weight equals to its margin)
excl
numeric vector indicating the indexes of the "junk" columns (default is NULL). Useful for MCA with excl argument.

Value

Returns a list including:Returns the row and column points factor map. The plot may be improved using the argument autolab, modifying the size of the labels or selecting some elements thanks to the plot.CA function.

References

Benzecri, J.-P. (1992) Correspondence Analysis Handbook, New-York : Dekker Benzecri, J.-P. (1980) L'analyse des donnes tome 2 : l'analyse des correspondances, Paris : Bordas Greenacre, M.J. (1993) Correspondence Analysis in Practice, London : Academic Press Husson, F., Le, S. and Pages, J. (2009). Analyse de donnees avec R, Presses Universitaires de Rennes. Husson, F., Le, S. and Pages, J. (2010). Exploratory Multivariate Analysis by Example Using R, Chapman and Hall.

See Also

print.CA, summary.CA, ellipseCA, plot.CA, dimdesc, Video showing how to perform CA with FactoMineR

Examples

Run this code
data(children)
res.ca <- CA (children, row.sup = 15:18, col.sup = 6:8)
summary(res.ca)
## Ellipses for all the active elements
ellipseCA(res.ca)
## Ellipses around some columns only
ellipseCA(res.ca,ellipse="col",col.col.ell=c(rep("blue",2),rep("transparent",3)),
     invisible=c("row.sup","col.sup"))

Run the code above in your browser using DataLab