class skbio.math.stats.ordination.RDA(Y, X, site_ids, species_ids, scale_Y=False)[source]

Compute redundancy analysis, a type of canonical analysis.

It is related to PCA and multiple regression because the explained variables Y are fitted to the explanatory variables X and PCA is then performed on the fitted values. A similar process is performed on the residuals.

RDA should be chosen if the studied gradient is small, and CCA when it’s large, so that the contingency table is sparse.


Y : array_like

\(n \times p\) response matrix. Its columns need be dimensionally homogeneous (or you can set scale_Y=True).

X : array_like

\(n \times m, n \geq m\) matrix of explanatory variables. Its columns need not be standardized, but doing so turns regression coefficients into standard regression coefficients.

scale_Y : bool, optional

Controls whether the response matrix columns are scaled to have unit standard deviation. Defaults to False.

See also



The algorithm is based on [R68], S 11.1, and is expected to give the same results as rda(Y, X) in R’s package vegan.


[R68](1, 2) Legendre P. and Legendre L. 1998. Numerical Ecology. Elsevier, Amsterdam.


scores(scaling) Compute site, species and biplot scores for different scalings.