Correspondence analysis

Statistical technique

Correspondence analysis (CA) is a multivariate statistical technique proposed[1] by Herman Otto Hartley (Hirschfeld)[2] and later developed by Jean-Paul Benzécri.[3] It is conceptually similar to principal component analysis, but applies to categorical rather than continuous data. In a similar manner to principal component analysis, it provides a means of displaying or summarising a set of data in two-dimensional graphical form. Its aim is to display in a biplot any structure hidden in the multivariate setting of the data table. As such it is a technique from the field of multivariate ordination. Since the variant of CA described here can be applied either with a focus on the rows or on the columns it should in fact be called simple (symmetric) correspondence analysis.[4]

It is traditionally applied to the contingency table of a pair of nominal variables where each cell contains either a count or a zero value. If more than two categorical variables are to be summarized, a variant called multiple correspondence analysis should be chosen instead. CA may also be applied to binary data given the presence/absence coding represents simplified count data i.e. a 1 describes a positive count and 0 stands for a count of zero. Depending on the scores used CA preserves the chi-square distance[5][6] between either the rows or the columns of the table. Because CA is a descriptive technique, it can be applied to tables regardless of a significant chi-squared test.[7][8] Although the  χ 2 {\displaystyle \chi ^{2}} statistic used in inferential statistics and the chi-square distance are computationally related they should not be confused since the latter works as a multivariate statistical distance measure in CA while the  χ 2 {\displaystyle \chi ^{2}} statistic is in fact a scalar not a metric.[9]

## Details

[edit]

Like principal components analysis, correspondence analysis creates orthogonal components (or axes) and, for each item in a table i.e. for each row, a set of scores (sometimes called factor scores, see Factor analysis). Correspondence analysis is performed on the data table, conceived as matrix C of size m × n where m is the number of rows and n is the number of columns. In the following mathematical description of the method capital letters in italics refer to a matrix while letters in italics refer to vectors. Understanding the following computations requires knowledge of matrix algebra.

### Preprocessing

[edit]

Before proceeding to the central computational step of the algorithm, the values in matrix C have to be transformed.[10] First compute a set of weights for the columns and the rows (sometimes called masses),[7][11] where row and column weights are given by the row and column vectors, respectively:

w m = 1 n C C 1 , w n = 1 n C 1 T C . {\displaystyle w_{m}={\frac {1}{n_{C}}}C\mathbf {1} ,\quad w_{n}={\frac {1}{n_{C}}}\mathbf {1} ^{T}C.}

Here  n C = ∑ i = 1 n ∑ j = 1 m C i j {\displaystyle n_{C}=\sum _{i=1}^{n}\sum _{j=1}^{m}C_{ij}} is the sum of all cell values in matrix C, or short the sum of C, and  1 {\displaystyle \mathbf {1} } is a column vector of ones with the appropriate dimension.

Put in simple words,  w m {\displaystyle w_{m}} is just a vector whose elements are the row sums of C divided by the sum of C, and  w n {\displaystyle w_{n}} is a vector whose elements are the column sums of C divided by the sum of C.

The weights are transformed into diagonal matrices

W m = diag ⁡ ( 1 / w m ) {\displaystyle W_{m}=\operatorname {diag} (1/{\sqrt {w_{m}}})}

and

W n = diag ⁡ ( 1 / w n ) {\displaystyle W_{n}=\operatorname {diag} (1/{\sqrt {w_{n}}})}

where the diagonal elements of  W n {\displaystyle W_{n}} are  1 / w n {\displaystyle 1/{\sqrt {w_{n}}}} and those of  W m {\displaystyle W_{m}} are  1 / w m {\displaystyle 1/{\sqrt {w_{m}}}} respectively i.e. the vector elements are the inverses of the square roots of the masses. The off-diagonal elements are all 0.

Next, compute matrix  P {\displaystyle P} by dividing  C {\displaystyle C} by its sum

P = 1 n C C . {\displaystyle P={\frac {1}{n_{C}}}C.}

