rStats.js v1.3.0
    Preparing search index...

    Function dunnTest

    • Dunn's test of all pairs of mean ranks. Equivalent to dunn.test::dunn.test(x, g, method, altp) in R. The step-wise adjustments multiply (or transform) each p-value by the factor of its rank and cap it at 1, without enforcing monotonicity, as dunn.test does (unlike pAdjust). Equal p-values share the rank of the first of them in the ordering, so they get the same adjusted value (dunn.test ranks ties in the order of the comparisons).

      Parameters

      Returns DunnTestResult

      const 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 = dunnTest(x, g, { method: "bonferroni" });
      r.comparisons; // ["a - b", "a - c", "b - c"]
      r.PAdjusted; // [0.26956874231849964, 0.01093553713730346, 0.26956874231849964]