[R] Bug in qnorm or pnorm?

Deepayan Sarkar deepayan at stat.wisc.edu
Fri Aug 6 15:31:00 CEST 2004


On Friday 06 August 2004 08:13, Trenkler, Dietrich wrote:

> Given that pnorm(8.30) delivers 1 shouldn't we get Inf
> for  x<-8.30;x-qnorm(pnorm(x)) ?

Why? 

> pnorm(8.30)
[1] 1
> qnorm(pnorm(8.30)) ## same as qnorm(1)
[1] Inf
> 8.30 - qnorm(pnorm(8.30)) ## same as 8.30 - Inf
[1] -Inf

This seems perfectly acceptable to me for all reasonable definitions of 
Inf.

Deepayan




More information about the R-help mailing list