In simple words, Matrix  P {\displaystyle P} is just the data matrix (contingency table or binary table) transformed into portions i.e. each cell value is just the cell portion of the sum of the whole table.

Finally, compute matrix  S {\displaystyle S} , sometimes called the matrix of standardized residuals,[10] by matrix multiplication as

S = W m ( P − w m w n ) W n {\displaystyle S=W_{m}(P-w_{m}w_{n})W_{n}}

Note, the vectors  w m {\displaystyle w_{m}} and  w n {\displaystyle w_{n}} are combined in an outer product resulting in a matrix of the same dimensions as  P {\displaystyle P} . In words the formula reads: matrix  outer ⁡ ( w m , w n ) {\displaystyle \operatorname {outer} (w_{m},w_{n})} is subtracted from matrix  P {\displaystyle P} and the resulting matrix is scaled (weighted) by the diagonal matrices  W m {\displaystyle W_{m}} and  W n {\displaystyle W_{n}} . Multiplying the resulting matrix by the diagonal matrices is equivalent to multiply the i-th row (or column) of it by the i-th element of the diagonal of  W m {\displaystyle W_{m}} or  W n {\displaystyle W_{n}} , respectively[12].

### Interpretation of preprocessing

[edit]

The vectors  w m {\displaystyle w_{m}} and  w n {\displaystyle w_{n}} are the row and column masses or the marginal probabilities for the rows and columns, respectively. Subtracting matrix  outer ⁡ ( w m , w n ) {\displaystyle \operatorname {outer} (w_{m},w_{n})} from matrix  P {\displaystyle P} is the matrix algebra version of double centering the data. Multiplying this difference by the diagonal weighting matrices results in a matrix containing weighted deviations from the origin of a vector space. This origin is defined by matrix  outer ⁡ ( w m , w n ) {\displaystyle \operatorname {outer} (w_{m},w_{n})} .

In fact matrix  outer ⁡ ( w m , w n ) {\displaystyle \operatorname {outer} (w_{m},w_{n})} is identical with the matrix of expected frequencies in the chi-squared test. Therefore  S {\displaystyle S} is computationally related to the independence model used in that test. But since CA is not an inferential method the term independence model is inappropriate here.

### Orthogonal components

[edit]

The table  S {\displaystyle S} is then decomposed[10] by a singular value decomposition as

S = U Σ V ∗ {\displaystyle S=U\Sigma V^{*}\,}

where  U {\displaystyle U} and  V {\displaystyle V} are the left and right singular vectors of  S {\displaystyle S} and  Σ {\displaystyle \Sigma } is a square diagonal matrix with the singular values  σ i {\displaystyle \sigma _{i}} of  S {\displaystyle S} on the diagonal.  Σ {\displaystyle \Sigma } is of dimension  p ≤ ( min ( m , n ) − 1 ) {\displaystyle p\leq (\min(m,n)-1)} hence  U {\displaystyle U} is of dimension m×p and  V {\displaystyle V} is of n×p. As orthonormal vectors U {\displaystyle U} and  V {\displaystyle V} fulfill

U ∗ U = V ∗ V = I {\displaystyle U^{*}U=V^{*}V=I} .

In other words, the multivariate information that is contained in  C {\displaystyle C} as well as in  S {\displaystyle S} is now distributed across two (coordinate) matrices  U {\displaystyle U} and  V {\displaystyle V} and a diagonal (scaling) matrix  Σ {\displaystyle \Sigma } . The vector space defined by them has as number of dimensions p, that is the smaller of the two values, number of rows and number of columns, minus 1.

### Inertia

[edit]

While a principal component analysis may be said to decompose the (co)variance, and hence its measure of success is the amount of (co-)variance covered by the first few PCA axes - measured in eigenvalue -, a CA works with a weighted (co-)variance which is called inertia.[13] The sum of the squared singular values is the total inertia I {\displaystyle \mathrm {I} } of the data table, computed as

I = ∑ i = 1 p σ i 2 . {\displaystyle \mathrm {I} =\sum _{i=1}^{p}\sigma _{i}^{2}.}

