[Rd] pnorm

Duncan Murdoch murdoch at stats.uwo.ca
Thu Feb 7 18:11:06 CET 2008


On 2/7/2008 12:00 PM, jing hua zhao wrote:
> Dear R list,
> 
> I calculated a two-sided p values according to 2*(1-pnorm(8.104474)), which gives  4.440892e-16. However, it appears to be  5.30E-16 by a colleague and 5.2974E-16 from SAS. I tried to get around with mvtnorm package but it turns out to be using pnorm for univariate case. I should have missed some earlier discussions, but for the moment is there any short answer for a higher precision? 

You are taking the difference between two numbers, 1 and a number that 
is almost equal to 1.  Don't do that, it results in a catastrophic loss 
of precision.

Evaluate the upper tail probability directly:

 > 2*(pnorm(8.104474, lower=FALSE))
[1] 5.29742e-16

Duncan Murdoch

Somehow these days, statistical geneticists are infatuated with such 
tiny p values!
> 
> Many thanks in advance,
> 
> 
> Jing Hua
> 
> _________________________________________________________________
> Telly addicts unite!
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list