2.1.24.5.1.8 gamcdf


Description

computes the lower or upper tail probability for the gamma distribution

Syntax

double gamcdf( const double dG, double a, double b, int iTail = TAILED_TEST_LOWER, int * nFail = NULL )

Parameters

dG
[input] value of the gamma variate.
a
[input] shape parameter of the gamma distribution, must be positive(a>0).
b
[input] scale parameter of the gamma distribution , must be positive(b>0).
iTail
[input] upper tailed, or lower tailed test.
1 = TAILED_TEST_UPPER,
2 = TAILED_TEST_LOWER.
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 gamma cumulative distribution function

Examples

EX1

void gamcdf_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, gamcdf(x[ii], df1, df2));
}

Remark

See Also

Header to Include

origin.h

Reference