Luis Ridao Cruz
2007-Aug-07 10:27 UTC
[R] R and excell differences in calculation F distributionfunction
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 caseare substantial. Can anyone give me a hint on this? Thanks in advance ---------------------------------------------------------------- Luis Ridao Cruz Faroese Fisheries Laboratory N?at?n 1, P.O. Box 3051 FR-110 T?rshavn Faroe Islands Tel : (+298) 353900, Tel (direct) : (+298) 353912 Mob.:(+298) 580800, Fax: : (+298) 353901 E-mail: luisr at frs.fo
Frede Aakmann Tøgersen
2007-Aug-07 10:40 UTC
[R] R and excell differences in calculation F distributionfunction
I think you'll have to compare FDIST to pf() and not df() Best regards Frede Aakmann T?gersen Scientist UNIVERSITY OF AARHUS Faculty of Agricultural Sciences Dept. of Genetics and Biotechnology Blichers All? 20, P.O. BOX 50 DK-8830 Tjele Phone: +45 8999 1900 Direct: +45 8999 1878 E-mail: FredeA.Togersen at agrsci.dk Web: http://www.agrsci.org This email may contain information that is confidential. Any use or publication of this email without written permission from Faculty of Agricultural Sciences is not allowed. If you are not the intended recipient, please notify Faculty of Agricultural Sciences immediately and delete this email.> -----Oprindelig meddelelse----- > Fra: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] P? vegne af Luis Ridao Cruz > Sendt: 7. august 2007 12:27 > Til: r-help at stat.math.ethz.ch > Emne: [R] R and excell differences in calculation F > distributionfunction > > 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 > > > > > > > > ---------------------------------------------------------------- > Luis Ridao Cruz > Faroese Fisheries Laboratory > N?at?n 1, P.O. Box 3051 > FR-110 T?rshavn > Faroe Islands > Tel : (+298) 353900, Tel (direct) : (+298) 353912 > Mob.:(+298) 580800, Fax: : (+298) 353901 > E-mail: luisr at frs.fo > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
(Ted Harding)
2007-Aug-07 10:47 UTC
[R] R and excell differences in calculation F distributionfu
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 advanceIt 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 ------------------------------