The total inertia I {\displaystyle \mathrm {I} } of the data table can also computed directly from  S {\displaystyle S} as

I = ∑ i = 1 n ∑ j = 1 m s i j 2 . {\displaystyle \mathrm {I} =\sum _{i=1}^{n}\sum _{j=1}^{m}s_{ij}^{2}.}

The amount of inertia covered by the i-th set of singular vectors is  ι i {\displaystyle \iota _{i}} , the principal inertia. The higher the portion of inertia covered by the first few singular vectors i.e. the larger the sum of the principal inertiae in comparison to the total inertia, the more successful a CA is.[13] Therefore, all principal inertia values are expressed as portion  ϵ i {\displaystyle \epsilon _{i}} of the total inertia

ϵ i = σ i 2 / ∑ i = 1 p σ i 2 {\displaystyle \epsilon _{i}=\sigma _{i}^{2}/\sum _{i=1}^{p}\sigma _{i}^{2}}

and are presented in the form of a scree plot. In fact a scree plot is just a bar plot of all principal inertia portions  ϵ i {\displaystyle \epsilon _{i}} .

### Coordinates

[edit]

To transform the singular vectors to coordinates which preserve the chisquare distances between rows or columns an additional weighting step is necessary. The resulting coordinates are called principal coordinates[10] in CA text books. If principal coordinates are used for rows their visualization is called a row isometric[14] scaling in econometrics and scaling 1[15] in ecology. Since the weighting includes the singular values  Σ {\displaystyle \Sigma } of the matrix of standardized residuals  S {\displaystyle S} these coordinates are sometimes referred to as singular value scaled singular vectors, or, a little bit misleading, as eigenvalue scaled eigenvectors. In fact the non-trivial eigenvectors of  S S ∗ {\displaystyle SS^{*}} are the left singular vectors  U {\displaystyle U} of  S {\displaystyle S} and those of  S ∗ S {\displaystyle S^{*}S} are the right singular vectors  V {\displaystyle V} of  S {\displaystyle S} while the eigenvalues of either of these matrices are the squares of the singular values  Σ {\displaystyle \Sigma } . But since all modern algorithms for CA are based on a singular value decomposition this terminology should be avoided. In the French tradition of CA the coordinates are sometimes called (factor) scores.

Factor scores or principal coordinates for the rows of matrix C are computed by

F m = W m U Σ {\displaystyle F_{m}=W_{m}U\Sigma }

i.e. the left singular vectors are scaled by the inverse of the square roots of the row masses and by the singular values. Because principal coordinates are computed using singular values they contain the information about the spread between the rows (or columns) in the original table. Computing the euclidean distances between the entities in principal coordinates results in values that equal their chisquare distances which is the reason why CA is said to "preserve chisquare distances".

Compute principal coordinates for the columns by

F n = W n V Σ . {\displaystyle F_{n}=W_{n}V\Sigma .}

To represent the result of CA in a proper biplot, those categories which are not plotted in principal coordinates, i.e. in chisquare distance preserving coordinates, should be plotted in so called standard coordinates.[10] They are called standard coordinates because each vector of standard coordinates has been standardized to exhibit mean 0 and variance 1.[16] When computing standard coordinates the singular values are omitted which is a direct result of applying the biplot rule by which one of the two sets of singular vector matrices must be scaled by singular values raised to the power of zero i.e. multiplied by one i.e. be computed by omitting the singular values if the other set of singular vectors have been scaled by the singular values. This reassures the existence of a inner product between the two sets of coordinates i.e. it leads to meaningful interpretations of their spatial relations in a biplot.

In practical terms one can think of the standard coordinates as the vertices of the vector space in which the set of principal coordinates (i.e. the respective points) "exists".[17] The standard coordinates for the rows are

G m = W m U {\displaystyle G_{m}=W_{m}U}

and those for the columns are

G n = W n V {\displaystyle G_{n}=W_{n}V}

