similar to: Random Number Generator RNGkind() under "R CMD check" (PR#4691)

Displaying 20 results from an estimated 1000 matches similar to: "Random Number Generator RNGkind() under "R CMD check" (PR#4691)"

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
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
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
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
2008 Aug 14
2
[R] RNG Cycle and Duplication (PR#12540)
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-851401618-1218751024=:15885 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE I didn't describe the problem clearly. It's about the number of distinct=20 values. So just
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
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
2019 Feb 19
2
bias issue in sample() (PR 17494)
Before the next release we really should to sort out the bias issue in sample() reported by Ottoboni and Stark in https://www.stat.berkeley.edu/~stark/Preprints/r-random-issues.pdf and filed aa a bug report by Duncan Murdoch at https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17494. Here are two examples of bad behavior through current R-devel: set.seed(123) m <- (2/5) * 2^32
2008 Jul 07
0
RNGkind() state
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 2.7.1 (2008-06-23) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is
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
2019 Feb 26
0
bias issue in sample() (PR 17494)
Kirill, I think some level of collision is actually expected! R uses a 32bit MT that can produce 2^32 different doubles. The probability for a collision within a million draws is > pbirthday(1e6, classes = 2^32) [1] 1 Greetings Ralf On 26.02.19 07:06, Kirill M?ller wrote: > Gabe > > > As mentioned on Twitter, I think the following behavior should be fixed > as part of 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
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
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.
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
2009 Nov 16
2
(Parallel) Random number seed question...
Hi All, I have k identical parallel pieces of code running, each using n.rand random numbers.? I would like to use the same RNG (for now), and set the seeds so that I can guarantee that there are no overlaps in the random numbers sampled by the k pieces of code.? Another side goal is to have reproducibility of my results.? In?the past I have used C with SPRNG for this task, but I'm hoping
2005 Dec 15
1
precision of rnorm
How many distinct values can rnorm return? I assume that rnorm manipulates runif in some way, runif uses the Mersenne Twister, which has a period of 2^19937 - 1. Given that runif returns a 64 bit precision floating point number in [0,1], the actual period of the Mersenne Twister in a finite precision world must be significantly less. One of the arguments for Monte Carlo over the bootstrap is
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
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
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