Hierarchical cluster analysis
Builds clusters step by step by merging the two most similar cases or clusters, showing the whole sequence in an agglomeration schedule and a dendrogram.
Menu: Analyze → Classify → Hierarchical Cluster…
When should I use it?
- Explore how many natural groups exist before running k-means.
- Group a modest number of cases (up to a few hundred) by similarity.
What are the assumptions?
- Sensible distance measure and linkage (Ward's method with squared Euclidean distance is a common default).
- Variables on comparable scales (use Z-score standardization if not).
- Feasible for small to medium N only.
How do I run it in StatLab?
- Move the variables in; choose the cluster method and distance measure.
- Tick standardize if the variables use different units.
- Request membership for a range of solutions and the dendrogram.
- Look for a large jump in the coefficients near the end of the schedule to choose the number of clusters.
How do I read the output?
| Output | Meaning |
|---|---|
| Agglomeration Schedule | Which clusters merge at each stage, the merge coefficient, and where each cluster first appeared. |
| Cluster Membership | Cluster number of each case for the requested solutions. |
| Dendrogram | Tree of merges on a 0–25 rescaled distance. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC glmHCluster /vars=(score age) /method=average /measure=sqeuclidean /z=NO /from=2 /to=4 /dendro=YES /save=NO.
Output tables: Case Processing Summary · Agglomeration Schedule · Cluster Membership.
How would I report it in APA style?
A hierarchical cluster analysis (between-groups linkage, squared Euclidean distance) was run on 150 cases. The last 4 fusion coefficients were 433.528, 482.907, 494.203, 977.034.
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Mixing squared Euclidean coefficients with Euclidean intuition.
- Using centroid, median or Ward linkage with a distance other than squared Euclidean.