Learn R Programming

ecodist (version 1.00)

nmds: Non-metric multidimensional scaling

Description

Non-metric multidimensional scaling.

Usage

nmds(dmat, mindim = 1, maxdim = 2, nits = 10, iconf = 0, epsilon = 1e-12, maxit = 500, trace = FALSE)

Arguments

dmat
lower-triangular dissimilarity matrix.
mindim
optional, minimum number of dimensions to use.
maxdim
optional, maximum number of dimensions to use.
nits
optional, number of separate ordinations to use.
iconf
optional, initial configuration. If not specified, then a random configuration is used.
epsilon
optional, acceptable difference in stress.
maxit
optional, maximum number of iterations.
trace
if TRUE, will write progress indicator to the screen.

Value

  • conflist of configurations.
  • stresslist of final stress values.
  • The first results are for the lowest number of dimensions (total number is (mindim - maxdim + 1) * nits).

Details

The goal of NMDS is to find a configuration in a given number of dimensions which preserves rank-order dissimilarities as closely as possible. The number of dimensions must be specified in advance. Because NMDS is prone to finding local minima, several random starts must be used. Stress is used as the measure of goodness of fit. A lower stress indicates a better match between dissimilarity and ordination.

References

Kruskal, J.B. 1964. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika 29:1-27.

Minchin, P.R. 1987. An evaluation of the relative robustness of techniques for ecological ordination. Vegetatio 96:89-108.

See Also

nmds.min, vf

Examples

Run this code
# Example of multivariate analysis using built-in iris dataset
data(iris)
iris.md <- distance(iris[,1:4], "mahal")

# Minimum-stress 2-dimensional nonmetric multidimensional scaling configuration
iris.nmds <- nmds(iris.md)
iris.nmin <- nmds.min(iris.nmds)

# Plot NMDS result with symbols denoting species
plot(iris.nmin, pch=as.numeric(iris[,5]))

# A full example is available in the NMDS 
# section of the main help file for \link{ecodist}.

Run the code above in your browser using DataLab