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

    Function ptukey

    • Distribution function of the studentized range distribution (used by Tukey's HSD). Equivalent to R's ptukey(q, nmeans, df, nranges = 1, lower.tail = TRUE, log.p = FALSE).

      Results aim at a relative accuracy of about 1e-15. R's ptukey is accurate to only about 8 digits, so values can differ from R's beyond that.

      Type Parameters

      Parameters

      • q: T

        Quantile(s): a number, number[] or Float64Array. The result has the same shape.

      • nmeans: number

        Number of means (sample size of each range).

      • df: number

        Degrees of freedom of the standard deviation estimate.

      • options: TukeyOptions = {}

        nranges, lowerTail and logP (see TukeyOptions).

      Returns VectorResult<T>

      The probability (or log probability).

      ptukey(3.5, 3, 12);                       // 0.9300045147248135
      ptukey(3.5, 3, 12, { lowerTail: false }); // 0.06999548527518648