[Rd] qf with infinite df

Martin Maechler maechler at stat.math.ethz.ch
Thu Jun 5 17:51:46 CEST 2008


Thank you, Simone,

>>>>> "SG" == Simone Giannerini <sgiannerini at gmail.com>
>>>>>     on Thu, 5 Jun 2008 16:49:25 +0200 writes:

    SG> Dear all, I found the following behaviour

    >> rf(5,Inf,Inf)
    SG> [1] 1 1 1 1 1

    SG> but

    >> qf(0.1,Inf,Inf)
    SG> [1] NaN Warning messages: 1: In qf(0.1, Inf, Inf) :
    SG> value out of range in 'lgamma' 2: In qf(p, df1, df2,
    SG> lower.tail, log.p) : NaNs produced


    SG> incidentally,


    >> pf(1.00000000000001,Inf,Inf)
    SG> [1] 1
    >> pf(1.0000000000000001,Inf,Inf)
    SG> [1] 0.5

    SG> Is this the expected behaviour?
    	   ^^^^
What is   "this"?

rf() and pf() are.

qf() may still be "expected" if you think a bit how it
might be computed.

OTOH, we could clearly do better there.
Notably, qf()'s behavior is really not good enough, for the case
of large df1 and/or df2.

I'll have a look but won't promise much for now.

Martin Maechler, ETH Zurich


    SG> Thanks

    SG> Simone

    >> R.version
    SG>                _ platform i386-pc-mingw32 arch i386 os
    SG> mingw32 system i386, mingw32 status Patched major 2
    SG> minor 7.0 year 2008 month 04 day 22 svn rev 45451
    SG> language R version.string R version 2.7.0 Patched
    SG> (2008-04-22 r45451)

    SG> platform x86_64-unknown-linux-gnu arch x86_64 os
    SG> linux-gnu system x86_64, linux-gnu status Patched major
    SG> 2 minor 6.1 year 2008 month 01 day 17 svn rev 44036
    SG> language R version.string R version 2.6.1 Patched
    SG> (2008-01-17 r44036)

    SG> ______________________________________________________

    SG> Simone Giannerini Dipartimento di Scienze Statistiche
    SG> "Paolo Fortunati" Universita' di Bologna Via delle belle
    SG> arti 41 - 40126 Bologna, ITALY Tel: +39 051 2098262 Fax:
    SG> +39 051 232153 http://www2.stat.unibo.it/giannerini/
    SG> ______________________________________________________



More information about the R-devel mailing list