Articles - Principal Component Methods in R: Practical Guide

Correspondence Analysis in R: Million Ways

This article describes the multiple ways to compute correspondence analysis in R (CA). Recall that, correspondence analysis is used to study the association between two categorical variables by analyzing the contingency table formed by these two variables.

There are many R functions/packages for computing CA. No matter what functions you decide to use, in the list hereafter, the factoextra package can handle the output.

Correspondence Analysis in R: A Million Ways


Data format

  • Demo data: housetasks [in factoextra package]
  • Data contents: housetasks repartition in the couple.
    • rows are the different tasks
    • values are the frequencies of the tasks done by the i) wife only, ii) alternatively, iii) husband only, iv) jointly.
  • Data illustration:

Load the data:

# head(housetasks)


  1. Using CA() [FactoMineR]
library(FactoMineR) <- CA(housetasks, graph = FALSE)
  1. Using dudi.coa() [ade4]
library("ade4") <- dudi.coa(housetasks, scannf = FALSE, nf = 5)
  1. Using ca() [ca]
library(ca) <- ca(housetasks)
  1. Using corresp() [MASS]
library(MASS) <- corresp(housetasks, nf = 3)
  1. Using epCA() [ExPosition]
library("ExPosition") <- epCA(housetasks, graph = FALSE)


  • Required packages
  • Scree plot

  • Biplot of rows and columns:
fviz_ca_biplot(, repel = TRUE)


You can access to the results as follow:

# Eigenvalues
eig.val <- get_eigenvalue(
# Results for row variables
res.row <- get_ca_row(
res.row$coord          # Coordinates
res.row$contrib        # Contributions to the PCs
res.row$cos2           # Quality of representation 
# Results for column variables
res.col <- get_ca_col(
res.col$coord          # Coordinates
res.col$contrib        # Contributions to the PCs
res.col$cos2           # Quality of representation 

Read more