Displaying 20 results from an estimated 8000 matches similar to: "[R] RNG Cycle and Duplication (PR#12537)"
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
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#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
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
1999 May 05
1
RNG R/Splus compatibility
Starting with example Wichmann-Hill code from Brian Ripley I have been playing
with a set of programs for getting the same random sequences from R and Splus. A
copy is included below along with a test (which works in Solaris with R and
Splus 3.3).
The approach is somewhat different from the usual problems on this list as I am
trying to get the same results from Splus as I get from R. However,
2011 Aug 05
2
Question on RNG
Hi all, I have happened to work on MS .NET for sometime now, and I found that this language offers RNG what is called as Donald E. Knuth's subtractive random number generator algorithm (found here: http://msdn.microsoft.com/en-us/library/system.random.aspx#Y12).
?
Here I was wondering whether R also have same RNG in it's inventory, so looked at ?set.seed. There I found 2 related RNGs
2002 Mar 01
2
Weakness in Knuth-TAOCP RNG (fwd) (PR#1336)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-1141662977-1014960253=:3119
Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-ID:
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
1997 Nov 24
0
R-alpha: random number generator -- S-plus's
--Multipart_Mon_Nov_24_14:51:09_1997-1
Content-Type: text/plain; charset=US-ASCII
>>>>> "PaulG" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
MM> The code is basically in V&R 1 and 2; V&R2 on p.167. I have it as a
MM> C function that I used to dyn.load into S-plus in order
MM> to prove that S-plus was using it.
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
>
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
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
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
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(..) &
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
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
2008 Mar 14
1
Buggy Kinderman-Ramage (PR#2846)
Unfortunately, RNGkind is buggy. It will not generate warnings
except the full name "Buggy Kinderman-Ramage" is supplied for normal.kind.
match.arg is supposed to be called before "==" comparison.
========================================
Shengqiao Li
Research Associate
The Department of Statistics
PO Box 6330
West Virginia University
Morgantown, WV 26506-6330
1999 Apr 26
0
[R] random sequence
> Date: Mon, 26 Apr 1999 12:47:23 -0400
> From: Paul Gilbert <pgilbert@bank-banque-canada.ca>
>
> >How can I get the same stream of random numbers in R and S?
>
> I'd like to do this too. I think you need to extract the RNG C code from R
and
> compile then dynload it into S. If you get it working please let me know.
What exactly do you want? My class
2015 Feb 03
2
Seed in 'parallel' vignette
Hi,
This is most likely only a minor technicality, but I saw the
following: On page 6 of the 'parallel' vignette
(http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf),
the random-number generator "L'Ecuyer-CMRG" is said to have seed
"(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1}, y_{n-2})". However, in L'Ecuyer
et al. (2002), the seed is given with
2004 Sep 04
0
Non-Markovian Behaviour of a Cusum?
Can someone help me understand simulations of a one-sided Cusum?
Consider the following:
Q[i] = max(0, Q[i-1]+z[i]), z[i] ~ N(offset, 1), with Q[0] = FIR
(fast initial response).
With offset < 0, mean{Q[i] for fixed i averaged over many
simulations} approaches an asymptote as i -> Inf. In simulations with
abs(offset) small and FIR close to the asymptote, Q[i]