From p.dalgaard at biostat.ku.dk  Fri Feb 10 14:44:03 2006
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: 10 Feb 2006 14:44:03 +0100
Subject: [Rd] Accuracy of dnorm (PR#8586)
In-Reply-To: <20060210130147.808AE121AE@slim.kubism.ku.dk>
References: <20060210130147.808AE121AE@slim.kubism.ku.dk>
Message-ID: <x21wyb2usc.fsf@viggo.kubism.ku.dk>

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



[Rd] Accuracy of dnorm (PR#8586)
Peter Dalgaard