[Gretl-users] Factorial

Ignacio Díaz-Emparanza ignacio.diaz-emparanza at ehu.es
Tue Oct 10 11:23:35 EDT 2006


El Martes, 10 de Octubre de 2006 17:03, Riccardo (Jack) Lucchetti escribió:
> On Tue, October 10, 2006 16:43, Ignacio Díaz-Emparanza wrote:
> > Is there a way to use a factorial of a number in a "genr" formula?
> > I do not find it in the manual.
> >
> > I mean for example
> > genr F = 4! 			(=4x3x2x1)
>
> you can use the gamma() function, as in
>
> genr a = 4
> genr F = gamma(a+1)

Thank you for all the responses. This is valid for for me today.

(( May be we need an alias "factorial(x)" for that function? ))

>
> If you need it for things like hypergeometric functions, which involve
> ratios, we also have the lngamma() function, which gives numerically better
> results.

(The problem was the multinomial function and it is solved with your 
suggestion.)


-- 
Ignacio Díaz-Emparanza
Dpto. de Economía Aplicada III (Econometría y Estadística)
UPV-EHU




More information about the Gretl-users mailing list