Density of the gamma distribution. Equivalent to R's dgamma(x, shape, rate = 1, scale = 1/rate, log = FALSE).
dgamma(x, shape, rate = 1, scale = 1/rate, log = FALSE)
Value(s) at which to evaluate: a number, number[] or Float64Array. The result has the same shape.
number[]
Float64Array
Shape parameter.
rate or scale (see GammaParams) and log (see DensityOptions).
rate
scale
log
The density (or log density).
RangeError if both rate and scale are given and scale is not 1 / rate.
1 / rate
dgamma(1, 2); // 0.36787944117144233dgamma(1, 2, { rate: 3 }); // 0.44808361531077556 Copy
dgamma(1, 2); // 0.36787944117144233dgamma(1, 2, { rate: 3 }); // 0.44808361531077556
Density of the gamma distribution. Equivalent to R's
dgamma(x, shape, rate = 1, scale = 1/rate, log = FALSE).