# Dimension Reduction - Multidimensional Scaling (MDS)

Computes multidimensional scaling and displays the output as a two-dimensional scatterplot. Metric MDS minimizes the difference between distances in input and output spaces. Non-metric MDS aims to preserve the ranking of distances between input and output spaces.

Either a list of variables or a distance matrix between points can be given as input. In the former case, a further variable may be specified to classify the output into groups and the probability that each point has the same class as its nearest neighbor is calculated.

Dimension Reduction - Plot - Goodness of Fit can be used to assess the accuracy of the fit.

## Options

Algorithm A choice between metric and non-metric multidimensional scaling. Other dimension reduction techniques of PCA and t-SNE are also available.

The input data can be provided via one of three options:

Variables The variables or a question containing variables that you would like to analyze. Cases with missing data are ignored.
Distance matrix Select an existing distance matrix. This should be a symmetric matrix of distances, such as the output of Correlation - Distances.
Paste or type distance matrix Opens up a blank spreadsheet into which tabular data can be manually entered or pasted.

Group variable A variable to categorize the output. If numeric, the data are shaded from light (lowest values) to dark (highest). If categorical, data points are colored according to their category. This option is only available if Variables are provided.

Create binary variables from unordered categories If selected, unordered categorical Variables with N categories are converted are converted into N-1 binary indicator variables. Otherwise such variables are each converted to a single numeric variable with integers representing categories (as happens for ordered categories). This option is only available if Variables are provided.

Normalize variables For Variables input, whether to normalize the data.

For t-SNE and MDS each variable is standardized to the range [0, 1].
For PCA the correlation matrix is used rather than the covariance matrix.

Perplexity A parameter used by the t-SNE algorithm and related to the number of nearest neighbors considered when placing each data point. The typical useful range is from 5 to 50.

Low values imply that immediately local structure is most important.
High values increase the impact of more distant neighbors and global structure.

## Acknowledgements

Uses the R packages MASS and isoMDS.