Calculates the (upper) incomplete gamma function, based on the Gamma cdf pgamma.

igamma(s, x)

Arguments

s

Scale parameter of the incomplete gamma function. Vectorized, > 0.

x

Lower bound of the incomplete gamma function. Vectorized, > 0.

Details

The (Upper) Incomplete Gamma Function is defined as $$\Gamma(s, x) = \int_x^{\infty} t^{s - 1} e^{-t} dt$$.

Examples

igamma(1:5, 1:5)
#> Error in igamma(1:5, 1:5): could not find function "igamma"
igamma(0.4, 1:5)
#> Error in igamma(0.4, 1:5): could not find function "igamma"
igamma(1:5, 0.4)
#> Error in igamma(1:5, 0.4): could not find function "igamma"
# Should be identical: igamma(1:5, 0)
#> Error in igamma(1:5, 0): could not find function "igamma"
gamma(1:5)
#> [1] 1 1 2 6 24