Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nmds

Nonmetric Multidimensional Scaling


Description

This function is simply a wrapper for the isoMDS function in the MASS package by Venables and Ripley. The purpose is to convert the output to class ‘dsvord’ to simplify plotting and additional graphical analysis as well as to provide a summary method.

Usage

nmds(dis,k=2,y=cmdscale(d=dis,k=k),maxit=50,trace=FALSE)
bestnmds(dis,k=2,itr=20,maxit=100,trace=FALSE)

Arguments

dis

a dist object returned from dist or a full symmetric dissimilarity or distance matrix

k

the desired number of dimensions for the result

y

a matrix of initial locations (objects as rows, coordinates as columns, as many columns as specified by k). If none is supplied, cmdscale is used to generate them

maxit

the maximum number of iterations in the isoMDS routine

trace

a switch to control printing intermediate results

itr

number of random starts to find best result

Details

The nmds function simply calls the isoMDS function of the MASS library, but converts the result from a list to an object of class ‘dsvord’. The only purpose for the function is to allow ‘plot’, ‘identify’, ‘surf’, and other additional methods to be defined for the class, to simplify the analysis of the result.

The ‘bestnmds’ function runs one run from a PCO solution and ‘itr-1’ number of random initial locations and returns the best result of the set.

Value

An object of class ‘dsvord’, with components:

points

the coordinates of samples along axes

stress

the "goodness-of-fit" computed as stress in percent

type

‘NMDS’

Note

nmds is included as part of the LabDSV package to provide a consistent interface and utility for vegetation ordination methods. Other analyses included with the same interface at present include principal components analysis (pca), principal coordinates analysis (pco), and t-distributed neighborhood embedding (t-SNE).

Author(s)

Venables and Ripley for the original isoMDS function included in the MASS package.

References

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

Kruskal, J.B. (1964) Nonmetric multidimensional scaling: a numerical method. Psychometrics 29:115-129.

T.F. Cox and M.A.A. Cox. (1994) Multidimensional Scaling. Chapman and Hall.

See Also

isoMDS for the original function

plot.dsvord for the ‘plot’ method, the ‘plotid’ method to identify points with a mouse, the ‘points’ method to identify points meeting a logical condition, the ‘hilight’ method to color-code points according to a factor, the ‘chullord’ method to add convex hulls for a factor, or the the ‘surf’ method to add surface contours for continuous variables.

initMDS for an alternative way to automate random starts

postMDS for a post-solution rescaling

metaMDS for a full treatment of variations

Examples

data(bryceveg)
data(brycesite)
dis.man <- dist(bryceveg,method="manhattan")
demo.nmds <- nmds(dis.man,k=4)
plot(demo.nmds)
points(demo.nmds,brycesite$elev>8000)
plotid(demo.nmds,ids=row.names(brycesite))

labdsv

Ordination and Multivariate Analysis for Ecology

v2.0-1
GPL (>= 2)
Authors
David W. Roberts <droberts@montana.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.