Distances (proximities)
Distances computes how far apart cases (or variables) are: Euclidean, squared Euclidean, block (Manhattan) or Chebychev distances, or Pearson and cosine similarities. It is a first step before clustering or scaling.
Menu: Analyze → Correlate → Distances…
When should I use Distances?
- You want to see which cases are alike across several scale variables, or check inputs for cluster analysis.
What are the assumptions?
- Variables on different scales should be standardized (z-scores), or the variable with the largest spread dominates.
How do I run it in StatLab?
- Choose two or more variables.
- Choose between cases or between variables, a measure, and whether to standardize.
How do I read the output?
| Output | Meaning |
|---|---|
| Proximity Matrix | Distance (dissimilarity) or similarity for every pair. The first 40 complete cases are shown. |
Worked example
Euclidean distances between the first three cases of the bundled sample dataset (File → Sample dataset: 150 survey respondents with gender, programme group, age, pre/post test scores, five satisfaction items, income, smoking and education) on age, pre and post: 35.41, 36.03 and 14.82.
How would I report it in APA style?
Distances between cases were computed as Euclidean distances on z-standardized variables.
Numbers above were computed by StatLab’s validated engine from the sample dataset when this page was built.
What are common mistakes?
- Mixing units (years and ringgit) without standardizing.