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

    Function pgamma

    • Distribution function of the gamma distribution. Equivalent to R's pgamma(q, shape, rate = 1, scale = 1/rate, lower.tail = TRUE, log.p = FALSE).

      Type Parameters

      Parameters

      • q: T

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

      • shape: number

        Shape parameter.

      • options: GammaParams & TailOptions = {}

        rate or scale (see GammaParams), lowerTail and logP (see TailOptions).

      Returns VectorResult<T>

      The probability (or log probability).

      RangeError if both rate and scale are given and scale is not 1 / rate.

      pgamma(2, 2);              // 0.5939941502901619
      pgamma(2, 2, { rate: 3 }); // 0.9826487347633355
      pgamma(2, 2, { scale: 3 }); // 0.14430480161234657