[R] R and excell differences in calculation F distributionfu

(Ted Harding) ted.harding at nessie.mcc.ac.uk
Tue Aug 7 12:47:54 CEST 2007


On 07-Aug-07 10:27:06, Luis Ridao Cruz wrote:
> R-help,
> 
> I'm trying to work out the density function by doing:
> 
>> df(5.22245, 3, 22)
> [1] 0.005896862
> 
>> df(15.20675, 6, 4)
> [1] 0.001223825
> 
> 
> In excell the result is :
> 
> 0.0071060464 <*>   FDIST(5.22245,3,22) 
> 
> 0.0100001406 <-->   FDIST(15.20675,6,4)
> 
> 
>>From my point of view the differences in the second case
> are substantial.
> 
> Can anyone give me a hint on this?
> 
> Thanks in advance

It would seem that Excel is giving you the upper tail  of the
F-distribution (cumulative distribution, not density), i.e.
what R would calculate as

pf(5.22245,3,22,lower.tail=FALSE)
[1] 0.007106046

pf(15.20675,6,4,lower.tail=FALSE)
[1] 0.01000014

so in effect using "pf" rather than "df". If you want the
density function (corresponding to "df") from Excel, then
that's not something I know how to do (nor want to know ... ).

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 07-Aug-07                                       Time: 11:47:52
------------------------------ XFMail ------------------------------



More information about the R-help mailing list