mds  R Documentation 
Performs classical or nonmetric Multidimensional Scaling analysis
mds(x, ...)
## Default S3 method:
mds(
x,
classical = FALSE,
plot = TRUE,
shepard = FALSE,
nnlines = FALSE,
pos = NULL,
col = "black",
bg = "white",
xlab = NA,
ylab = NA,
asp = 1,
...
)
## S3 method for class 'detritals'
mds(
x,
method = "KS",
classical = FALSE,
plot = TRUE,
shepard = FALSE,
nnlines = FALSE,
pos = NULL,
col = "black",
bg = "white",
xlab = NA,
ylab = NA,
hide = NULL,
asp = 1,
...
)
x 
a dissimilarity matrix OR an object of class

... 
optional arguments to the generic 
classical 
logical flag indicating whether classical
( 
plot 
show the MDS configuration (if 
shepard 
logical flag indicating whether the graphical output
should show the MDS configuration ( 
nnlines 
if 
pos 
a position specifier for the labels (if

col 
plot colour (may be a vector) 
bg 
background colour (may be a vector) 
xlab 
a string with the label of the x axis 
ylab 
a string with the label of the y axis 
asp 
aspect ratio of the MDS configuration. See

method 
either 
hide 
vector with indices of aliquots that should be removed from the plot. 
Multidimensional Scaling (MDS) is a dimensionreducting technique
that takes a matrix of pairwise ‘dissimilarities’ between objects
(e.g., age distributions) as input and produces a configuration of
two (or higher) dimensional coordinates as output, so that the
Euclidean distances between these coordinates approximate the
dissimilarities of the input matrix. Thus, an MDSconfiguration
serves as a ‘map’ in which similar samples cluster closely together
and dissimilar samples plot far apart. In the context of detrital
geochronology, the dissimilarity between samples is given by the
statistical distance between age distributions. There are many ways
to define this statistical distance. IsoplotR
uses the
KolmogorovSmirnov (KS) statistic due to its simplicity and the
fact that it behaves like a true distance in the mathematical sense
of the word (Vermeesch, 2013). The KSdistance is given by the
maximum vertical distance between two cad
step
functions. Thus, the KSdistance takes on values between zero
(perfect match between two age distributions) and one (no overlap
between two distributions). Calculating the KSdistance between
samples two at a time populates a symmetric dissimilarity matrix
with positive values and a zero diagonal. IsoplotR
implements two algorithms to convert this matrix into a
configuration. The first (‘classical’) approach uses a sequence of
basic matrix manipulations developed by Young and Householder
(1938) and Torgerson (1952) to achieve a linear fit between the
KSdistances and the fitted distances on the MDS configuration. The
second, more sophisticated (‘nonmetric’) approach subjects the
input distances to a transformation f
prior to fitting a
configuration:
\delta_{i,j} = f(KS_{i,j})
where KS_{i,j}
is the KSdistance between samples i
and
j
(for 1 \leq i \neq j \leq n
) and \delta_{i,j}
is the ‘disparity’ (Kruskal, 1964). Fitting an MDS
configuration then involves finding the disparity transformation
that maximises the goodness of fit (or minimises the ‘stress’)
between the disparities and the fitted distances. The latter two
quantities can also be plotted against each other as a 'Shepard
plot'.
Returns an object of class MDS
, i.e. a list
containing the following items:
a twocolumn vector of the fitted configuration
a logical flag indicating whether the MDS
configuration was obtained by classical (TRUE
) or
nonmetric (FALSE
) MDS
the dissimilarity matrix used for the MDS analysis
(only if classical=TRUE
) the final stress
achieved (in percent)
Kruskal, J., 1964. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika 29 (1), 127.
Torgerson, W. S. Multidimensional scaling: I. Theory and method. Psychometrika, 17(4): 401419, 1952.
Vermeesch, P., 2013. Multisample comparison of detrital age distributions. Chemical Geology, 341, pp.140146.
Young, G. and Householder, A. S. Discussion of a set of points in terms of their mutual distances. Psychometrika, 3(1):1922, 1938.
cad
, kde
attach(examples)
mds(DZ,nnlines=TRUE,pch=21,cex=5)
dev.new()
mds(DZ,shepard=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.