# cca.object: Result Object from Constrained Ordination with cca, rda or... In pattakosn/Rworkshop: Community Ecology Package

## Description

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.

## Value

A cca object has the following elements:

 call the function call. colsum, rowsum, rowsum.excluded Column and row sums in cca. In rda, item colsum contains standard deviations of species and rowsum is NA. If some data were removed in na.action, the row sums of excluded observations are in item rowsum.excluded in cca (but not in rda). The rowsum.excluded add to the total (one) of rowsum. grand.total Grand total of community data in cca and NA in rda. inertia Text used as the name of inertia. method Text used as the name of the ordination method. terms The terms component of the formula. This is missing if the ordination was not called with formula. terminfo Further information on terms with three subitems: terms which is like the terms component above, but lists conditions and constraints similarly; xlev which lists the factor levels, and ordered which is TRUE to ordered factors. This is produced by vegan internal function ordiTerminfo, and it is needed in predict.cca with newdata. This is missing if the ordination was not called with formula. tot.chi Total inertia or the sum of all eigenvalues. na.action The result of na.action if missing values in constraints were handled by na.omit or na.exclude (or NULL if there were no missing values). This is a vector of indices of missing value rows in the original data and a class of the action, usually either "omit" or "exclude". 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 CCA and pCCA are NULL. If they are specified but have zero rank and zero eigenvalue (e.g., due to aliasing), they have a standard structure like described below, but the result scores have zero columns, but the correct number of rows. The residual component is never NULL, and if there is no residual variation (like in overdefined model), its scores have zero columns. The standard print command does not show NULL components, but it prints zeros for zeroed components. Items pCCA, CCA and CA contain following items: aliasThe names of the aliased constraints or conditions. Function alias.cca does not access this item directly, but it finds the aliased variables and their defining equations from the QR item. biplotBiplot scores of constraints. Only in CCA. centroids(Weighted) centroids of factor levels of constraints. Only in CCA. Missing if the ordination was not called with formula. eigEigenvalues of axes. In CCA and CA. envcentre(Weighted) means of the original constraining or conditioning variables. In pCCA and in CCA. FitThe fitted values of standardized data matrix after fitting conditions. Only in pCCA. QRThe QR decomposition of explanatory variables as produced by qr. The constrained ordination algorithm is based on QR decomposition of constraints and conditions (environmental data). The environmental data are first centred in rda or weighted and centred in cca. The QR decomposition is used in many functions that access cca results, and it can be used to find many items that are not directly stored in the object. For examples, see coef.cca, coef.rda, vif.cca, permutest.cca, predict.cca, predict.rda, calibrate.cca. For possible uses of this component, see qr. In pCCA and CCA. rankThe rank of the ordination component. qrankThe rank of the constraints which is the difference of the ranks of QR decompositions in pCCA and CCA components. Only in CCA. tot.chiTotal inertia or the sum of all eigenvalues of the component. imaginary.chi, imaginary.rankThe sum and rank (number) of negative eigenvalues in capscale. Only in CA and only if negative eigenvalues were found in capscale. u(Weighted) orthonormal site scores. Please note that scaled scores are not stored in the cca object, but they are made when the object is accessed with functions like scores.cca, summary.cca or plot.cca, or their rda variants. Only in CCA and CA. In the CCA component these are the so-called linear combination scores. u.eigu scaled by eigenvalues. There is no guarantee that any .eig variants of scores will be kept in the future releases. v(Weighted) orthonormal species scores. If missing species were omitted from the analysis, this will contain attribute na.action that lists the omitted species. Only in CCA and CA. v.eigv weighted by eigenvalues. waSite scores found as weighted averages (cca) or weighted sums (rda) of v with weights Xbar, but the multiplying effect of eigenvalues removed. These often are known as WA scores in cca. Only in CCA. wa.eigThe direct result of weighted averaging or weighted summation (matrix multiplication) with the resulting eigenvalue inflation. wa.excluded, u.excludedWA scores for rows removed by na.action = na.exclude in CCA and CA components if these could be calculated. XbarThe standardized data matrix after previous stages of analysis. In CCA this is after possible pCCA or after partialling out the effects of conditions, and in CA after both pCCA and CCA. In cca the standardization is Chi-square, and in rda centring and optional scaling by species standard deviations using function scale.

## NA Action and Subset

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:

subset

subset evaluated as a logical vector (TRUE for included cases).

na.action

The 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.zombie

A 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.excluded

Row sums of removed observations. Only in cca.

CCA\$wa.excluded

The 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.excluded

Row scores for sites in unconstrained ordination with identical conditions as above.

## capscale

Function capscale may add some items depending on its arguments:

metaMDSdist

The data set name if metaMDSdist = TRUE.

ac

Additive constant used if add = TRUE.

Adjustment of dissimilarities: see capscale, section “Notes”.

Jari Oksanen

## References

Legendre, P. and Legendre, L. (2012) Numerical Ecology. 3rd English ed. Elsevier.