ca {dimensio} | R Documentation |
Correspondence Analysis
Description
Computes a simple correspondence analysis based on the singular value decomposition.
Usage
ca(object, ...)
## S4 method for signature 'data.frame'
ca(object, rank = NULL, sup_row = NULL, sup_col = NULL)
## S4 method for signature 'matrix'
ca(object, rank = NULL, sup_row = NULL, sup_col = NULL)
Arguments
object |
A |
... |
Currently not used. |
rank |
An |
sup_row |
A |
sup_col |
A |
Value
A CA
object.
Author(s)
N. Frerebeau
References
Greenacre, M. J. Theory and Applications of Correspondence Analysis. London: Academic Press, 1984.
Greenacre, M. J. Correspondence Analysis in Practice. Seconde edition. Interdisciplinary Statistics Series. Boca Raton: Chapman & Hall/CRC, 2007.
Lebart, L., Piron, M. and Morineau, A. Statistique exploratoire multidimensionnelle: visualisation et inférence en fouille de données. Paris: Dunod, 2006.
See Also
Other multivariate analysis:
mca()
,
pca()
,
predict()
Examples
## Data from Lebart et al. 2006, p. 170-172
data("colours")
## The chi square of independence between the two variables
stats::chisq.test(colours)
## Compute correspondence analysis
X <- ca(colours)
## Plot rows
viz_rows(X, labels = TRUE)
## Plot columns
viz_columns(X, labels = TRUE)
## Get row coordinates
head(get_coordinates(X, margin = 1))
## Get column coordinates
head(get_coordinates(X, margin = 2))
## Get row distances to centroid
head(get_distances(X, margin = 1))
## Get row inertias
head(get_inertia(X, margin = 1))
## Get row contributions
head(get_contributions(X, margin = 1))
## Get eigenvalues
get_eigenvalues(X)