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

    Function dunnettTest

    • Dunnett's many-to-one test of means against the control (the first group), with the pooled variance. Equivalent to PMCMRplus::dunnettTest() in R. The p-values are the exact multivariate t probabilities (R approximates them by randomised integration); two-sided, as in PMCMRplus, min(1, 2 P(max T_i >= |t|)).

      Parameters

      Returns PMCMRResult

      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"];
      dunnettTest(x, g).pValue; // [[0.026103399464872296], [0.0011111316275120736]]