2.1.24.5.3.5 gaminv


Description

Inverse gamma cumulative distribution function

Syntax

double gaminv( const double dP, double a, double b, int * nFail = NULL )

Parameters

dP
[input] double, the probability from the required Gamma distribution.0 \leq p \leq 1.
a
[input] double, the shape parameter a of the gamma distribution, must be positive(a>0).
b
[input] double, the scale parameter b of the gamma distribution , must be positive(b>0).
nFail
[output] on successful exit, it returns the NAG error code NE_NOERROR; if an error or warning has been detected, then it returns the specific error or warning code.

Return

Returns inverse gamma cumulative distribution function for probability, dP

Examples

EX1

void gaminv_ex1()
{
	double x[]= {0.25, 0.5, 0.75};
	double df1 = 3, df2 = 2;
	for(int ii = 0; ii<3; ii++)
		printf("%f	%f	%f:	%f\n", x[ii], df1, df2, gaminv(x[ii], df1, df2));
}

Remark

See Also

Header to Include

origin.h

Reference