Last chance! 50% off unlimited learning
Sale ends in
One form of non-metric multidimensional scaling
isoMDS(d, y = cmdscale(d, k), k = 2, maxit = 50, trace = TRUE,
tol = 1e-3, p = 2)Shepard(d, x, p = 2)
distance structure of the form returned by dist
, or a full,
symmetric matrix. Data are assumed to be dissimilarities or relative
distances, but must be positive except for self-distance. Both
missing and infinite values are allowed.
An initial configuration. If none is supplied, cmdscale
is used
to provide the classical solution, unless there are missing or
infinite dissimilarities.
The desired dimension for the solution, passed to cmdscale
.
The maximum number of iterations.
Logical for tracing optimization. Default TRUE
.
convergence tolerance.
Power for Minkowski distance in the configuration space.
A final configuration.
Two components:
A k-column vector of the fitted configuration.
The final stress achieved (in percent).
If trace
is true, the initial stress and the current stress
are printed out every 5 iterations.
This chooses a k-dimensional (default k = 2) configuration to minimize the stress, the square root of the ratio of the sum of squared differences between the input distances and those of the configuration to the sum of configuration distances squared. However, the input distances are allowed a monotonic transformation.
An iterative algorithm is used, which will usually converge in around
10 iterations. As this is necessarily an
T. F. Cox and M. A. A. Cox (1994, 2001) Multidimensional Scaling. Chapman & Hall.
Ripley, B. D. (1996) Pattern Recognition and Neural Networks. Cambridge University Press.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
# NOT RUN {
swiss.x <- as.matrix(swiss[, -1])
swiss.dist <- dist(swiss.x)
swiss.mds <- isoMDS(swiss.dist)
plot(swiss.mds$points, type = "n")
text(swiss.mds$points, labels = as.character(1:nrow(swiss.x)))
swiss.sh <- Shepard(swiss.dist, swiss.mds$points)
plot(swiss.sh, pch = ".")
lines(swiss.sh$x, swiss.sh$yf, type = "S")
# }
Run the code above in your browser using DataLab