[R] unexpected behaviour of rnorm()
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Wed Nov 27 08:46:55 CET 2002
On Wed, 27 Nov 2002, [iso-8859-1] Göran Broström wrote:
> On Tue, 26 Nov 2002 ripley at stats.ox.ac.uk wrote:
>
> > That's the maximum of 5000 normals, right? That's pushing the accuracy of
> > some internal calculations too hard.
> >
> > If you want to do this, you should use
> >
> > RNGkind(, "Inversion")
>
> Just of curiosity, is this a general recommendation? I.e., should I put
> that in my .Rprofile and get a generally better RNG? Speed issues?
>
> >
> > That's not the default for back-compatibility reasons.
>
> which made me wonder.
Yes, it is a general recommendation. We would have changed to inversion
apart from reproducibility issues. Inversion was implemented in a way
that is very accurate, if a little bit slower than the other normal
generators supplied. (You can do the timings yourself.)
--
Brian D. Ripley, ripley at stats.ox.ac.uk
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list