Learn R Programming

vegan (version 2.6-8)

eigenvals: Extract Eigenvalues from an Ordination Object

Description

Function extracts eigenvalues from an object that has them. Many multivariate methods return such objects.

Usage

eigenvals(x, ...)
# S3 method for cca
eigenvals(x, model = c("all", "unconstrained", "constrained"),
          constrained = NULL, ...)
# S3 method for decorana
eigenvals(x, kind = c("additive", "axiswise", "decorana"),
           ...)
# S3 method for eigenvals
summary(object, ...)

Value

An object of class "eigenvals", which is a vector of eigenvalues.

The summary method returns an object of class

"summary.eigenvals", which is a matrix.

Arguments

x

An object from which to extract eigenvalues.

object

An eigenvals result object.

model

Which eigenvalues to return for objects that inherit from class "cca" only.

constrained

Return only constrained eigenvalues. Deprecated as of vegan 2.5-0. Use model instead.

kind

Kind of eigenvalues returned for decorana. Only "additive" eigenvalues can be used for reporting importances of components in summary. "axiswise" gives the non-additive eigenvalues, and "decorana" the decorana values (see decorana for details).

...

Other arguments to the functions (usually ignored)

Author

Jari Oksanen.

Details

This is a generic function that has methods for cca, wcmdscale, pcnm, prcomp, princomp, dudi (of ade4), and pca and pco (of labdsv) result objects. The default method also extracts eigenvalues if the result looks like being from eigen or svd. Functions prcomp and princomp contain square roots of eigenvalues that all called standard deviations, but eigenvals function returns their squares. Function svd contains singular values, but function eigenvals returns their squares. For constrained ordination methods cca, rda and capscale the function returns the both constrained and unconstrained eigenvalues concatenated in one vector, but the partial component will be ignored. However, with argument constrained = TRUE only constrained eigenvalues are returned.

The summary of eigenvals result returns eigenvalues, proportion explained and cumulative proportion explained. The result object can have some negative eigenvalues (wcmdscale, dbrda, pcnm) which correspond to imaginary axes of Euclidean mapping of non-Euclidean distances (Gower 1985). In these case real axes (corresponding to positive eigenvalues) will "explain" proportion >1 of total variation, and negative eigenvalues bring the cumulative proportion to 1. capscale will only find the positive eigenvalues and only these are used in finding proportions. For decorana the importances and cumulative proportions are only reported for kind = "additive", because other alternatives do not add up to total inertia of the input data.

References

Gower, J. C. (1985). Properties of Euclidean and non-Euclidean distance matrices. Linear Algebra and its Applications 67, 81--97.

See Also

eigen, svd, prcomp, princomp, cca, rda, capscale, wcmdscale, cca.object.

Examples

Run this code
data(varespec)
data(varechem)
mod <- cca(varespec ~ Al + P + K, varechem)
ev <- eigenvals(mod)
ev
summary(ev)

## choose which eignevalues to return
eigenvals(mod, model = "unconstrained")

Run the code above in your browser using DataLab