Note that a scaling 1[15] biplot in ecology implies the rows to be in principal and the columns to be in standard coordinates while scaling 2 implies the rows to be in standard and the columns to be in principal coordinates. I.e. scaling 1 implies a biplot of  F m {\displaystyle F_{m}} together with  G n {\displaystyle G_{n}} while scaling 2 implies a biplot of  F n {\displaystyle F_{n}} together with  G m {\displaystyle G_{m}} .

## Graphical representation of result

[edit]

The visualization of a CA result always starts with displaying the scree plot of the principal inertia values to evaluate the success of summarizing spread by the first few singular vectors.

The actual ordination is presented in a graph which could - at first look - be confused with a complicated scatter plot. In fact it consists of two scatter plots printed one upon the other, one set of points for the rows and one for the columns. But being a biplot a clear interpretation rule relates the two coordinate matrices used.

Usually the first two dimensions of the CA solution are plotted because they encompass the maximum of information about the data table that can be displayed in 2D although other combinations of dimensions may be investigated by a biplot. A biplot is in fact a low dimensional mapping of a part of the information contained in the original table.

As a rule of thumb that set (rows or columns) which should be analysed with respect to its composition as measured by the other set is displayed in principal coordinates while the other set is displayed in standard coordinates. E.g. a table displaying voting districts in rows and political parties in columns with the cells containing the counted votes may be displayed with the districts (rows) in principal coordinates when the focus is on ordering districts according to similar voting.

Traditionally, originating from the French tradition in CA,[18] early CA biplots mapped both entities in the same coordinate version, usually principal coordinates, but this kind of display is misleading insofar as: "Although this is called a biplot, it does not have any useful inner product relationship between the row and column scores" as Brian Ripley, maintainer of R package MASS points out correctly.[19] Today that kind of display should be avoided since laymen usually are not aware of the lacking relation between the two point sets.

A scaling 1[15] biplot (rows in principal coordinates, columns in standard coordinates) is interpreted as follows:[20]

* The distances between row points approximate their chi-square distance. Points close to each other represent rows with very similar values in the original data table. I.e they may exhibit rather similar frequencies in case of count data or closely related binary values in case of presence/absence data.
* (Column) points in standard coordinates represent the vertices of the vector space i.e. the outer corner of something that in multidimensional space has the shape of an irregular polyhedron. Project row points onto the line connecting the origin and the standard coordinate of a column; if the projected position along that connection line is close to the position of the standard coordinate, that row point is strongly associated with this column i.e. in case of count data the row has a high frequency of that category and in case of presence/absence data the row is likely to exhibit a 1 in that column. Row points whose projection would require to elongate the connection line beyond the origin have a lower than average value in that column.

## Extensions and applications

[edit]

Several variants of CA are available, including detrended correspondence analysis (DCA) and canonical correspondence analysis (CCA). The latter (CCA) is used when there is information about possible causes for the similarities between the investigated entities. The extension of correspondence analysis to many categorical variables is called multiple correspondence analysis. An adaptation of correspondence analysis to the problem of discrimination based upon qualitative variables (i.e., the equivalent of discriminant analysis for qualitative data) is called discriminant correspondence analysis or barycentric discriminant analysis.

In the social sciences, correspondence analysis, and particularly its extension multiple correspondence analysis, was made known outside France through French sociologist Pierre Bourdieu's application of it.[21]

## Implementations

[edit]

* The data visualization system Orange include the module: orngCA.
* The statistical programming language R includes several packages, which offer a function for (simple symmetric) correspondence analysis. Using the R notation [package_name::function_name] the packages and respective functions are: `ade4::dudi.coa()`, `ca::ca()` , `ExPosition::epCA()`, `FactoMineR::CA()`, `MASS::corresp()`, `vegan::cca()`. The easiest approach for beginners is `ca::ca()` as there is an extensive text book[22] accompanying that package.
* The Freeware PAST (PAleontological STatistics)[23] offers (simple symmetric) correspondence analysis via the menu "Multivariate/Ordination/Correspondence (CA)".

## See also

[edit]

* Formal concept analysis

## References

[edit]

