A Unified Approach for the Multivariate Analysis of Contingency Tables

We present a unified approach to describing and linking several methods for representing categorical data in a contingency table. These methods include: correspondence analysis, Hellinger distance analysis, the log-ratio alternative, which is appropriate for compositional data, and the non-symmetrical correspondence analysis. We also present two solutions working with cummulative frequencies.


Introduction
In multivariate analysis, it is usual to link several methods in a closed expression, which depends on a set of parameters.Thus, in cluster analysis, some criteria (single linkage, complete linkage, median), can be unified by using parametric coefficients.The biplot analysis on a centered matrix X , is based on the singular value decomposition (SVD) X U V′ = Λ .The general solution is Λ Λ with 0 1 α ≤ ≤ , providing the GH, JK, SQ and other biplot types depending on α .Also, some orthogonal rotations in factor analysis (varimax,  quartimax) are particular cases of an expression depending on one or two parameters.
There are several methods for visualizing the rows and columns of a contingency table.These methods can be linked by using parameters and some well-known matrices.This parametric approach shows that correspondence analysis (CA), Hellinger distance analysis (HD), non-symmetric correspondence analysis (NSCA) and log-ratio analysis (LR), are particular cases of a general expression.In these methods, the decomposition of the inertia is used as well as a generalized version of Pearson contingency coefficient.With the help of triangular matrices, it is also possible to perform two analyses, Taguchi's analysis (TA) and double accumulative analysis (DA), both based on cumulative frequencies.This paper unifies and extends some results by Cuadras and Greenacre [1]- [4].

Weighted Metric Scaling
A common problem in data analysis consists in displaying several objects as points in Euclidean space of low dimension. Let where I is the identity matrix, ( ) ( ) ( ) Λ contains the principal coordinates of Ω , which can be represented as a configuration of k points 1 , , k P P  in Euclidean space.This means that the Euclidean distance between the points i P , j P with coordinates the rows i x , j x of X , equals ij δ .The geometric variability of Ω with respect to δ is defined by The geometric variability (also called inertia) can be interpreted as a generalized variance [6].
If G XX ′ = and g is the column vector with the diagonal entries in G , then ( ) tr tr tr We should use the first m columns of X to represent the k objects in low dimension m , usually 2 m = .This provides an optimal representation, in the sense that the geometric variability taking m k ≤ first di- mensions is ( ) and this quantity is maximum.( )

Parametric Analysis of Contingency Tables
, the vectors and diagonal matrices with the marginal frequencies of P .In order to represent the rows and columns of N , Goodman [7] intro- duces the generalized non-independence analysis (GNA) by means of the SVD: ( ) ( ) where Λ is diagonal with the singular values in descending order, and , U V are matrices of appropriate order with U U I ′ = , and V orthogonal.( ) R x , with 0 x > , is any monotonically increasing function.Here ( ) The principal coordinates for rows and columns are given by A suitable choice of ( ) With this transformation, let us consider the following SVD depending on three parameters: where Then the principal coordinates for the I rows and the standard coordinates for the J columns of N are given by , respectively, in the sense that these coordinates reconstitute the model: However, different weights are used for the column representation, e.g., Implicit with this (row) representation is the squared distance between rows 2 2 2 1 The first principal coordinates account for a relative high percentage of inertia, see Section 2. This parametric approach satisfies the principle of distributional equivalence and has been explored by Cuadras and Cuadras [2] and Greenacre [4].Here we use Greenacre's parametrization.
The geometric variability for displaying rows, is the average of the distances weighted by the row marginal frequencies: where ( ) ( ) is the I I × matrix of squared parametric distances (3).For measuring the dispersion in model ( 2), let us introduce the generalized Pearson contingency coefficient ( ) , 1 if P ′ = rc , i.e., under "statistical independence" between row and column vari- ables.In general . The unified approach for all methods (centered and uncentered) discussed below, are given in Table 1.It is worth noting that, from ( )( ) the centered ( ) 1 γ = and uncentered ( ) solutions coincide in CA, NSCA and TA (Taguchi's analysis, see below).

Testing Independence
Suppose that the rows and columns of ( ) are two sets of categorical variables with I and J states, and that ij n is the observed frequencies of the corresponding combination, according to a multinomial model.Assuming 1 2

β =
, the test for independence between row and column variables can be performed with ,1 2 ( ) χ − − is the chi-square distribution with ( )( ) vergence is in law.
To prove this asymptotic result, suppose 0 α > a fix value.Let ( ) and the above limit reduces to ( )

Correspondence Analysis
In this and the following sections, we present several methods of representation, distinguishing, when it is necessary, the centered from the uncentered solution.The inertia is given by the geometric variability and the generalized Pearson coefficient, respectively.
Centered and Uncentered ( ) 1) Chi-square distance between rows: 2) Rows and columns coordinates: 3) Inertia: ( ) 1,1 2 1 . Some authors considered CA the most rational method for analyzing contingency tables, because its ability to display in a meaningful way the relationships between the categories of two variable [8]- [10].For the history of CA, see [11], and for a continuous extension, see [12] [13].CA can be understood as the first order approximation to the alternatives HD and LR given below [3].Besides, LR would be a limiting case of parametric CA [14].
Uncentered .( ) 2) Rows and columns coordinates: 3) Inertia: ( ) Although the distances between rows are the same, the principal coordinates in the centered and uncentered solutions are distinct.Note that ( ) ∑ is the so-called affinity coefficient and that ( ) HD is suitable when we are comparing several multinomial populations and the column profiles should not have influence on the distance.See [15] [16].

