metaMDS uses isoMDS to perform
Nonmetric Multidimensional Scaling (NMDS), but tries to find a stable
solution using several random starts (function initMDS). In
addition, it standardizes the scaling in
the result, so that the configurations are easier
to interpret (function postMDS), and adds species scores to the
site ordination (function wascores).metaMDS(comm, distance = "bray", k = 2, trymax = 20, autotransform =TRUE,
noshare = 0.1, expand = TRUE, trace = 1, plot = FALSE,
previous.best, ...)
## S3 method for class 'metaMDS':
plot(x, display = c("sites", "species"), choices = c(1, 2),
type = "p", shrink = FALSE, ...)
## S3 method for class 'metaMDS':
points(x, display = c("sites", "species"),
choices = c(1,2), shrink = FALSE, select, ...)
## S3 method for class 'metaMDS':
text(x, display = c("sites", "species"), labels,
choices = c(1,2), shrink = FALSE, select, ...)
## S3 method for class 'metaMDS':
scores(x, display = c("sites", "species"), shrink = FALSE,
choices, ...)
metaMDSdist(comm, distance = "bray", autotransform = TRUE, noshare = 0.1,
trace = 1, commname, zerodist = "fail", ...)
metaMDSiter(dist, k = 2, trymax = 20, trace = 1, plot = FALSE, previous.best,
...)
initMDS(x, k=2)
postMDS(X, dist, pc=TRUE, center=TRUE, halfchange=TRUE, threshold=0.8,
nthreshold=10, plot=FALSE, ...)
metaMDSredist(object, ...)vegdist.isoMDS.stepacross to find flexible shortest paths
among dissimilarities.wascores.trace = 2 or higher will be
more voluminous.par(ask = TRUE) with this option.isoMDS default for the
starting solution.isoMDS or plot
object."p" for points, "t" for text, and
"n" for axes only."sites" or "species".TRUE for displayed items or a vector of indices
of displayed items.comm: should not be given if the
function is called directly."fail"
or "add" a small positive value.metaMDS.metaMDS returns an object of class
metaMDS. The final site ordination is stored in the item
points, and species ordination in the item species. The
other items store the information on the steps taken by the
function. The object has print, plot, points and
text methods.
Functions metaMDSdist and metaMDSredist return
vegdist objects.
Function initMDS returns a random
configuration which is intended to be used within
isoMDS only. Functions metaMDSiter and
postMDS returns the result of isoMDS with
updated configuration.initMDS and postMDS together with some
other functions are intended to
help run NMDS wit isoMDS like recommended by
Minchin (1987). Function metaMDS combines all recommendations
into one command for a shotgun style analysis. The steps in
metaMDS are:
wisconsin. If the values look
very large, the function also performssqrttransformation. Both of these standardization are generally found
to improve the results. However, the limits are completely
arbitrary (at present, data maximum 50 triggerssqrtand >9 triggerswisconsin). If you want to have a full
control of the analysis, you
should setautotransform = FALSEand make explicit
standardization in the command.vegdistcan be used. Functionrankindexcan be used for finding the test winner for
you data and gradients.stepacrossdissimilarities, or flexible shortest paths among all sites. Thestepacrossis triggered by optionnoshare. If
you do not like manipulation of original distances, you should setnoshare = 1.isoMDSis to start from
metric scaling (withcmdscale) which typically is
close to a local optimum. The strategy inmetaMDSis to first
run a defaultisoMDS, or use theprevious.bestsolution if supplied, and take
its solution as the standard (Run 0). ThenmetaMDSstartsisoMDSfrom several
random starts (maximum number is given bytrymax). If a
solution is better (has a lower stress) than the previous standard,
it is taken as the new standard. If the solution is better or close
to a standard,metaMDScompares two solutions using
Procrustes analysis using functionprocrusteswith
optionsymmetric = TRUE. If the two solutions are very
similar in their Procrustesrmseand the largest residual is
very small, the solutions are regarded as convergent and the best
one is saved. Please note that the conditions are stringent, and you
may have found good and relatively stable solutions although the
function is not yet satisfied. Settingtrace = TRUEwill
monitor the final stresses, andplot = TRUEwill display
Procrustes overlay plots from each comparison.metaMDSwill runpostMDSfor the final result. FunctionpostMDSprovides the following
ways of ``fixing'' the
indeterminacy of scaling and orientation of axes in NMDS:
Centring moves the origin to the
average of the axes. Principal components rotate the configuration
so that the variance of points is maximized on first
dimension. Half-change scaling scales the configuration so that one
unit means halving of community similarity from replicate similarity.
Half-change scaling is
based on closer dissimilarities where the relation between ordination
distance and community dissimilarity is rather linear; the limit is
controlled by parameterthreshold. If there are enough points
below this threshold (controlled by the the parameternthreshold), dissimilarities are regressed on distances.
The intercept of this regression is taken as the replicate
dissimilarity, and half-change is the distance where similarity
halves according to linear regression. Obviously the method is
applicable only for dissimilarity indices scaled to$0 \ldots 1$,
such as Kulczynski, Bray-Curtis and Canberra indices.wascoreswith given value of parameterexpand.
The expansion of weighted averages can be undone withshrink
= TRUEinplotorscoresfunctions.Minchin, P.R. (1987) An evaluation of relative robustness of techniques for ecological ordinations. Vegetatio 71, 145-156.
isoMDS, decostand,
wisconsin,
vegdist, rankindex, stepacross,
procrustes, wascores,
ordiplot.## The recommended way of running NMDS (Minchin 1987)
##
data(dune)
library(MASS) ## isoMDS
# NMDS
sol <- metaMDS(dune)
sol
plot(sol, type="t")Run the code above in your browser using DataLab