[Rd] Accuracy of dnorm (PR#8586)

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Feb 10 14:44:03 CET 2006


marco.vezzoli at st.com writes:

> Full_Name: Marco Vezzoli
> Version: 2.2.0 2.1.0 2.0.0
> OS: Solaris, Windows, Linux
> Submission from: (NULL) (57.78.11.38)
> 
> 
> The dnorm functions yield a wrong value when the standard deviation is near to
> 1e-1
> e.g.
> > dnorm(0,mean=0.04,sd=0.3)
> [1] 1.318039
> 
> this error is consistent in various version and os.

What's wrong with it???

> (pnorm(0.000001,mean=0.04,sd=0.3) - pnorm(0,mean=0.04,sd=0.3))/.000001
[1] 1.318040


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-devel mailing list