6.4.2 CCA of the Doubs River Data
6.4.2.1 CCA Using vegan
Let us run a CCA of the Doubs data using vegan’s cca() function and the
formula interface. The species data are the raw, untransformed abundances and the
explanatory variables are all the ones in object env3. Do not use Hellinger,
log-chord, or chord-transformed data, which are meant to be used with RDA; the
preserved distance would no longer be the χ
2 distance and the results could not be
interpreted. Furthermore, the row sums of the data table, which are used as weights
in the CCA regressions, have no identifiable meanings for such transformed data.
(spe.cca <- cca(spe ~ ., env3))
summary(spe.cca)
# Scaling 2 (default)
# Unadjusted and adjusted R^2 - like statistics
RsquareAdj(spe.cca)
Hint In CCA the measure of explained variation is not the “true” R
2 but a ratio of
inertias. Furthermore, the “adjusted R
2
” is estimated by a bootstrap procedure
(Peres-Neto et al. 2006). For a CCA, the function RsquareAdj() does it with
1000 permutations by default. Consequently, the values obtained can vary from
one run to another.
The differences with an RDA output are the following:
• The variation is now expressed as Mean squared contingency coefficient.
• The maximum number of canonical axes in CCA is min[( p-1), m, n-1]. The
minimum number of residual axes is min[( p-1), n-1]. In our example these
numbers are the same as in RDA.
• The species scores are represented by points in the triplot.
• Site scores are weighted averages (instead of weighted sums) of species scores.
6.4.2.2 CCA Triplot
The vegan-based code to produce CCA triplots is similar to the one used for RDA,
except that the response variables (species) are represented by points and thus arrows
are not available for them (Fig. 6.11).
6.4 Canonical Correspondence Analysis (CCA)
257
6.4.2.1 CCA Using vegan
Let us run a CCA of the Doubs data using vegan’s cca() function and the
formula interface. The species data are the raw, untransformed abundances and the
explanatory variables are all the ones in object env3. Do not use Hellinger,
log-chord, or chord-transformed data, which are meant to be used with RDA; the
preserved distance would no longer be the χ
2 distance and the results could not be
interpreted. Furthermore, the row sums of the data table, which are used as weights
in the CCA regressions, have no identifiable meanings for such transformed data.
(spe.cca <- cca(spe ~ ., env3))
summary(spe.cca)
# Scaling 2 (default)
# Unadjusted and adjusted R^2 - like statistics
RsquareAdj(spe.cca)
Hint In CCA the measure of explained variation is not the “true” R
2 but a ratio of
inertias. Furthermore, the “adjusted R
2
” is estimated by a bootstrap procedure
(Peres-Neto et al. 2006). For a CCA, the function RsquareAdj() does it with
1000 permutations by default. Consequently, the values obtained can vary from
one run to another.
The differences with an RDA output are the following:
• The variation is now expressed as Mean squared contingency coefficient.
• The maximum number of canonical axes in CCA is min[( p-1), m, n-1]. The
minimum number of residual axes is min[( p-1), n-1]. In our example these
numbers are the same as in RDA.
• The species scores are represented by points in the triplot.
• Site scores are weighted averages (instead of weighted sums) of species scores.
6.4.2.2 CCA Triplot
The vegan-based code to produce CCA triplots is similar to the one used for RDA,
except that the response variables (species) are represented by points and thus arrows
are not available for them (Fig. 6.11).
6.4 Canonical Correspondence Analysis (CCA)
257
