similar to: RNG R/Splus compatibility

Displaying 20 results from an estimated 7000 matches similar to: "RNG R/Splus compatibility"

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
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
1999 May 04
1
rnorm
Brian I've been playing a bit with the Wichmann-Hill RNG. I would prefer to have normally distributed random numbers and I think I have things generally worked out to use Wichmann-Hill and then Box-Muller. In the process, I was looking at R's rnorm.c, but could not figure out what transformation is used in R to convert uniform rv's to normal rv's. Do you know? It looks like there
1998 Dec 01
0
Random Number Generators, .Random.seed and all that..
As some of you know, we have been thinking of allowing the possibility of a CHOICE of the kind of random number generator (=: RNG) to use in R. The current R-release snapshot even has some code in it; however, this will be changed quite a bit. Here is a kind of informal RFC (request for comments / request for criticism / ..): 1a. With the new scheme, we still want that save(..) &
1999 Apr 28
1
R random number generator
R 0.64 on windows NT 4.0 Sometimes I got an error message by doing this > .Random.seed <- c(1, 1:2) > .Random.seed [1] 1 1 2 > runif(5) Warning: Wrong length .Random.seed; forgot initial RNGkind? set to Wichmann-Hill[1] 0.02253721 0.84832584 ........ Sometimes I do not get error message: > .Random.seed <- c(1, 1:2) > .Random.seed [1] 1 1 2 > runif(1) [1] 0.5641106 >
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
2018 Mar 05
1
Random Seed Location
On Sun, Mar 4, 2018 at 3:23 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 04/03/2018 5:54 PM, Henrik Bengtsson wrote: >> >> The following helps identify when .GlobalEnv$.Random.seed has changed: >> >> rng_tracker <- local({ >> last <- .GlobalEnv$.Random.seed >> function(...) { >> curr <- .GlobalEnv$.Random.seed
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
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
2001 Jan 23
0
1.2.1 segfault
I've trapped this segfault with gdb, but I'm not sure what it means or what to do next. Paul _____ $ R -d gdb GNU gdb 4.17 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is
2007 Sep 23
0
initial scrambling of seed in do_setseed / RNG_Init
I would like to suggest a modification of initial scrambling of the seed in RNG_Init (called from do_setseed). The modified code is equivalent, but faster. Patch against R-devel_2007-09-22 follows --- R-devel-orig/src/main/RNG.c 2007-09-02 07:49:35.000000000 +0200 +++ R-devel-modif/src/main/RNG.c 2007-09-23 10:51:59.234566440 +0200 @@ -216,8 +216,8 @@ BM_norm_keep = 0.0; /* zap Box-Muller
2000 Feb 22
2
reproducing Box-Muller numbers
There seems to be a minor problem with reproducing numbers from rnorm with Box-Muller. The pattern suggests it might have something to do with the value that gets dropped when an odd number of numbers is requested. (Details below.) Also, could "user-supplied" be added as an option for normal.kind in RNGkind. I'm sure the Box-Muller in R is better than my own attempt, but I would
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 14
2
RNG Cycle and Duplication
Hello all, I am generating large samples of random numbers. The RNG help page says: "All the supplied uniform generators return 32-bit integer values that are converted to doubles, so they take at most 2^32 distinct values and long runs will return duplicated values." But I find that the cycles are not the same as the 32-bit integer. My test indicated that the cycles for
2008 Aug 14
0
[R] RNG Cycle and Duplication (PR#12537)
Shengqiao Li wrote: > Hello all, > > I am generating large samples of random numbers. The RNG help page > says: "All the supplied uniform generators return 32-bit integer > values that are converted to doubles, so they take at most 2^32 > distinct values and long runs will return duplicated values." But I > find that the cycles are not the same as the 32-bit
2008 Aug 14
0
[R] RNG Cycle and Duplication (PR#12538)
Shengqiao Li wrote: > Hello all, > > I am generating large samples of random numbers. The RNG help page says: > "All the supplied uniform generators return 32-bit integer values that are > converted to doubles, so they take at most 2^32 distinct values and long > runs will return duplicated values." But I find that the cycles are not > the same as the 32-bit
2018 Mar 04
0
Random Seed Location
On 04/03/2018 5:54 PM, Henrik Bengtsson wrote: > The following helps identify when .GlobalEnv$.Random.seed has changed: > > rng_tracker <- local({ > last <- .GlobalEnv$.Random.seed > function(...) { > curr <- .GlobalEnv$.Random.seed > if (!identical(curr, last)) { > warning(".Random.seed changed") > last <<- curr
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
2003 Mar 03
0
R-devel RNG change
I find the documention for RNGversion in R-devel is a bit misleading, and suggest adding a sentence to make it clear that the meaning of "default" is not set to its meaning in the earlier R version: `RNGversion' can be used to set the random generators as they were in an earlier R{} version (for reproducibility). RNGversion does not set the meaning of
2003 Jun 13
0
Testing the R RNGs
I have applied L'Ecuyer's TESTU01 suite of RNG tests to the RNGs in R. TESTU01 offers three increasingly more stringent suites, called "Small Crush", "Crush" and "Big Crush". If a particular RNG fails Small Crush, there is no need to apply Big Crush. Below I summarize the results: Number of Tests Failed Small Crush Crush Big Crush