Performs Correspondence Analysis (CA) including supplementary row and/or column points.
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)
a data frame or a table with n rows and p columns, i.e. a contingency table
number of dimensions kept in the results (by default 5)
a vector indicating the indexes of the supplementary rows
a vector indicating the indexes of the supplementary columns
a vector indicating the indexes of the supplementary continuous variables
a vector indicating the indexes of the categorical supplementary variables
boolean, if TRUE a graph is displayed
a length 2 vector specifying the components to plot
an optional row weights (by default, a vector of 1 and each row has a weight equals to its margin); the weights are given only for the active rows
numeric vector indicating the indexes of the "junk" columns (default is NULL). Useful for MCA with excl argument.
Returns a list including:
a matrix containing all the eigenvalues, the percentage of variance and the cumulative percentage of variance
a list of matrices with all the results for the column variable (coordinates, square cosine, contributions, inertia)
a list of matrices with all the results for the row variable (coordinates, square cosine, contributions, inertia)
a list of matrices containing all the results for the supplementary column points (coordinates, square cosine)
a list of matrices containing all the results for the supplementary row points (coordinates, square cosine)
if quanti.sup is not NULL, a matrix containing the results for the supplementary continuous variables (coordinates, square cosine)
if quali.sup is not NULL, a list of matrices with all the results for the supplementary categorical variables (coordinates of each categories of each variables, v.test which is a criterion with a Normal distribution, square correlation ratio)
a list with some statistics
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.
Benzecri, J.-P. (1992) Correspondence Analysis Handbook, New-York : Dekker Benzecri, J.-P. (1980) L'analyse des donnees 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.
print.CA
, summary.CA
, ellipseCA
, plot.CA
, dimdesc
,
Video showing how to perform CA with FactoMineR
# NOT RUN {
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