Displaying 20 results from an estimated 5000 matches similar to: "Which function can change RNG state?"
2018 Sep 19
4
Bias in R's random integers?
On Wed, 19 Sep 2018 at 13:43, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:
>
> I think the analyses are correct, but I doubt if a change to the default
> is likely to be accepted as it would make it more difficult to reproduce
> older results.
I'm a bit alarmed by the logic here. Unbiased sampling seems basic for a
statistical language. As a consumer of R I'd
2003 Apr 25
4
Kinderman-Ramage (PR#2846)
Hi,
Our department has detected a bug in the implementation of the
Kinderman-Ramage generator for normal random variates in version
1.7.0, which can be seen from the below R session.
(Consecutive calls for chisq.test(...) always gives p-values very
close to 0.)
We have already encountered this bug in version 1.6.2
The error is in file
R-1.7.0/src/nmath/snorm.c
Here is a patch for this file to
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
2015 Feb 08
0
Which function can change RNG state?
On 7 February 2015 at 19:52, otoomet wrote:
| random numbers. For instance, can I be sure that
| set.seed(0); print(runif(1)); print(rnorm(1))
| will always print the same numbers, also in the future version of R? There
Yes, pretty much.
I've been lurking here over fifteen years, and while I am getting old and
forgetful I can remember exactly one such change where behaviour was changed,
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
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
2018 Sep 20
1
Bias in R's random integers?
On 09/19/2018 10:03 AM, Ben Bolker wrote:
...
> Balancing backward compatibility and correctness is a tough problem
> here.
I think improvements in the RNG is a situation where backward
compatibility is not really going to be lost, because people can specify
the old generator, they just will not get it by default. My opinion is
that the default needs to generally be the best option
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
2002 Aug 12
1
set.seed
I'm running into problems with set.seed--maybe I'm misunderstanding
something.
I'm running R 1.5.1 on Windows 2000.
I'm basically trying to capture the random seed so that I can reproduce a
simulation if it's necessary later. Using set.seed, I can certainly get
reproducible results, but not the results I get on the first pass. Here's
an example:
# Generate a random
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
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
2002 Nov 26
5
unexpected behaviour of rnorm()
Hello everyone.
If I do
f <- function(n){max(rnorm(n))}
plot(sapply(rep(5000,4000),f)) #[this takes my PC about 30 seconds]
then I get something quite unexpected: gaps in the distribution. For
me, the most noticable one is at about 3.6.
Do others get this? Is it an optical illusion? It can't be right,
can it? Or maybe I just don't understand the good ol' Gaussian very
2003 Jan 28
5
random number generator?
Dear R-Aficionados:
I realize that no random number generator is perfect, so what I report
below may be a result of that simple fact. However, if I have made an
error in my thinking I would greatly appreciate being corrected.
I wish to illustrate the behavior of small samples (n=10) and so
generate 100,000 of them.
n.samples <- 1000000
sample.size = 10
p <- 0.0001
z.normal <- qnorm(p)
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
2016 Sep 01
0
A bug in the R Mersenne Twister (RNG) code?
I wonder how useful a (set of?) "time machine" functions which look up
/infer things like this based on a date would be. Could ease the pain of
changes generally, though not remove it completely.
~G
On Wed, Aug 31, 2016 at 5:45 PM, Paul Gilbert <pgilbert902 at gmail.com> wrote:
>
>
> On 08/30/2016 06:29 PM, Duncan Murdoch wrote:
>
>> I don't see evidence of
2005 Jun 08
6
Random seed problem in MCMC coupling of chains
Hello!
I am performing coupling of chains in MCMC and I need the same value
of seed for two chains. I will show demo of what I want:
R code, which might show my example is:
niter <- 3
nchain <- 2
tmpSeed <- 123
for (i in 1:niter) { # iterations
for (j in 1:nchain) { # chains
set.seed(tmpSeed)
a <- runif(1)
cat("iter:", i, "chain:", j,
2018 Mar 04
3
Random Seed Location
On Mon, Feb 26, 2018 at 3:25 PM, Gary Black <gwblack001 at sbcglobal.net>
wrote:
(Sorry to be a bit slow responding.)
You have not supplied a complete example, which would be good in this
case because what you are suggesting could be a serious bug in R or a
package. Serious journals require reproducibility these days. For
example, JSS is very clear on this point.
To your question
>
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
2017 Feb 07
2
package load altering RNG state
Hello
When loading a package, I'm wondering if it's frowned upon for the
package to alter the state of the random number generator? I guess not,
since the parallel package does it?
> set.seed(6860)
> old.seed <- .GlobalEnv$.Random.seed
> library(parallel)
> new.seed <- .GlobalEnv$.Random.seed
> identical(old.seed, new.seed)
[1] FALSE
I ask
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