sammon(d, y = cmdscale(d, k), k = 2, niter = 100, trace = TRUE,
magic = 0.2, tol = 1e-4)
dist
, or a full, symmetric
matrix. Data are assumed to be dissimilarities or relative distances,
but must be positive except for self-distance. This can contain missing
values.
cmdscale
is used to provide the classical solution. (If there are missing
values in d
, an initial configuration must be provided.) This
must not have duplicates.
TRUE
.
magic
) to ensure that it always goes downhill.cmdscale
, isoMDS
swiss.x <- as.matrix(swiss[, -1])
swiss.sam <- sammon(dist(swiss.x))
plot(swiss.sam$points, type = "n")
text(swiss.sam$points, labels = as.character(1:nrow(swiss.x)))
Run the code above in your browser using DataLab