Correspondence analysis

Correspondence analysis without writing code

Correspondence analysis is the ordination for two-way count tables: it shows how the rows and the columns of a contingency or abundance table correspond. Magic Stat runs it from the spreadsheet you already have and gives you the inertia, the chi-square and the biplot.

The honest part

What correspondence analysis does, and when to reach for it

Correspondence analysis takes a two-way table of non-negative counts — sites by species, samples by categories, any contingency table — and places both the rows and the columns in one low-dimensional space. Rows and columns that sit close together in that space correspond more than the row and column totals alone would predict.

Everything in CA is measured on a chi-square metric: the analysis decomposes the chi-square statistic of the table, and the inertia of each axis is a share of that total. That is what forces the constraint you will meet in the dialog — the data must be non-negative and complete. Negative values, or a spreadsheet full of gaps, are not a CA table.

CA is not the tool for continuous, possibly negative variables with linear structure; that is PCA. It is also not the tool when you want to explain the table by a second set of measured variables — that is RDA or CCA. And plain CA inherits the arch effect on long gradients, which is exactly what DCA was designed to remove.

What it does

What Magic Stat gives you for CA

How it works

From a count table to a biplot

  1. Load the table. samples or sites in rows, species or categories in columns, non-negative counts with positive row totals.
  2. Pick CA. Statistics → Multivariate → CA.
  3. Choose the variables in matrix X. and a grouping column if you want the points coloured by a factor.
  4. Run it. Magic Stat computes the chi-square standardised residuals, the SVD and the row and column scores in one step.
  5. Read and export. inertia per axis in the results table, the biplot in the figure, and both in the report.
Options

The settings, in the dialog

Input: a non-negative, complete table. CA is chi-square based, so for a raw count table the usual transformation is None — the chi-square metric is already part of the method.

Transformations available in the dialog: None · Z-score (standardise) · ln(1+x) · ln(x) · Hellinger · Chord · Chi-square · Square root · Range 0–1. A grouping column, sample labels and point sizes are supported for the figure.

Frequently asked

Correspondence analysis questions, answered honestly

Is correspondence analysis the same as PCA?

No. PCA decomposes the variance of continuous variables on a Euclidean metric. CA decomposes the chi-square of a count table on a chi-square metric. Using PCA on a contingency table is a common mistake; CA is the appropriate ordination for that kind of table.

CA or CCA?

Plain CA is unconstrained — it only describes the table you give it. CCA constrains the ordination by a second set of environmental or explanatory variables and adds a permutation test. If you have predictors you want to explain the table with, use CCA.

My table has negative values — what now?

CA requires non-negative, complete data. If your variables are continuous and can be negative, the appropriate method is usually PCA. If you genuinely need the chi-square framework, that should be a deliberate, stated choice, not an afterthought.

What about supplementary or illustrative variables?

Not in this dialog. CA here fits the table you give it. If you need supplementary rows or columns, FactoMineR::CA or the ca package in R is the better tool — and we will say so rather than pretend otherwise.

Is my data uploaded somewhere?

No. The analysis runs on your computer. The only signal the app sends automatically is an anonymous installation counter — no data, no names, no e-mail.

Detrended correspondence analysis → Canonical correspondence analysis → Redundancy analysis →