SPSS command: SPSS PROXIMITIES
Distance and similarity matrices in your browser
PROXIMITIES turns a set of variables into a matrix that says how alike or different every pair of cases, or every pair of variables, is.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs offers the SPSS interval, count and binary measures, six standardizations applied by variable or by case, and the absolute-value, sign-change and 0–1 rescale transforms.
- How far apart every pair of cases is on the selected variables, for example which products or stores are most alike.
- How strongly every pair of variables is related, as correlations, cosines or distances.
- Whether the matrix is a similarity (larger means more alike) or a dissimilarity (larger means more different).
When to use it
Use it when
- Preparing or inspecting the input to clustering or multidimensional scaling.
- Comparing a handful of items on several attributes, such as competitor products on price and ratings.
- Measuring agreement between binary profiles with Jaccard, Dice, simple matching or Yule's Q.
Use something else when
- You need significance tests for correlations: use bivariate correlations, which report p values and N.
- You want the groups themselves: run hierarchical clustering, which computes the same measures internally.
- More than 2,500 cases in a between-cases matrix: the panel stops; compute between variables or use a sample.
How to run it in Crosstabs
- 01
Open Distances
In Statistics mode, choose Distances (PROXIMITIES) in the Classify group.
- 02
Select variables and direction
Tick numeric Variables, then set Compute distances to Between variables (the default) or Between cases; for cases you can pick a Label cases by variable.
- 03
Choose the data type and measure
Set Data type to Interval, Counts or Binary and pick the Measure. Minkowski asks for a Power and Customized for a Power and Root; binary measures ask which values are Present and Absent.
- 04
Standardize if units differ
For interval or count data choose a Standardize method (Z scores, Range −1 to 1, Range 0 to 1, Maximum magnitude of 1, Mean of 1 or Standard deviation of 1) and apply it By variable or By case.
- 05
Transform and run
Optionally tick Absolute values, Change sign or Rescale to 0–1 range (applied in that order), then run. Export the full matrix as CSV.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
Six phone models (P1–P6) with a battery score, a camera score (both 0–10) and a price in dollars, typed as raw input. Price is on a far larger scale, so the case distances use Z scores by variable; the variable matrix uses the raw values.
Input preview
| model | battery | camera | price |
|---|---|---|---|
| P1 | 8.1 | 6.5 | 399 |
| P2 | 7.9 | 6.8 | 429 |
| P3 | 6.2 | 8.9 | 899 |
| P4 | 6.0 | 9.1 | 949 |
| P5 | 9.0 | 5.9 | 349 |
| P6 | 5.1 | 7.0 | 599 |
| Item | P1 | P2 | P3 | P4 | P5 | P6 |
|---|---|---|---|---|---|---|
| P1 | 0.000 | 0.287 | 2.923 | 3.200 | 0.776 | 2.173 |
| P2 | 0.287 | 0.000 | 2.651 | 2.928 | 1.047 | 1.981 |
| P3 | 2.923 | 2.651 | 0.000 | 0.278 | 3.612 | 1.979 |
| P4 | 3.200 | 2.928 | 0.278 | 0.000 | 3.887 | 2.162 |
| P5 | 0.776 | 1.047 | 3.612 | 3.887 | 0.000 | 2.891 |
| P6 | 2.173 | 1.981 | 1.979 | 2.162 | 2.891 | 0.000 |
This is a dissimilarity matrix (Euclidean distance).
| Item | battery | camera | price |
|---|---|---|---|
| battery | 1.000 | −0.673 | −0.745 |
| camera | −0.673 | 1.000 | 0.984 |
| price | −0.745 | 0.984 | 1.000 |
This is a similarity matrix (Pearson correlation).
How to read it
On standardized scores the most alike pair is P3 and P4 (distance 0.278), and the most different is P4 versus P5 (3.887). In the second run (Between variables, Pearson correlation; the worked example offers it after the first), price correlates 0.984 with the camera score across the 6 models: the expensive phones are the camera phones. Without Z scores, price differences in dollars would swamp both 0–10 scores in the case distances.
Output tables explained
- Proximity Matrix (between cases)
- One row and column per case, labelled by your Label cases by variable or the case number. Footnotes say whether it is a similarity or a dissimilarity matrix and how many cases were excluded listwise; the first 40 cases are shown on screen and the CSV export holds them all.
- Proximity Matrix (between variables)
- One row and column per variable, computed over all complete cases. A sentence above the matrix names the measure, whether larger values mean more similar or more different, and the number of cases used.
Assumptions and notes
- Interval measures need numeric variables; with differing units, standardize first or the largest-scale variable dominates distances between cases.
- Count measures (chi-square, phi-square) expect non-negative frequencies.
- Binary measures read only the Present and Absent values you set; other values are ignored for that pair.
- Cases with any missing value are excluded listwise, and a workspace weight is not applied.
How the results are validated
On reference data, the eight interval measures between cases (Euclidean, squared Euclidean, block, Chebychev, Minkowski, customized power, cosine and Pearson correlation), correlation between variables, six standardizations by variable and two by case, the chi-square and phi-square count measures and all 27 binary measures agree within 1e-9 with values computed by SciPy 1.18.1 or independent NumPy implementations of the IBM SPSS PROXIMITIES formulas. A test confirms the absolute-value, sign-change and rescale transforms are applied in SPSS's order. Validation evidence
Questions
Euclidean or squared Euclidean distance?
They rank pairs identically. Squared Euclidean is the standard input for Ward's, centroid and median clustering; plain Euclidean is easier to read as a distance in the variables' units.
When should I standardize by case instead of by variable?
By variable puts every variable on the same footing, which is the usual choice. By case removes each case's overall level, for example a respondent who rates everything high, so profiles are compared on shape.
Which binary measure should I use?
Jaccard and Dice ignore joint absences, which suits rare features such as product ownership. Simple matching counts joint absences as agreement. Yule's Q and the phi 4-point correlation behave like association coefficients.
How do I turn a correlation into a distance?
Tick Change sign so larger values mean more different, and Absolute values first if a strong negative correlation should count as similar. Add Rescale to 0–1 range for a bounded scale.
Is my data uploaded to compute the matrix?
No. The matrix is computed by a background worker in your browser, and the file never leaves your device.
Related procedures
- Hierarchical ClusterCLUSTER
- Multidimensional Scaling (PROXSCAL)PROXSCAL
- Bivariate CorrelationsCORRELATIONS
- K-Means ClusterQUICK CLUSTER
- Correspondence AnalysisCORRESPONDENCE
- Free SPSS alternative: full coverage list
Run Distances (Proximities) on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.