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

    Function glhtDunnett

    • Dunnett's many-to-one comparisons of a one-way ANOVA with simultaneous p-values. Equivalent to multcomp::glht() in R. It gives summary(glht(aov(y ~ g), linfct = mcp(g = "Dunnett"), alternative)), with the exact multivariate t probabilities (R approximates them by randomised integration): two-sided P(max |T_i| >= |t|), greater P(max T_i >= t), less P(min T_i <= t).

      Parameters

      Returns GlhtDunnettResult

      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 = glhtDunnett(x, g);
      r.names; // ["b - a", "c - a"]
      r.p; // [0.02601829573165104, 0.0011091043143827048]