Displaying 20 results from an estimated 1000 matches similar to: "precision of rnorm"
2016 Aug 31
1
A bug in the R Mersenne Twister (RNG) code?
On 30 August 2016 at 18:29, Duncan Murdoch wrote:
| I don't see evidence of a bug. There have been several versions of the
| MT; we may be using a different version than you are. Ours is the
| 1999/10/28 version; the web page you cite uses one from 2002.
|
| Perhaps the newer version fixes some problems, and then it would be
| worth considering a change. But changing the default RNG
2013 Feb 21
1
limitations to random number generator in 64-bits machines
Dear List,
Recently I got the comment that the implementation of the random number
generator used by default in R (Mersenne-Twister) could not be "safe"
for 64-bits machines, so I decided to put the question here because I do
not have expertise in that topic, and because this question could be
"too technical for R-help's audience". I apologise if this is not the case.
2016 Aug 30
4
A bug in the R Mersenne Twister (RNG) code?
Whomever,
I recently sent the "bug report" below toR-core at r-project.org and have
just been asked to instead submit it to you.
Although I am basically not an R user, I have installed version 3.3.1
and am also the author of a statistics program written in Visual Basic
that contains a component which correctly implements the Mersenne
Twister (MT) algorithm. I believe that it is
2009 May 12
4
different results on linux and windows
Dear R experts,
we are preparing an R-package to compute the Oja Median which contains
some C++ code in which random numbers are needed. To generate the random
numbers we use the following Mersenne-Twister implementation:
// MersenneTwister.h
// Mersenne Twister random number generator -- a C++ class MTRand
// Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus
// Richard J.
2016 Sep 01
2
A bug in the R Mersenne Twister (RNG) code?
On 08/30/2016 06:29 PM, Duncan Murdoch wrote:
> I don't see evidence of a bug. There have been several versions of the
> MT; we may be using a different version than you are. Ours is the
> 1999/10/28 version; the web page you cite uses one from 2002.
>
> Perhaps the newer version fixes some problems, and then it would be
> worth considering a change. But changing the
2019 Feb 26
2
bias issue in sample() (PR 17494)
Gabe
As mentioned on Twitter, I think the following behavior should be fixed
as part of the upcoming changes:
R.version.string
## [1] "R Under development (unstable) (2019-02-25 r76160)"
.Machine$double.digits
## [1] 53
set.seed(123)
RNGkind()
## [1] "Mersenne-Twister" "Inversion"??????? "Rejection"
length(table(runif(1e6)))
## [1] 999863
I don't
2006 Sep 25
1
Initialising Mersenne-Twister with one integer
Hi,
It seems to me that the Mersenne-Twister PRNG can be initialised using
one integer instead of 624 integers, since inside RNG.c code there's a
function defined as MT_sgenrand(Int32).
How do I actually set this seed within R?
I've tried:
> .Random.seed <- c(3, 1)
> runif(1)
Error in runif(1) : .Random.seed has wrong length
In addition, is '3' actually the
2019 Feb 26
1
bias issue in sample() (PR 17494)
Ralf
I don't doubt this is expected with the current implementation, I doubt
the implementation is desirable. Suggesting to turn this to
pbirthday(1e6, classes = 2^53)
## [1] 5.550956e-05
(which is still non-zero, but much less likely to cause confusion.)
Best regards
Kirill
On 26.02.19 10:18, Ralf Stubner wrote:
> Kirill,
>
> I think some level of collision is actually
2003 Oct 20
1
Random Number Generator RNGkind() under "R CMD check" (PR#4691)
Full_Name: Wolfgang Huber
Version: 1.8.0
OS: Linux
Submission from: (NULL) (193.174.58.146)
The man page for RNGkind says that the default is Mersenne-Twister, and when I
start R interactively, I get in fact
> RNGkind()
[1] "Mersenne-Twister" "Inversion"
However, during the execution of "R CMD check" I get
> > ### ** Examples
> >
> > RNGkind()
2008 Aug 17
1
Wichmann-Hill Random Number Generator and the Birthday Problem
Dear all,
Recently I am generating large random samples (10M) and any duplicated
numbers are not desired.
We tried several RNGs in R and found Wichmann-Hill did not produce
duplications.
The duplication problem is the interesting birthday problem. If there are
M possible numbers, randomly draw N numbers from them,
the average number of dupilcations D = N(N-1)/2/M.
For Knuth-TAOCP and
2003 Jun 12
1
Tested Random Number Generator
Dear All,
The editor of a journal to which I had submitted a publication asked
whether R has a "tested random number generator." My paper included
Monte Carlo simulations generating random normal and random chi-square
values.
help(rnorm) lists
Wichura, M. J. (1988) Algorithm AS 241: The Percentage Points of
the Normal Distribution. Applied Statistics, 37, 477-484.
as a
2013 Feb 18
2
Random number generator used in 'runif'
Dear list,
For the implementation of a particular optimization algorithm it is
very important the random number generator.
I would like to know if somebody could tell me what is the random
number generator used by default in the 'runif' function.
>From the help page of 'runif' and '.Random.seed' I guess that the
default algorithm is 'Mersenne-Twister', but I
2008 Aug 19
1
RNGkind() state (PR#12567)
I sent this to R-devel early last month, but have received no response, so I guess it
really is a bug.
This looks like a bug to me, and is a bit hard to describe, but easy to reproduce. ?
Basically, if RNGkind is saved as something other than the default, and if the first
operation in a session is a set.seed(), the default is reverted to. ?Reproduce by:
cafe-rozo> ?R --vanilla
R version
2006 Aug 28
1
Speed of runif() on different Operating Systems
Dear list,
I have noticed surprisingly big performance differences of runif()
between Windows XP and (Debian) linux on similar CPUs (Pentium D 3.0GHz
(WinXP)/3.2GHz (Linux)) and I wonder if there is a simple explanation
for the difference.
On a linux system (with a slightly better CPU and 1GB more RAM),
execution of runif() seems to consume about 80% more CPU time than on a
Windows XP
2011 Feb 02
4
testing randomness of random number generators with student t-test?
Hi, subject more or less says it all.
I freely admit to not having bothered to find some of the online papers
about method of testing the quality of random number generators -- but
in an idle moment I wondered what to expect from something like the
following:
randa<-runif(1000)
randb<-runif(1000)
t.test(randa,randb)$p.value
var.test(randa,randb)$p.value
[repeat ad nauseum]
Is the
2017 Nov 03
1
Extreme bunching of random values from runif with Mersenne-Twister seed
Martin,
Thanks for the helpful reply. Alas I had forgotten that (implied)
unfavorable comparisons of *nix systems with Windows systems would likely
draw irate (but always substantive) responses on the R-devel list -- poor
phrasing on my part. :)
Regardless, let me try to address some of the concerns related to the
construction of the MRE itself and try to see if we can clean away the
shrubbery
2005 Nov 17
2
R questions
Dear Sir/Madam,
I am a beginner in R. Here is my questions.
1. Can you give me one test for randomness (a name and descriptive
paragraph is sufficient).
2. I have learned a uniform random number generator [e.g. not the
algorithms: i)Wichmann-Hill, ii) Marsaglia-Multicarry, iii) Super-Duper
(Marsaglia), iv) Mersenne-Twister, v) TAOCP-1997 (Knuth), or vi) TAOCP-2002
(Knuth)] . Is there any other
2005 Dec 21
2
Random numbers
Hi All.
I have R code whose functionality is being replicated within a C+
program. The outputs are to be compared to validate the conversion
somewhat - however (as is always the case) I have stuffed my code with
random number calls.
Random uniform numbers in C+ are being produced using the (Boost)
mersenne-twister generators (mt11213b & mt19937) - which is the default
type of generator
1998 Nov 04
3
simple questions about R
A few simple questions from a novice R user. (I am running
R version 0.62.3 Beta (Sept 8, 1998) under Windows NT.)
1) How do I time the execution of a function/program in R
for Windows? Is there the equivalent of a dos.time function?
2) Can anyone send me details on the random number generator
used by R (period, etc.). Also, why is it different from
the SuperDuper RNG in S?
3) Will there
2007 Oct 17
0
predictable bit patterns in runif(n) shortly after set.seed
Mersenne Twister generator is known to be sensitive to the
algorithm used to generate its initial state. The initialization
used in R generates the initial state in a way, which leaves
linear dependencies mod 2 among the bits in the initial state.
Since Mersenne Twister performs only operations, which are
linear mod 2, these dependencies propagate to the output sequence.
An easy to see