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

    Function pairwiseTTest

    • Pairwise t tests between groups, with adjusted p-values. Equivalent to R's pairwise.t.test().

      Parameters

      Returns PairwiseResult

      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"];
      pairwiseTTest(x, g).pValue; // [[0.029519264601117815, NaN], [0.0018407330776394456, 0.029519264601117815]]