Skip to content

[Bug]: Hierarchical Cluster Analysis: Ward and Ward2 methods produce identical results; discrepancies with R/SPSS #3837

@martinamingardi

Description

@martinamingardi

JASP Version

0.95.4

JASP Module

Machine Learning

What analysis are you seeing the problem on?

Hierarchical Clustering

What OS are you seeing the problem on?

Windows 11

Bug Description

The Hierarchical Cluster Analysis in JASP produces identical dendrograms and cluster solutions when using both "Ward" and "Ward2" linkage methods. This appears to be incorrect, as these are distinct algorithms that should yield different results. Additionally, JASP's results differ from those obtained using R and SPSS, suggesting a potential implementation issue (R and SPSS produce identical results).

These methods should produce:

  • Different agglomeration coefficients/heights in the dendrogram
  • Potentially different cluster solutions
  • Different interpretations of cluster distances
  • Results should match results obtained in R and SPSS using the same methods

Actual Behaviour

In JASP:
Ward and Ward2 produce identical results:

  • Same dendrogram structure
  • Same agglomeration coefficients/heights
  • Identical cluster assignments
  • No observable differences
    Cross-software comparison:
  • JASP results differ from both R implementations (ward.D and ward.D2)
  • JASP results differ from SPSS Ward's method

Expected Behaviour

In JASP:

  • Ward and Ward2 should produce different dendrograms with different agglomeration heights
  • The cluster topology might differ slightly
  • Ward2 heights should be interpretable on the scale of the original distances
  • Ward heights should be on a squared distance scale
    Cross-software consistency:
  • JASP's Ward2 should match R's ward.D2 and SPSS's "Ward's method"
  • JASP's Ward should match R's ward.D

Steps to Reproduce

  1. Navigate to Machine Learning → Hierarchical Clustering
  2. Select all clustering variables
  3. Under "Linkage," first select "Ward"
  4. Note the dendrogram and agglomeration schedule
  5. Change linkage to "Ward2"
  6. Compare results

Additional comparison:
7. Perform the same analysis in R
8. Compare dendrograms and cluster assignments

Metadata

Metadata

Assignees

Labels

Bug: HighBugs that are negatively affecting the area of the program, but don't need immediate fix.Module: jaspMachineLearning

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions