On Fri, 10 Feb 2006, [EMAIL PROTECTED] wrote: > 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
What is wrong here? Try the textbook formula > x <- 0 > m <- 0.04 > sd <- 0.3 > 1/(sqrt(2*pi)*sd) * exp(-0.5*(x-m)^2/sd^2) [1] 1.318039 > this error is consistent in various version and os. It _is_ good that R is consistent. I don't think we are going to believe you unless you give your credentials and state your `correct value' and your reasoning. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel