[R] Display a very low p-value

Ben Bolker bolker at ufl.edu
Wed Apr 8 21:37:55 CEST 2009




Dimitris Rizopoulos-4 wrote:
> 
> in this case you need to use the 'lower.tail' argument, e.g.,
> 
> pnorm(8:15, lower.tail = FALSE)
> 
> 
> Bhoom Suktitipat wrote:
>> Hello R-Help,
>> 
>> I ran some analysis and were hit with some low Z-score. I tried to
>> convert
>> it to a p-value, however, it seems like the ceiling is around 1e-16.
>> 
>>> 1-pnorm(8)
>> [1] 6.661338e-16
>>> 1-pnorm(9)
>> [1] 0
>> 
>> Do you have any suggestion how I can display a very low p-value in the
>> form
>> of scientific number format?
> 
> 

For what it's worth, the pnorm calculation will still underflow for Z values
of
greater than about 37 -- 

 pnorm(37:39,lower.tail=FALSE)
[1] 5.725571e-300  0.000000e+00  0.000000e+00

  This is just a limitation of double precision floating-point arithmetic
...

 curve(pnorm(x,lower.tail=FALSE),from=30,to=40,log="y")
.Machine$double.xmin


-- 
View this message in context: http://www.nabble.com/Display-a-very-low-p-value-tp22956997p22957574.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list