Re: [Rd] pnorm

2008-02-08 Thread jing hua zhao
, 7 Feb 2008 13:04:58 -0800 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > CC: [EMAIL PROTECTED] > Subject: Re: [Rd] pnorm > > On Thu, 7 Feb 2008, jing hua zhao wrote: > > > > I calculated a two-sided p values according to 2*(1-pnorm(8.104474)), > > which

Re: [Rd] pnorm

2008-02-07 Thread Thomas Lumley
On Thu, 7 Feb 2008, jing hua zhao wrote: > > 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 pn

Re: [Rd] pnorm

2008-02-07 Thread Dimitris Rizopoulos
you should use the 'lower.tail' argument of pnorm(), e.g., check the following: 2 * (1 - pnorm(8.104474)) 2 * pnorm(8.104474, lower.tail = FALSE) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven

Re: [Rd] pnorm

2008-02-07 Thread Duncan Murdoch
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

Re: [Rd] pnorm

2008-02-07 Thread Prof Brian Ripley
On Thu, 7 Feb 2008, 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

Re: [Rd] pnorm

2008-02-07 Thread Martin Becker
I guess that you destroy the accuracy of the calculation by the subtraction. Try 2*(pnorm(8.104474,lower=FALSE)) instead, which results in 5.29742e-16 for me. Regards, Martin jing hua zhao schrieb: > Dear R list, > > I calculated a two-sided p values according to 2*(1-pnorm(8.104474)), w