An array of samples (groups), or one sample with group labels g (then options comes third).
Optionalg: readonly GroupLabel[] | TukeyHSDOptionsconst x = [1.2, 2.3, 1.8, 2.9, 3.1, 3.6, 4.0, 4.4, 5.2];
const g = ["a", "a", "a", "b", "b", "b", "c", "c", "c"];
const r = TukeyHSD(x, g);
r.names; // ["b-a", "c-a", "c-b"]
r.diff; // [1.4333333333333336, 2.7666666666666666, 1.333333333333333]
r.pAdj; // [0.03403130149294014, 0.001492661804896774, 0.04527523376597547]
Tukey's honest significant differences between the group means of a one-way ANOVA (Tukey-Kramer for unequal sizes). Equivalent to R's
TukeyHSD(aov(y ~ g)).