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

    Function tsumTOST

    • tTOST from summary statistics: means, standard deviations, sample sizes and, for paired samples, the correlation of the pairs. Equivalent to TOSTER::tsum_TOST() in R.

      The tests and effect sizes are those of tTOST for data with these summaries (Welch's or pooled for two samples; paired from the SD of the differences sqrt(sd1² + sd2² - 2 r12 sd1 sd2)). The one-sided p-values are upper tails where TOSTER takes 1 - pt(t, df), so small ones keep their digits. For paired samples with n1 != n2 the smaller is used, with TOSTER's warning Unequal number of pairs; using smallest n.

      Parameters

      Returns TTOSTResult

      See TTOSTResult.

      RangeError for sizes below 2 (or not integers), standard deviations that are not positive, a correlation outside (-1, 1), missing statistics of the second sample, or the errors of tTOST's options.

      const r = tsumTOST({ m1: 5.5125, sd1: 0.4357, n1: 8, m2: 5.3333, sd2: 0.3536, n2: 9 }, { eqb: 0.5 });
      r.pValue; // 0.060568376615229305
      r.smd.confInt; // [-0.35185844793775967, 1.1906849789772087]