| cca.object {vegan} | R Documentation |
Ordination methods cca, rda and
capscale return similar result objects. Function
capscale inherits from rda and rda
inherits from cca. This inheritance structure is due to
historic reasons: cca was the first of these implemented in
vegan. Hence the nomenclature in cca.object reflects
cca. This help page describes the internal structure of the
cca object for programmers.
A cca object has the following elements:
call |
the function call. |
colsum, rowsum, rowsum.excluded |
Column and row sums in
|
grand.total |
Grand total of community data in |
inertia |
Text used as the name of inertia. |
method |
Text used as the name of the ordination method. |
terms |
The |
terminfo |
Further information on terms with three subitems:
|
tot.chi |
Total inertia or the sum of all eigenvalues. |
na.action |
The result of |
pCCA, CCA, CA |
Actual ordination results for conditioned
(partial), constrained and unconstrained components of the
model. If constraints or conditions are not given, the
corresponding components
|
If the constraints had missing values or subsets, and na.action
was set to na.exclude or na.omit, the
result will have some extra items:
subsetsubset evaluated as a logical vector
(TRUE for included cases).
na.actionThe object returned by
na.action which is a named vector of indices of
removed items. The class of the vector is either "omit" or
"exclude" as set by na.action. The na.action
is applied after subset so that the indices refer to the subset
data.
residuals.zombieA zombie vector of the length of
number of rows in the residual ordination. R versions before 2.13.0
may use this vector to find the number of valid observations,
and it is provided for their use although this is useless in R 2.13.0
and in vegan. Currently R uses nobs.cca to find
the number of observations.
rowsum.excludedRow sums of removed observations. Only
in cca.
CCA$wa.excludedThe WA scores for sites (found from
community data) in constrained ordination if
na.action was na.exclude and the
scores could be calculated. The scores cannot be found for
capscale and in partial ordination.
CA$u.excludedRow scores for sites in unconstrained ordination with identical conditions as above.
Vegan has two functions for distance-based Redundancy
analysis: capscale and dbrda. Function
capscale uses rda and returns its result
object, but it may add some items depending on its arguments:
real.tot.chiSum of positive eigenvalues if there are
negative eigenvalues. The item tot.chi gives the total
inertia with negative eigenvalues. This item is given for the
whole model and for each component pCCA, CCA and
CA if there are negative eigenvalues.
metaMDSdistThe data set name if
metaMDSdist = TRUE.
sqrt.distLogical value, TRUE if squareroots of
dissimilarities were used.
acAdditive constant used if add = TRUE.
addThe adjustment method to find ac, either
"lingoes" or "cailliez" (Legendre & Legendre
2012).
adjustAdjustment of dissimilarities: see
capscale, section “Notes”.
GThe working structure of Gower transformed
dissimilarities defined as -(D^2 - M)/2, where D are
the dissimilarities and M is the centring matrix. This
structure is used to asses the total inertia, and it will be used
also in permutation tests. This is given for items pCCA and
CCA, and for CCA it is the residual G after
pCCA.
Function dbrda does not use rda but
provides a parallel implementation for dissimilarities. Its result
output is very similar to capscale described above
with the following differences:
Xbar, vare NA because they cannot be
calculated from dissimilarities.
Fit of pCCA is from Gower double centred
dissimilarities G instead of Xbar (that does not
exist).
G is returned with pCCA, CCA and
CA components. It always gives the transformed
dissimilarities as they enter the stage of analysis, i.e.,
before applying conditions or constraints.
eiglists also negative eigenvalues for CCA
and pCCA.
uor row scores only give real axes with positive
eigenvalues. The imaginary scores (if any) are in
imaginary.u. The number of columns of real scores
(positive eigenvalues) is given in item poseig. There is
no imaginary.u.eig.
In old versions of vegan the object also included scores
scaled by eigenvalues (u.eig, v.eig and wa.eig),
but these were removed in vegan 2.2-0. The scores are scaled
when they are accessed with scores function. It is
advisable to always use scores in accessing the
results instead of directly accessing the elements of the the
cca object.
Jari Oksanen
Legendre, P. and Legendre, L. (2012) Numerical Ecology. 3rd English ed. Elsevier.
The description here provides a hacker's interface. User
level functions for further analysis and handling of cca
objects are described in this section in cca. Also for
a hacker interface, it may be better to use following low level
functions to access the results:
scores.cca (which also scales results),
predict.cca (which can also use newdata),
fitted.cca, residuals.cca,
alias.cca, coef.cca,
model.frame.cca, model.matrix.cca,
deviance.cca, eigenvals.cca,
RsquareAdj.cca,
weights.cca, nobs.cca, or rda
variants of these functions.
You can use as.mlm to cast a cca.object into
result of multiple response
linear model (lm) in order to more easily find some
statistics (which in principle could be directly found from the
cca object as well).
This section in cca gives a more complete list of
methods to handle the constrained ordination result object.
# Some species will be missing in the analysis, because only a subset # of sites is used below. data(dune) data(dune.env) mod <- cca(dune[1:15,] ~ ., dune.env[1:15,]) # Look at the names of missing species attr(mod$CCA$v, "na.action") # Look at the names of the aliased variables: mod$CCA$alias # Access directly constrained weighted orthonormal species and site # scores, constrained eigenvalues and margin sums. spec <- mod$CCA$v sites <- mod$CCA$u eig <- mod$CCA$eig rsum <- mod$rowsum csum <- mod$colsum