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

    Function brunnerMunzelTest

    • Brunner-Munzel test that two samples have the relative effect P(X < Y) + P(X = Y)/2 = 1/2, without assuming equal variances or shapes. Equivalent to lawstat::brunner.munzel.test() in R. NaN values are dropped.

      estimate is the estimated relative effect and confInt its two-sided interval (not clipped to [0, 1]). Each sample needs at least 2 values (lawstat returns NaN for a sample of one). When the variance estimates are 0 (for example completely separated samples), the statistic, degrees of freedom and p-value are NaN or ±Infinity, as in lawstat.

      Parameters

      Returns HTest

      const r = brunnerMunzelTest([1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1], [3, 3, 4, 3, 1, 2, 3, 1, 1, 5, 4]);
      r.statistic; // 3.1374674823029509
      r.pValue; // 0.0057862086661514605
      r.estimate; // 0.78896103896103909