GAMIN
This function evaluates the inverse of the gamma cumulative distribution function.
Function Return Value
GAMIN — Function value. (Output)
The probability that a gamma random variable takes a value less than or equal to GAMIN is P.
Required Arguments
P — Probability for which the inverse of the gamma cumulative distribution function is to be evaluated. (Input)
P must be in the open interval (0.0, 1.0).
A — The shape parameter of the gamma distribution. (Input)
This parameter must be positive.
FORTRAN 90 Interface
Generic: GAMIN (P, A)
Specific: The specific interface names are S_GAMIN and D_GAMIN.
FORTRAN 77 Interface
Single: GAMIN (P, A)
Double: The double precision name is DGAMIN.
Description
Function GAMIN evaluates the inverse distribution function of a gamma random variable with shape parameter a, that is, it determines x (= GAMIN(PA)), such that
where Γ() is the gamma function. The probability that the random variable takes a value less than or equal to x is P. See the documentation for routine GAMDF for further discussion of the gamma distribution.
Function GAMIN uses bisection and modified regula falsi to invert the distribution function, which is evaluated using routine GAMDF.
Comments
Informational Error
Type
Code
Description
4
1
Over 100 iterations have occurred without convergence. Convergence is assumed.
Example
In this example, we find the 95‑th percentage point for a gamma random variable with shape parameter of 4.
 
USE UMACH_INT
USE GAMIN_INT
IMPLICIT NONE
INTEGER NOUT
REAL A, P, X
!
CALL UMACH (2, NOUT)
A = 4.0
P = 0.95
X = GAMIN(P,A)
WRITE (NOUT,99999) X
!
99999 FORMAT (' The 0.05 gamma(4) critical value is ', F6.3, &
'.')
!
END
Output
 
The 0.05 gamma(4) critical value is 7.754.
Published date: 03/19/2020
Last modified date: 03/19/2020