Multidimensional Scaling
Multidimensional Scaling (MDS) is a multivariate technique that was first used in geography. The main goal of MDS is to plot multivariate data points in two dimensions, thus revealing the structure of the dataset by visualizing the relative distance of the observations. MDA is used in diverse fields such as attitude study in psychology, sociology, and market research.
While the MASS
package provides non-metric MDS via the isoMDS
function, we will concentrate on the classical metric MDS, which is available in the cmdscale
function offered by the stats
package. Both types of MDS take a distance matrix as the main argument and can be created from any numeric tabular data by the dist
function.
But before we explore more complex examples, let's see what MDS can offer us while working with an already existing distance matrix, such as the built-in eurodist
dataset:
> as.matrix(eurodist)[1:5, 1:5] Athens Barcelona Brussels Calais Cherbourg Athens 0 ...