Hierarchical Clustering
Hierarchical clustering builds a tree (dendrogram) showing how observations merge into groups at increasing dissimilarity levels. It is used to discover group structure from data without a priori group assignments. The result depends critically on the distance metric and linkage method —and a dendrogram displayed without these parameters is uninterpretable and non-reproducible.
STEP 1 —When to Use
Use hierarchical clustering when: you want to discover natural groupings in your data without assuming a fixed number of groups; you want to show the hierarchical relationship between groups (which groups are most similar); you are combining it with a heatmap to show both the cluster structure and the feature values (clustergram).
Avoid hierarchical clustering when: you have a very large n (>1000) where the dendrogram becomes unreadable; you already know the groups and want to test separation (use PCA or MANOVA instead); the choice of k clusters is being made after seeing the dendrogram (this requires pre-registration or cross-validation).
STEP 2 —Journal Requirement
- Distance metric and linkage method must be stated in the legend or methods.
- The y-axis of the dendrogram must be labeled with the distance or dissimilarity scale.
- If a cut-height is used to define groups, the basis for the cut must be stated (visual inspection, gap statistic, silhouette score, or predetermined k).
- n (observations clustered) must be stated.
- For clustergrams (heatmap + dendrogram): all heatmap parameters also apply.
STEP 3 —Licklider Implementation
Input
- Numeric matrix (observations xvariables)
- Distance metric: Euclidean (default), Manhattan, 1-Pearson correlation, Spearman
- Linkage: Ward.D2 (default, minimizes total within-cluster variance), complete, average, single
- Cluster determination: visual cut (user), gap statistic (auto), silhouette score (auto), or fixed k
Output
- Dendrogram with y-axis height scale (dissimilarity or height units)
- Colored cluster rectangles at the determined cut-height
- Silhouette scores or gap statistic plot (optional inset)
- Cluster membership summary: n per cluster
- All parameters (distance, linkage, cut method) in legend
STEP 4 —Draft Output (Draft / Needs review)
Hierarchical clustering of n = 48 observations across [N variables].
Euclidean distance and Ward.D2 linkage were used. The optimal number
of clusters (k = 3) was determined by the gap statistic (gap statistic
maximum at k = 3; Tibshirani et al., 2001). Clusters contain n = 18, 17,
and 13 observations respectively. Cluster membership is indicated by
colored rectangles in the dendrogram. The y-axis shows height (Ward.D2
dissimilarity scale).