spssmdsmulti-dimensional-scaling

Add categories in MDS plot


I) PROBLEM

Let’s say I have a matrix like this with distances (in kilometers) between the homes of different people.

|          | Person 1 | Person 2 | Person 3 |
|----------|----------|----------|----------|
| Person 1 |          |          |          |
| Person 2 | 24       |          |          |
| Person 3 | 17       | 153      |          |

And I have a data table like this:

| Person   | Party    |
|----------|----------|
| Person 1 | Party A  |
| Person 2 | Party B  |
| Person 3 | Party C  |

I want to do multidimensional scaling (dissimilarity by distance) to visualize i) how close each person lives to another; ii) which party each person votes for (different colors for each party)

II) CURRENT RESULT

My current plot of MDS (made with SPSS) is like this (I don’t use a code line, but a menu commands in SPSS). :

MDS plot without colors

III) EXPECTED RESULT

I want to add a different color for each person depending on which party this person votes for:

MDS plot with colors

IV) QUESTION(S)

Can I do it in SPSS? How to add the data about votes in the matrix and how to show it in MDS plot?

EDIT There is quite the same problem and solution for R. R) Create double-labeled MDS plot But I want to do it in SPSS.


Solution

  • I don't believe it's possible to create a plot like the one you show directly from either of the MDS procedures currently available in SPSS Statistics, PROXSCAL or ALSCAL. I think what you'd need to do would be to save the common space coordinates to a new dataset or file, then add the Party variable to that new dataset or file, define it as Nominal in the measurement level designation in the Data Editor, and then use the Grouped Scatter option under Scatter/Dot in the chart Gallery in the Chart Builder, defining groups by the Party variable.

    The PROXSCAL procedure lets you save things from the dialogs in the Output sub-dialog. The ALSCAL procedure only supports saving out of common space coordinates and other things using command syntax, specifically using the OUTFILE subcommand (you can paste the command from the dialogs, then add this subcommand).