Overview

Use hierarchical clustering to sort cases into groups of similar cases when no grouping is known in advance: for example, grouping survey sites by the plant species found at each. The result is a dendrogram, a tree that shows which cases join and how alike they are when they do.

statistiXL uses agglomerative clustering: it starts with each case on its own and repeatedly joins the two most similar groups until all cases form one group. Choose a similarity or distance measure to suit the data, and a cluster method to set how the distance between two groups is measured.

Unlike discriminant analysis, which separates groups that are already known, clustering finds groups in the data.

On the left, a scatter plot of eight cases labelled A to H, with A, B, C and D close together at the lower left in blue, and E, F, G and H close together at the upper right in orange. On the right, the dendrogram of the same cases. Each set of four joins at a short distance, and the two sets join only at a much greater distance.
Eight cases and their dendrogram. Cases join early when they are close together; the two clusters join last, at a much greater distance.

Methods and options

  • Nearest neighbour (single linkage)
  • Furthest neighbour (complete linkage)
  • Group average
  • Centroid
  • Ward's method
  • Lance and Williams' method
  • Binary, quantitative or mixed (binary, qualitative and quantitative) data, or a distance or similarity matrix
  • Similarity and distance measures for binary data (e.g. Jaccard, Sorensen (Dice), Rogers & Tanimoto) and quantitative data (e.g. Euclidean Distance, City Block, Minkowski, Bray & Curtis, Canberra)
  • Dendrograms as text or as editable Excel charts

Running the analysis

For mixed data, the first row of each column states its type: BIN (binary), QUAL (qualitative) or QUANT (quantitative). Click Hierarchical Clustering on the statistiXL ribbon. In the dialog, select the data set and its type, the similarity or distance measure, the cluster method and the output location, and choose a text or graph dendrogram.

The Hierarchical Clustering button on the statistiXL ribbon.
The Hierarchical Clustering button on the statistiXL ribbon.
The General page of the Hierarchical Clustering dialog, with a data set range, a Data Type list set to Binomial Dataset, a Similarity/Distance list set to Euclidean Distance, a Power list for the Minkowski measure, a Cluster Method list set to Nearest Neighbour, a Labels in First Col option, an output range, Text Dendrogram and Graph Dendrogram options, and the QuickHelp pane on the right.
The Hierarchical Clustering dialog, with QuickHelp on the right.

What the output includes

  • The similarity or distance matrix between every pair of cases
  • The clustering sequence, showing which cases or clusters join at each step and at what distance or similarity
  • The cophenetic correlation, with degrees of freedom and P value, which measures how well the dendrogram represents the original distances
  • A dendrogram, as text or as an editable Excel chart (optional)
Hierarchical clustering output in Excel for five people, using Euclidean distance and the Lance and Williams method. Tables give the distance matrix, the clustering sequence (Person 2 and Person 1 join first, at 0.404, and Person 5 joins last, at 2.169) and the cophenetic correlation (0.988, P of 0.000), above a dendrogram chart.
Output from a hierarchical clustering, with a graph dendrogram.