corran

Correspondence Analysis.
1.4K Downloads
Updated 30 Sep 2008

View License

Correspondence Analysis (CA) is a special case of Canonical Correlation Analysis (CCA), where one set of entries (categories rather than variables) is related to another set. Also, it can be seen as a special case of Principal Component Analysis (PCA), where it is used for tables consisting of continuous measurement, whereas CA is applied to contingence tables.

CA starts with tabular data, usually two-way cross-classification, though the technique is generalizable to n-way tables with more than two variables. The variables must be discrete: nominal, ordinal or continuous segmented into ranges. Signifiance test is no supported. For model comparision and selection of a best-fit model should be done using another compatible method such as log-lineal or logistic regression. So, it is an exploratory analysis not a confirmatory one. Use chi-square distances that measure the profiles of a set of points between row and columns.

The data in a contingency table can be used to check for association of two categorical variables as a test of independence by an approximately (asymptotically) distributed chi-square random variable with (a-1)(b-1) degrees of freedom (a and b = categories of variable 1 and 2, respectively). The overall association is quantified by the chi-squared statistic divided by the grand total, called the total inertia. If there is independence, we would expect the rows or columns of the contingency table to have similar profiles. The chi-square can be expressed in vector and matrix terms as the nonzero eigenvalues, with rank k = min[(a-1),(b-1)], clearly less than min(a,b).

Input:
X - Data matrix=contingence table. Size a-categorical variable 1 x
b-categorical variable 2.

Outputs:
Complete Correspondence Analysis
Pair-wise Dimensions Plots. For the vertical and horizonal lines we use the hline.m and vline.m files kindly published on FEX by Brandon Kuczenski http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=1039

Cite As

Antonio Trujillo-Ortiz (2024). corran (https://www.mathworks.com/matlabcentral/fileexchange/21505-corran), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Text was improved.