polarord | R Documentation |
Polar or Bray-Curtis ordination is a historic ordination method that could be performed without computers with simple hand calculations (Bray & Curtis 1957). Ordination axis is found by selecting two extreme points and projecting all points between these end points. The current function follows Beals (1984) in selecting the endpoints, projection of points on axis, and defining the residual distances for later axes.
polarord(d, k = 2, endpoints, metric = c("euclidean", "manhattan"))
## S3 method for class 'polarord'
plot(x, choices = c(1, 2), type = "t", display, ...)
## S3 replacement method for class 'polarord'
sppscores(object) <- value
## S3 method for class 'polarord'
eigenvals(x, ...)
d |
Dissimilarities or distances: a |
k |
Number of dimensions. |
endpoints |
Indices (not names) of endpoints for axes. This can be a single integer for the first endpoint, and the second endpoint and later axes are found automatically. If this is a vector, its non-zero values are taken as indices of endpoints of sequential axes. |
metric |
Use either |
x |
|
choices |
Axes shown. |
type |
Type of graph which may be |
display |
Items displayed: |
... |
Other arguments to the function (passed to
|
object |
|
value |
Community data to find the species scores. |
The implementation follows McCune & Grace (2002, Chapter 17). The
endpoints are found using the variance-regression method of Beals
(1984). The first endpoint has the highest variance of distances to
other points. This guarantees that the point is at the margin of
the multivariate cloud but is not an outlier, since outliers have
long distances to all points and hence low variance of
distances. The second endpoint has the lowest (most negative)
regression coefficient between distances from the first and second
point to all other points. This selects a point at the margin of
the main cloud of points, opposite to the first endpoint. All
points are projected on the axis between the endpoints, and this
gives the scores on a polar ordination axis. Then the effect of the
axis are removed by calculating residual distances. The projection
of points and calculation of residuals is based either on Euclidean
or Manhattan geometry, depending on the argument metric
.
Ecological indices are usually semimetric, and negative residual
distances can emerge, but these are taken as zero in the current
function.
The eigenvalues are estimated from the dispersion of points, and
they are not necessarily in descending order. Usually only some
first axes are reliable, and too high numbers of dimensions should
be avoided. The inertia and eigenvalues give the average
dispersion, and they are consistent with dbrda
and capscale
.
Polar ordination is a historical method that is little used today,
but several authors claim that it is a powerful method (see McCune
& Grace 2002). Although the basic operations can be easily
performed by hand or graphically, the later developments of
endpoint selection require more extensive calculations. With modern
numerical utilities, the polar ordination is not faster than metric
multidimensional scaling (cmdscale
,
wcmdscale
).
It is possible to use predefined endpoints instead of automatic selection. This can be useful for confirmatory analysis (McCune & Grace 2002). If only one endpoint is given, the others are selected automatically.
McCune & Grace (2002) suggest that Polar Ordination can be
alternatively performed with Manhattan or City-Block methods for
projecting points onto axes and calculating residual ordination,
although they say that this is "yet largerly untested". This can be
implemented by setting metric = "manhattan"
. However,
two-dimensional configuration cannot be recovered from its
Manhattan distances with this method, but it can be exactly
recovered from its Euclidean distances and Euclidean metric (see
Examples). Ordination is similar to the original two-dimensional
configuration only if the endpoints were chosen so that the
ordination axes are parallel to the dimensions in the original
configuration. Further, ordinations with Manhattan metric are not
invariant when rotated: Manhattan distances are calculated with
respect to the axes, and they change if axes are rotated. This also
means that fitted vectors cannot be used for environmental
variables, and the interpretation of the ordination graph needs
special and rare intuition. I warn against use of
metric = "manhattan"
.
Function sppscores
can be used to add species scores
to the ordination result.
The function returns an object of class "polarord"
with the
following elements:
points
: The ordination scores.
inertia
: Total inertia of the input dissimilarities.
eig
: Eigenvalues of axes. These do not usually add up to
total inertia and may not be in strictly descending order.
endpoints
: The indices (not the names) of the endpoints for
each axis.
call
: Function call.
Beals, E. W. (1984) Bray-Curtis ordination: an effective strategy for analysis of ecological multivariate data. Advances in Ecological Research 14, 1–55.
Bray, J. R. & Curtis, J. T. (1957) An ordination of the upland forest communities in southern Wisconsin. Ecological Monographs 27, 325–349.
McCune, B. & Grace, J. B. (2002) Analysis of Ecological Communities. MjM Software Design.
data(spurn)
dis <- dist(spurn, method = "binary") ## Jaccard index
ord <- polarord(dis)
ord
summary(eigenvals(ord))
## add species scores
sppscores(ord) <- spurn
plot(ord)
## Two-dimensional configuration recovered with Euclidean metric
if (require(vegan)) { ## Procrustes analysis
set.seed(1009)
x <- matrix(runif(50), 25, 2) # 2-dim matrix
plot(procrustes(x, polarord(dist(x)))) # Euclidean: exact
plot(procrustes(x, polarord(dist(x, "man"), metric="man"))) # diverges
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.