Non-Symmetric Correspondence Analysis
Centered and Uncentered ( ) 1) Distance between rows: 2) Rows and columns coordinates: 3) Inertia: ( ) 1,1 Note that V δ is related to the Goodman-Kruskal coefficient τ in a contingency table.This measure is The numerator of τ represents the overall predictability of the columns given the rows.Thus NSCA may be useful when a categorical variable plays the role of response depending on a predictor variable, see [17]- [19].

Log-Ratio Analysis
Centered ( ) 1) Log-ratio distance between rows: ln ln 2) Rows and columns coordinates: 3) Inertia: ln ln 0,1 2 ln In spite of having the same distances, the principal coordinates (centered and uncentered) are different.Note that ( ) . This method satisfies the principle of subcompositional coherence and is appropriate for positive compositional data [20].
The inertia and the geometric variability in these four methods, as well as Taguchi's method given in Section 2, are summarized in Table 2.For a comparison between CA, HD, and LR see [3] [21].Besides, by varying the parameters there is the possibility of a dynamic presentation linking these methods [22].

Double-Centered Log-Ratio Analysis
In LR analysis Lewi [23] and Greenacre [4] considered the weighted double-centered solution ( ) ( )( ) called "spectral map".The unweighted double-centered solution, called "variation diagram", was considered by Aitchison and Greenacre [20].They show that log-ratio and centered log-ratio biplots are equivalent.In this solution the role of rows and columns is symmetric.

Analysis Based on Cumulative Frequencies
be the I J × contingency table, i n ⋅ and j n ⋅ the row and column marginals.Given a row i let us consider the cumulative frequencies and cumulative column proportions The Taguchi's statistic [24], is given by 2 1 1 1 , Table 2. Inertia expressions for five methods for representing rows in contingency tables.In CA and NSCA the geometric variability coincides with the contingency coefficient.This coefficient does not apply in TA.
Method Inertia (centered) , ( ) . The test based on T is better than Pearson chi-square when there is an order in the categories of the rows or columns of the contingency table [25].The so-called Taguchi's inertia a T T n , ,  and the J J × triangular matrix 1 0 0 1 1 0 As it occurs in CA, where the inertia is the trace ( ) − rc , Beh et al. [26] considered the decomposition of Taguchi's inertia.In our matrix notation.using the above M , we have ( ) From (4), centering is not necessary here .This SVD provides an alternative for visualizing the rows and columns of N .The main aspects of this solution, where 2) Rows and columns coordinates: There is a formal analogy between a T and the Goodman-Kruskal coefficient τ .Also note that the last column in PM ′ and C′ r are equal, so in Ta the index j can run from 1 to 1 J − .

Double Acumulative Frequencies
More generally, the analysis of a contingency table N may also be approached by using cumulative fre- quencies for rows and columns.Thus an approach based on double accumulative (DA) frequencies is ( ) ( ) where L is a suitable triangular matrix with ones.Clearly matrices H LPM ′ = , R L = r , C M = c contain the cumulative frequencies [1].However, both cumulative approaches TA and DA may not provide a clear display of the contingency table.
Finally, from ( ) ( ) ( ) rc , all (uncentered) methods CA, HD, NSCA, LR, TA and DA can be unified by means of the SVD ( ) as it is reported in Table 3.

An Example
The data in

CA HD LR
These four solutions are similar.
Finally, we show the first two coordinates for Taguchi's and double accumulative solutions ( ) multiplying by 3 for comparison purposes.Table 3. Correspondence analysis, Hellinger analysis, non-symmetric correspondence analysis, log-ratio analysis and two solutions based on cumulative frequencies.The right column suggests the type of categorical data.
Both solutions are quite distinct from the previous ones.

> and 1
with k objects, δ a distance function on Ω providing the k k the column vector of ones.The weighted metric scaling (WMS) solution using k ∆ finds the spectral decomposition

1 )
Hellinger distance between rows: Two choices are possible:

Table 1 .
we can display columns in the same Four methods for representing rows and columns in a contingency table.for the rows, and identify each column as the dummy row profile ( ) I H A

Table 4
is well known.This table combines the hair and eye colour of 5383 individuals.We present the first two principal coordinates (centered solution) of the five hair colour categories for CA, HD, LR and NSCA.We multiply the NSCA solution (denoted by NS ) by 2 for comparison purposes.

Table 4 .
Classification of a large sample of people combining the hair colour and the eye colour.