Incomplete Gamma Function
incGamma(a, x, lower = FALSE)
scalar or vector of length = max(length(x), length(a)), with values of the shorter recycled to match the length of the longer a la pnorm etc.
positive numeric vector
non-negative numeric vector
boolean for calculating lower or upper incomplete gamma function
The upper incomplete gamma function, following Wolfram Alpha, namely,
incGamma(a, x) = \(\int_x^\infty e^{-t} * t^{a - 1}dt\),
calculated using pgamma. Within the dwp
package, incGamma
is
used in the calculation of the cumulative distribution function (CDF) of the
xep02 distribution (pxep02
). NOTE: The function pracma::incgam
also
calculates incomplete gamma with pracma::incgam(x, a) = incGamma(a, x)
,
but pracma::incgam
is not vectorized and not used here.