A multiple-comparisons analysis is performed using data discussed by Kirk (1982, pp. 123-125). The results show that there are three groups of means with three separate sets of values: (36.7, 40.3, 43.4), (40.3, 43.4, 47.2), and (43.4, 47.2, 48.7).
using System; using Imsl.Stat; using PrintMatrix = Imsl.Math.PrintMatrix; public class MultipleComparisonsEx1 { public static void Main(String[] args) { double[] means = new double[]{36.7, 48.7, 43.4, 47.2, 40.3}; /* Perform multiple comparisons tests */ MultipleComparisons mc = new MultipleComparisons(means, 45, 1.6970563); new PrintMatrix("Size of Groups of Means").Print(mc.Compute()); } }
Size of Groups of Means 0 0 3 1 3 2 3 3 0Link to C# source.