Re: [R] exact values for p-values

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Thu 14 Jul 2005 - 02:13:58 EST

          so my chi-square approximation was not very good:

 > pchisq(39540, 1, lower.tail=FALSE, log.p=TRUE) [1] -19775.52
 > (pchisq(39540, 1, lower.tail=FALSE, log.p=TRUE) + /log(10))
[1] -8588.398

          ... roughly 1e-8588. With a few hours with Abramowitz and Stegun, I suspect I could do better.

          spencer graves

David Duffy wrote:

>>This is obtained from F =39540 with df1 = 1, df2 = 7025.
>>Suppose am interested in exact value such as
>>

>
>
> If it were really necessary, you would have to move to multiple
> precision. The gmp R package doesn't seem to yet cover this, but FMLIB
> (TOMS814, DM Smith) is a multiple precision f90 library that does
> include the incomplete beta -- it allows one to say for F(1,7025)=39540,
> P=6.31E-2886 (evaluated using 200 sign. digit arithmetic). Results from
> R's pf() agree quite closely with the FMLIB results for less extreme values
> eg
>
>>print(pf(1500,1,7025,lower=FALSE), digits=20)

>
> [1] 1.3702710894887480597e-297
>
> cf 1.37027108948832580215549799419452388134616261215463681945E-297
>
>
> | David Duffy (MBBS PhD) ,-_|\
> | email: davidD@qimr.edu.au ph: INT+61+7+3362-0217 fax: -0101 / *
> | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/
> | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v
>
> ______________________________________________
> R-help@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
-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves@pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915

______________________________________________
R-help@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
Received on Thu Jul 14 02:17:46 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:37 EST