pgamma.deriv: Derivatives of the regularized incomplete gamma function

Description Usage Arguments Details Value References See Also Examples

View source: R/specfun.R

Description

Computes the incomplete gamma function and its first and second derivatives with respect to 'shape' parameter.

Usage

1
  pgamma.deriv(x, shape, scale, deriv = 0:2)

Arguments

x

a numeric argument, x > 0.

shape, scale

shape and scale parameters, must be positive.

deriv

integer vector, order of the required derivatives.

Details

The regularized (standard) incomplete gamma function is given by

P(a, x) = \frac{1}{Γ(a)} \int_0^x t^{a - 1}\,e^{-t}\,dt,

which is related with the CDF of Gamma distribution (see pgamma).

pgamma.deriv is a C translation of the original Fortran AS 187 subroutine by R.J. Moore.

Value

Function pgamma.deriv returns the value, first and second derivatives of the regularized incomplete gamma gamma function with respect to 'shape' parameter.

References

Abramowitz, M., and Stegun, I.A. (1970). Handbook of Mathematical Functions. Dover, New York.

Moore, R.J. (1982). Algorithm AS 187: Derivatives of the incomplete gamma integral. Applied Statistics 31, 330-335.

See Also

pgamma, psigamma

Examples

1
2
3
4
5
  x <- 3
  pgamma.deriv(x, 1, 1, deriv = 0:2)

  # only to check 1st element
  pgamma(x, 1, 1)

heavy documentation built on Oct. 30, 2019, 9:48 a.m.

Related to pgamma.deriv in heavy...