# Regarding correspondence analysis

Can we use percentage values obtained from secondary source instead of frequency values in the contingency table for using the correspondence analysis?

eg: in a contigency table with row variable depicting the regions ( say, region 1, 2,3, 4) and the column table depicting occupation of the people in the region ( say occupation 1, 2,3,4,5) instead of the no. of people with occupation 1 in region 1, can we use the percentage of population with occupation 1 in region 1 to form the contingency table cells?

Yes, you can. The equations to find the eigenvectors that correspond to the row and column scores are invariant to multiplying the data matrix by a (non-negative) constant. HOWEVER, many programs/functions will refuse to work with non-integer entries. The way to get around this is to multiply by a value that makes the entries integers. It won't change your answer. See the R code below for example. This function, however, refuses to work for non-integers.:

> x
[,1] [,2] [,3]
[1,]    4    4   14
[2,]    5    6    1
[3,]    4    8    0
[4,]    3   11    7
> library(MASS)
> corresp(x)
First canonical correlation(s): 0.5275886

Row scores:
R 1          R 2          R 3          R 4
-1.255263749  0.963208830  1.329194129  0.005093665

Col scores:
C 1        C 2        C 3
0.6073679  0.7482176 -1.4280089
> corresp(x*8)
First canonical correlation(s): 0.5275886

Row scores:
R 1          R 2          R 3          R 4
-1.255263749  0.963208830  1.329194129  0.005093665

Col scores:
C 1        C 2        C 3
0.6073679  0.7482176 -1.4280089

• A trick worth trying would be to multiply the percentages by some constant, e.g., 100 or 1,000, to convert them into "integer" values for processing. – Mike Hunter Nov 1 '15 at 11:57

Correspondence analysis can deal with percentages perfectly well, without resorting to far-fetched multiplying by large number which may lead to loss of resolution. If C represents your contingnecy table, let

    E = outer(rowSums(C), colSums(C)/sum(C))


be the expected frequency matrix based on the margins. Correspondence analysis relies on the following singular value decomposition:

    SVD = svd(1/sqrt(rowSums(C)) %*% (C-E) %*% 1/sqrt(colSums(C))


In short it represents departures from the independence model (represented by E) weighted by the rows and column totals.

Make sure to remove all-zero rows or columns in C before attempting this.