1. ^ Dodge, Y. (2003) The Oxford Dictionary of Statistical Terms, OUP ISBN 0-19-850994-4
2. ^ Hirschfeld, H.O. (1935) "A connection between correlation and contingency", Proc. Cambridge Philosophical Society, 31, 520–524
3. ^ Benzécri, J.-P. (1973). L'Analyse des Données. Volume II. L'Analyse des Correspondances. Paris, France: Dunod.
4. ^ Beh, Eric; Lombardo, Rosaria (2014). Correspondence Analysis. Theory, Practice and New Strategies. Chichester: Wiley. p. 120\. ISBN 978-1-119-95324-1.
5. ^ Greenacre, Michael (2007). Correspondence Analysis in Practice. Boca Raton: CRC Press. p. 204\. ISBN 9781584886167.
6. ^ Legendre, Pierre; Legendre, Louis (2012). Numerical Ecology. Amsterdam: Elsevier. p. 465\. ISBN 978-0-444-53868-0.
7. ^ a b Greenacre, Michael (1983). Theory and Applications of Correspondence Analysis. London: Academic Press. ISBN 0-12-299050-1.
8. ^ Greenacre, Michael (2007). Correspondence Analysis in Practice, Second Edition. London: Chapman & Hall/CRC.
9. ^ Greenacre, Michael (2017). Correspondence Analysis in Practice (3rd ed.). Boca Raton: CRC Press. pp. 26–29\. ISBN 9781498731775.
10. ^ a b c d e Greenacre, Michael (2007). Correspondence Analysis in Practice. Boca Raton: CRC Press. p. 202\. ISBN 9781584886167.
11. ^ Greenacre, Michael (2007). Correspondence Analysis in Practice, Second Edition. London: Chapman & Hall/CRC. p. 202.
12. ^ Abadir, Karim; Magnus, Jan (2005). Matrix algebra. Cambridge: Cambridge University Press. p. 24\. ISBN 9786612394256.
13. ^ a b Beh, Eric; Lombardo, Rosaria (2014). Correspondence Analysis. Theory, Practice and New Strategies. Chichester: Wiley. pp. 87, 129. ISBN 978-1-119-95324-1.
14. ^ Beh, Eric; Lombardo, Rosaria (2014). Correspondence Analysis. Theory, Practice and New Strategies. Chichester: Wiley. pp. 132–134\. ISBN 978-1-119-95324-1.
15. ^ a b c Legendre, Pierre; Legendre, Louis (2012). Numerical Ecology. Amsterdam: Elsevier. p. 470\. ISBN 978-0-444-53868-0.
16. ^ Greenacre, Michael (2017). Correspondence Analysis in Practice (3rd ed.). Boca Raton: CRC Press. p. 62\. ISBN 9781498731775.
17. ^ Blasius, Jörg (2001). Korrespondenzanalyse (in German). Berlin: Walter de Gruyter. pp. 40, 60. ISBN 9783486257304.
18. ^ Greenacre, Michael (2017). Correspondence Analysis in Practice (3rd ed.). Boca Raton: CRC Press. p. 70\. doi:10.1201/9781315369983. ISBN 9781498731775.
19. ^ Ripley, Brian (2022-01-13). "MASS R package manual". R Package Documentation (rdrr.io). Details. Retrieved 2022-03-17.
20. ^ Borcard, Daniel; Gillet, Francois; Legendre, Pierre (2018). Numerical Ecology with R (2nd ed.). Cham: Springer. p. 175\. doi:10.1007/978-3-319-71404-2. ISBN 9783319714042.
21. ^ Bourdieu, Pierre (1984). Distinction. Routledge. pp. 41. ISBN 0674212770.
22. ^ Greenacre, Michael (2021). Correspondence Analysis in Practice (third ed.). London: CRC PRESS. ISBN 9780367782511.
23. ^ Hammer, Øyvind. "Past 4 - the Past of the Future". Archived from the original on 2020-11-01. Retrieved 2021-09-14.

Authority control databases: National |

* United States
* France
* BnF data
* Israel

|