Code covered by the BSD License  

Highlights from
corran

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 7.15 KB File ID: #21505
image thumbnail

corran

by Antonio Trujillo-Ortiz

 

22 Sep 2008 (Updated 30 Sep 2008)

Correspondence Analysis.

| Watch this File

File Information
Description

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

Required Products Statistics Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
24 Sep 2008

It was added an appropriate format to cite this file.

29 Sep 2008

Text was improved.

30 Sep 2008

Text was improved.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 10:20:34
probability Antonio Trujillo-Ortiz 22 Oct 2008 10:20:34
corespondence analysis Antonio Trujillo-Ortiz 22 Oct 2008 10:20:34
crosstabulation analysis Antonio Trujillo-Ortiz 22 Oct 2008 10:20:34
contingency Antonio Trujillo-Ortiz 22 Oct 2008 10:20:35
probability Cristina McIntire 07 Nov 2008 11:34:54
crosstabulation analysis Aaron 22 Dec 2011 21:46:02

Contact us at files@mathworks.com