Re: [Rd] Accuracy of dnorm (PR#8586)

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Fri 10 Feb 2006 - 13:44:03 GMT

marco.vezzoli@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@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat Feb 11 00:59:52 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:41 GMT