|
From: | Sven N. Thommesen |
Subject: | Re: Random number generators. advice? |
Date: | Wed, 21 Feb 2001 12:40:27 -0600 |
Paul, you have two paths you can go.a) As Steve suggests, just create several instances of a single generator. You would need to manage seeds explicitly, since you would need to start each instance with a distinct seed to avoid overlapping (correlated) sequences of output.
Of the generators available, the default MT19937 is the best. It has the longest period by far, and has been extensively tested. But the other ones made visible in Java (C2TAUSx, PSWB) should also be usable. You'll want to avoid PMMLCG1 except for toy purposes, since it has a very short period.
b) There is in the literature some concern that using several instances of the same generator might give you artifacts in your simulation due to the structure of the set of variates generated. This may have been more of a concern in the past, with poor generators and/or short periods. I would not be too worried about this if you use multiple MT19937 generators. But if you are, use different classes of generators.
c) If the fact that few of the generators have been made "visible" from java becomes a pressing issue, we might listen to pleas for exposing more of them.
Sven At 10:40 AM 2/21/2001 -0600, you wrote:
I'm trying to make two "similar" models, one in obj-c and one in java, generate the exact same results. In order to do that, I need the exact same random numbers at the start, and I'm having trouble because one program makes draws on the random generator more than the other, so the numbers for some variables don't match up. As a result, I need to create three or four different generator objects which can be called at just the right time so that the numbers will be identical in the two simulations. At random, I chose to add the generator C3MWCgen and a couple others. On the objc side that's OK, but there is no Java Swarm interface for that one. So then I thought I might as well just ask the experts which generators to use, if one needs separate generators to keep random numbers matched up. Advise me please. -- Paul E. Johnson email: address@hidden Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn University of Kansas Office: (785) 864-9086 Lawrence, Kansas 66045 FAX: (785) 864-5700 ================================== Swarm-Support is for discussion of the technical details of the day to day usage of Swarm. For list administration needs (esp. [un]subscribing), please send a message to <address@hidden> with "help" in the body of the message.
================================== Swarm-Support is for discussion of the technical details of the day to day usage of Swarm. For list administration needs (esp. [un]subscribing), please send a message to <address@hidden> with "help" in the body of the message.
[Prev in Thread] | Current Thread | [Next in Thread] |