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

    Function jonckheereTest

    • Jonckheere-Terpstra test of equal distributions against ordered alternatives. Equivalent to DescTools::JonckheereTerpstraTest() in R. Computes JonckheereTerpstraTest(x, g, alternative, exact) (with g an ordered factor) or, with variant: "clinfun", clinfun's jonckheere.test(x, g, alternative) (whose two-sided p-value is 2 min(p_increasing, p_decreasing, 0.5); DescTools caps it at 1 instead of 0.5). Pairs with a missing value are dropped (with variant: "clinfun", also those with an infinite value, as clinfun does).

      Parameters

      Returns JonckheereTestResult

      jonckheereTest([1.1, 2.0, 2.4, 3.5, 3.1, 4.6], [1, 1, 2, 2, 3, 3], { alternative: "increasing" }).statistic; // 11