Some weeks ago I commited to the repository the last version of the
'distrib' package.
http://cvs.sourceforge.net/viewcvs.py/maxima/maxima/share/contrib/distrib/
In this new version I wrote the numerical algorithms in lisp, which are
now in 'numdistrib.lisp'. Among others, you can find here 'igamma', and
'ibeta', the incomplete gamma and beta functions, since they are
necessary to compute some distribution functions and random variates.
The algorithm for the 'igamma' is number 239 of Applied Statistics, the
same used by the statistical R program (but now they are using another
one).
Here are some comparisons Maxima vs. R (Version 2.1.1 - 2005-06-20, with
their new version of the incomplete gamma) calculating values of the
gamma distribution function :
(%i1) load(distrib)$
(%i2) disgamma(2.3,2,5); /* R gives => 0.07832588 */
(%o2) .07832587755988804
(%i3) disgamma(0.2,32,0.01); /* R gives => 0.008091755 */
(%o3) .008091754669835248
(%i4) disgamma(568,3.2,425); /* R gives => 0.1218213 */
(%o4) .1218213135071108
For more info about this function, do 'describe(disgamma);'
>
> gammainc_approx (3/4, 1/2); => (some stuff)
>
> '' %, numer; => 0.5753834162127
>
(%i5) ?igamma(0.5,0.75); /* yes, reversed order ! */
(%o5) 0.527937109834672
'igamma' is written at lisp level and it is not intended to be called
directly from Maxima (it was conceived as an auxiliary function for the
distributions package); it only works with floating point numbers and
does not accept symbolic expressions.
Best wishes.
--
Mario Rodriguez Riotorto
www.biomates.net