Multidimensional scaling (MDS)

Install required packages

vegan

Metric MDS

Given a distance matrix

                [,1]       [,2]
Augsburg   399.60802  -70.51443
Berlin    -200.20462 -183.39465
Dresden    -18.47337 -213.01950
Hamburg   -316.39991  130.72245
Hannover  -161.38209  120.21761
Karlsruhe  333.38724  212.12523
Kiel      -409.08703  147.62226
Muenchen   408.55752 -144.46446
Rostock   -401.19605 -126.20651
Stuttgart  365.19030  126.91200

Given object-wise ratings

Plot

plot of chunk rerMultMDS01
plot of chunk rerMultMDS01

Non-metric MDS


Call:
monoMDS(dist = dstMat, k = 2) 

Non-metric Multidimensional Scaling

10 points, dissimilarity 'unknown'

Dimensions: 2 
Stress:     0.06803376 
Stress type 1, weak ties
Scores scaled to unit root mean square, rotated to principal components
Stopped after 55 iterations: Stress nearly unchanged (ratio > sratmax)
                 MDS1        MDS2
Augsburg  -1.20797386 -0.01719197
Berlin     0.59341232 -0.41182940
Dresden    0.09538295 -0.73450992
Hamburg    0.85903495  0.30137581
Hannover   0.49243793  0.26880268
Karlsruhe -1.00749610 -0.18900784
Kiel       1.16050702  0.01464720
Muenchen  -1.17092083  0.34936915
Rostock    1.17197472  0.23940430
Stuttgart -0.98635909  0.17894000
attr(,"pc")
[1] TRUE

Detach (automatically) loaded packages (if possible)

Get the article source from GitHub

R markdown - markdown - R code - all posts