strange f_cdf results

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

strange f_cdf results

Dr. G. Buerger-2
Hi,

I have trouble with Fisher's cdf, f_cdf. For example, it gives the following
incorrect values (the correct values, according to naglib, is 1):

octave:165> f_cdf(30,4,150)
ans = 6.7157
octave:164> f_cdf(30,4,200)
ans = 20638866

What's wrong?

        Gerd

Reply | Threaded
Open this post in threaded view
|

Re: strange f_cdf results

Kurt Hornik-2
>>>>> G Buerger writes:

> Hi,
> I have trouble with Fisher's cdf, f_cdf. For example, it gives the following
> incorrect values (the correct values, according to naglib, is 1):

> octave:165> f_cdf(30,4,150)
> ans = 6.7157
> octave:164> f_cdf(30,4,200)
> ans = 20638866

My code :-)

But seriously, the problem is that the m-file code for the incomplete
beta function, betai, simply does not work for large values.

The problem has been around for some time now.  JWE and I both think
that for reasons of efficiency etc the current code for both betai and
gammai should be replaced by a numerically stable etc version coded in
Fortran or C, such as those from the APSTAT archive.  But it simply has
not been done.

There is also an Octave interface of CDFLIB, but I am not sure whether
this will be merged into the distribution proper.

-k