metaMDSperforms Nonmetric Multidimensional Scaling (NMDS), and tries to find a stable solution using several random starts. In addition, it standardizes the scaling in the result, so that the configurations are easier to interpret, and adds species scores to the site ordination. The
metaMDSfunction does not provide actual NMDS, but it calls another function for the purpose. Currently
monoMDSis the default choice, and it is also possible to call the
metaMDS(comm, distance = "bray", k = 2, try = 20, trymax = 20, engine = c("monoMDS", "isoMDS"), autotransform =TRUE, noshare = (engine == "isoMDS"), wascores = TRUE, expand = TRUE, trace = 1, plot = FALSE, previous.best, ...) "plot"(x, display = c("sites", "species"), choices = c(1, 2), type = "p", shrink = FALSE, ...) "points"(x, display = c("sites", "species"), choices = c(1,2), shrink = FALSE, select, ...) "text"(x, display = c("sites", "species"), labels, choices = c(1,2), shrink = FALSE, select, ...) "scores"(x, display = c("sites", "species"), shrink = FALSE, choices, ...) metaMDSdist(comm, distance = "bray", autotransform = TRUE, noshare = TRUE, trace = 1, commname, zerodist = "ignore", distfun = vegdist, ...) metaMDSiter(dist, k = 2, try = 20, trymax = 20, trace = 1, plot = FALSE, previous.best, engine = "monoMDS", maxit = 200, parallel = getOption("mc.cores"), ...) initMDS(x, k=2) postMDS(X, dist, pc=TRUE, center=TRUE, halfchange, threshold=0.8, nthreshold=10, plot=FALSE, ...) metaMDSredist(object, ...)
diststructure or as a symmetric square matrix. In the latter case all other stages are skipped except random starts and centring and pc rotation of axes.
tryhas been reached, the iteration will stop when two convergent solutions were found or
autotransform = FALSE.
stepacross. The argument can be logical or a numerical value greater than zero and less than one. If
TRUE, extended dissimilarities are used always when there are no shared species between some sites, if
FALSE, they are never used. If
noshareis a numerical value,
stepacrossis used when the proportion of site pairs with no shared species exceeds
noshare. The number of pairs with no shared species is found with
nosharehas no effect if input data were dissimilarities instead of community data.
trace = 2or higher will be more voluminous.
par(ask = TRUE)with this option.
metaMDSresult (or a dissimilarity structure for
"t"for text, and
"n"for axes only.
TRUEfor displayed items or a vector of indices of displayed items.
comm: should not be given if the function is called directly.
distobject and accepting argument
methodcan be used (but some extra arguments may cause name conflicts).
clus), you must issue
clusterEvalQ(clus, library(vegan))to make available internal vegan functions. With
parallel = 1uses ordinary, non-parallel processing. The parallel processing is done with parallel package.
TRUEwhen dissimilarities were evaluated within
metaMDSand the dissimilarity index has an upper limit of $1$. If
FALSE, the ordination dissimilarities are scaled to the same range as the input dissimilarities.
metaMDSpasses all arguments to its component functions
postMDS, and to
metaMDSreturns an object of class
metaMDS. The final site ordination is stored in the item
points, and species ordination in the item
species, and the stress in item
stress(NB, the scaling of the stress depends on the
isoMDSuses percents, and
monoMDSproportions in the range $0 \ldots 1$). The other items store the information on the steps taken and the items returned by the
enginefunction. The object has
initMDSreturns a random configuration which is intended to be used within
postMDSreturns the result of NMDS with updated configuration.
engine = "monoMDS"the function will tabulate the stopping criteria used, so that you can see which criterion should be made more stringent. The criteria can be given as arguments to
metaMDSand their current values are described in
monoMDS. In particular, if you reach the maximum number of iterations, you should increase the value of
maxit. You may ask for a larger number of random starts without losing the old ones giving the previous solution in argument
previous.best. In addition to too slack convergence criteria and too low number of random starts, wrong number of dimensions (argument
k) is the most common reason for not finding convergent solutions. NMDS is usually run with a low number dimensions (
k=3), and for complex data increasing
kby one may help. If you run NMDS with much higher number of dimensions (say,
k=10or more), you should reconsider what you are doing and drastically reduce
k. For very heterogeneous data sets with partial disjunctions, it may help to set
stepacross, but for most data sets the default
weakties = TRUEis sufficient. Please note that you can give all arguments of other
metaMDS*functions and NMDS engine (default
monoMDS) in your
metaMDScommand,and you should check documentation of these functions for details.
metaMDSis a wrapper function that calls several other functions to combine Minchin's (1987) recommendations into one command. The complete steps in
wisconsin). If the values look very large, the function also performs
sqrttransformation. Both of these standardizations are generally found to improve the results. However, the limits are completely arbitrary (at present, data maximum 50 triggers
sqrtand $>9$ triggers
wisconsin). If you want to have a full control of the analysis, you should set
autotransform = FALSEand standardize and transform data independently. The
autotransformis intended for community data, and for other data types, you should set
autotransform = FALSE. This step is perfomed using
vegdistcan be used. Function
rankindexcan be used for finding the test winner for you data and gradients. The default choice may be bad if you analyse other than community data, and you should probably select an appropriate index using argument
distance. This step is performed using
stepacrossdissimilarities, or flexible shortest paths among all sites. The default NMDS
monoMDSwhich is able to break tied values at the maximum dissimilarity, and this often is sufficient to handle cases with no shared species, and therefore the default is not to use
isoMDSdoes not handle tied values adequately, and therefore the default is to use
stepacrossalways when there are sites with no shared species with
engine = "isoMDS". The
stepacrossis triggered by option
noshare. If you do not like manipulation of original distances, you should set
noshare = FALSE. This step is skipped if input data were dissimilarities instead of community data. This step is performed using
metaMDSis to first run NMDS starting with the metric scaling (
cmdscalewhich usually finds a good solution but often close to a local optimum), or use the
previous.bestsolution if supplied, and take its solution as the standard (
Run 0). Then
metaMDSstarts NMDS from several random starts (minimum number is given by
tryand maximum number by
trymax). These random starts are generated by
initMDS. 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 (function
symmetric = TRUE). If the solutions are very similar in their Procrustes
rmseand the largest residual is very small, the solutions are regarded as convergent and the better one is taken as the new standard. The conditions are stringent, and you may have found good and relatively stable solutions although the function is not yet satisfied. Setting
trace = TRUEwill monitor the final stresses, and
plot = TRUEwill display Procrustes overlay plots from each comparison. This step is performed using
metaMDSiter. This is the only step performed if input data (
comm) were dissimilarities.
postMDSfor the final result. Function
postMDSprovides 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 (with function
MDSrotateyou can alternatively rotate the configuration so that the first axis is parallel to an environmental variable); 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 set by argument
threshold). If there are enough points below this threshold (controlled by the parameter
nthreshold), 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. If half-change scaling is not used, the ordination is scaled to the same range as the original dissimilarities.
wascoreswith given value of parameter
expand. The expansion of weighted averages can be undone with
shrink = TRUEin
scoresfunctions, and the calculation of species scores can be suppressed with
wascores = FALSE.
Minchin, P.R. (1987) An evaluation of relative robustness of techniques for ecological ordinations. Vegetatio 69, 89--107.
## The recommended way of running NMDS (Minchin 1987) ## data(dune) # Global NMDS using monoMDS sol <- metaMDS(dune) sol plot(sol, type="t") ## Start from previous best solution sol <- metaMDS(dune, previous.best = sol) ## Local NMDS and stress 2 of monoMDS sol2 <- metaMDS(dune, model = "local", stress=2) sol2 ## Use Arrhenius exponent 'z' as a binary dissimilarity measure sol <- metaMDS(dune, distfun = betadiver, distance = "z") sol