capscale  R Documentation 
Distancebased redundancy analysis (dbRDA) is an ordination method
similar to Redundancy Analysis (rda
), but it allows
nonEuclidean dissimilarity indices, such as Manhattan or
Bray–Curtis distance. Despite this nonEuclidean feature, the analysis
is strictly linear and metric. If called with Euclidean distance,
the results are identical to rda
, but dbRDA
will be less efficient. Functions capscale
and dbrda
are
constrained versions of metric scaling, a.k.a. principal coordinates
analysis, which are based on the Euclidean distance but can be used,
and are more useful, with other dissimilarity measures. The functions
can also perform unconstrained principal coordinates analysis,
optionally using extended dissimilarities.
capscale(formula, data, distance = "euclidean", sqrt.dist = FALSE, comm = NULL, add = FALSE, dfun = vegdist, metaMDSdist = FALSE, na.action = na.fail, subset = NULL, ...) dbrda(formula, data, distance = "euclidean", sqrt.dist = FALSE, add = FALSE, dfun = vegdist, metaMDSdist = FALSE, na.action = na.fail, subset = NULL, ...)
formula 
Model formula. The function can be called only with the
formula interface. Most usual features of 
data 
Data frame containing the variables on the right hand side of the model formula. 
distance 
The name of the dissimilarity (or distance) index if
the LHS of the 
sqrt.dist 
Take square roots of dissimilarities. See section

comm 
Community data frame which will be used for finding
species scores when the LHS of the 
add 
Add a constant to the nondiagonal dissimilarities such
that all eigenvalues are nonnegative in the underlying Principal
Coordinates Analysis (see 
dfun 
Distance or dissimilarity function used. Any function
returning standard 
metaMDSdist 
Use 
na.action 
Handling of missing values in constraints or
conditions. The default ( 
subset 
Subset of data rows. This can be a logical vector
which is 
... 
Other parameters passed to underlying functions (e.g.,

Functions capscale
and dbrda
provide two alternative
implementations of dbRDA. Function capscale
is based on
Legendre & Anderson (1999): the dissimilarity data are first
ordinated using metric scaling, and the ordination results are
analysed as rda
. Function dbrda
is based on
McArdle & Anderson (2001) and directly decomposes
dissimilarities. It does not use rda
but a parallel
implementation adapted for analysing dissimilarities and returns a
subset of rda
items. With Euclidean distances both
results are identical to rda
. Other dissimilarities
may give negative eigenvalues associated with imaginary
axes. Negative eigenvalues are handled differently: capscale
ignores imaginary axes and analyses only real axes with positive
eigenvalues, and dbrda
directly analyses dissimilarities and
can give negative eigenvalues in any component.
If the user supplied a community data frame instead of
dissimilarities, the functions will find dissimilarities using
vegdist
or distance function given in dfun
with
specified distance
. The functions will accept distance
objects from vegdist
, dist
, or any other
method producing compatible objects. The constraining variables can be
continuous or factors or both, they can have interaction terms, or
they can be transformed in the call. Moreover, there can be a
special term Condition
just like in rda
and
cca
so that “partial” analysis can be performed.
Function dbrda
does not return species scores, and they can
also be missing in capscale
, but they can be added after the
analysis using function sppscores
.
NonEuclidean dissimilarities can produce negative eigenvalues
(Legendre & Anderson 1999, McArdle & Anderson 2001). If there are
negative eigenvalues, the printed output of capscale
will add
a column with sums of positive eigenvalues and an item of sum of
negative eigenvalues, and dbrda
will add a column giving the
number of real dimensions with positive eigenvalues. If negative
eigenvalues are disturbing, functions let you to distort the
dissimilarities so that only nonnegative eigenvalues will be
produced with argument add = TRUE
. Alternatively, with
sqrt.dist = TRUE
, square roots of dissimilarities will be
used which may help in avoiding negative eigenvalues (Legendre &
Anderson 1999).
The functions can be also used to perform ordinary metric scaling
a.k.a. principal coordinates analysis by using a formula with only a
constant on the left hand side, or comm ~ 1
. With
metaMDSdist = TRUE
, the function can do automatic data
standardization and use extended dissimilarities using function
stepacross
similarly as in nonmetric multidimensional
scaling with metaMDS
.
The functions return an object of class capscale
or
dbrda
which inherits from rda
. See
cca.object
for description of the result object.
The function capscale
was originally developed as a
variant of constrained analysis of proximities (Anderson & Willis
2003), but these developments made it similar to dbRDA. However, it
discards the imaginary dimensions with negative eigenvalues and
ordination and significance tests area only based on real dimensions
and positive eigenvalues.
The inertia is named after the dissimilarity index as defined in the
dissimilarity data, or as unknown distance
if such
information is missing. If the largest original dissimilarity was
larger than 4, capscale
handles input similarly as rda
and bases its analysis on variance instead of sum of
squares. Keyword mean
is added to the inertia in these cases,
e.g. with Euclidean and Manhattan distances. Inertia is based on
squared index, and keyword squared
is added to the name of
distance, unless data were square root transformed (argument
sqrt.dist=TRUE
). If an additive constant was used with
argument add
, Lingoes
or Cailliez adjusted
is
added to the the name of inertia, and the value of the constant is
printed.
Jari Oksanen
Anderson, M.J. & Willis, T.J. (2003). Canonical analysis of principal coordinates: a useful method of constrained ordination for ecology. Ecology 84, 511–525.
Gower, J.C. (1985). Properties of Euclidean and nonEuclidean distance matrices. Linear Algebra and its Applications 67, 81–97.
Legendre, P. & Anderson, M. J. (1999). Distancebased redundancy analysis: testing multispecies responses in multifactorial ecological experiments. Ecological Monographs 69, 1–24.
Legendre, P. & Legendre, L. (2012). Numerical Ecology. 3rd English Edition. Elsevier.
McArdle, B.H. & Anderson, M.J. (2001). Fitting multivariate models to community data: a comment on distancebased redundancy analysis. Ecology 82, 290–297.
rda
, cca
, plot.cca
,
anova.cca
, vegdist
,
dist
, cmdscale
, wcmdscale
for underlying and related functions. Function sppscores
can add species scores or replace existing species scores.
The function returns similar result object as rda
(see
cca.object
). This section for rda
gives a
more complete list of functions that can be used to access and
analyse dbRDA results.
data(varespec) data(varechem) ## Basic Analysis vare.cap < capscale(varespec ~ N + P + K + Condition(Al), varechem, dist="bray") vare.cap plot(vare.cap) anova(vare.cap) ## Avoid negative eigenvalues with additive constant capscale(varespec ~ N + P + K + Condition(Al), varechem, dist="bray", add =TRUE) ## Avoid negative eigenvalues by taking square roots of dissimilarities capscale(varespec ~ N + P + K + Condition(Al), varechem, dist = "bray", sqrt.dist= TRUE) ## Principal coordinates analysis with extended dissimilarities capscale(varespec ~ 1, dist="bray", metaMDS = TRUE) ## dbrda dbrda(varespec ~ N + P + K + Condition(Al), varechem, dist="bray") ## avoid negative eigenvalues also with Jaccard distances dbrda(varespec ~ N + P + K + Condition(Al), varechem, dist="jaccard")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.