> The problem with the old linear congruential generator is not > the period, which is long enough perhaps, ...
Tell that to the people who complained that the GB_FLIP period (_1+2^55) is not long enough. ----- Original Message ----- From: Henry Rich <[email protected]> Date: Tuesday, February 23, 2010 13:28 Subject: Re: [Jgeneral] GB_Flip RNG seed To: General forum <[email protected]> > The problem with the old linear congruential generator is not > the > period, which is long enough perhaps, but its behavior when used > to > create random vectors. If I am creating random points in n- > dimensional > space using (10000,n) (?...@$) 1000000 for example, it will be > found that > the points do not sample the space uniformly, but instead > cluster along > [hyper]planes in the space. This can miss details in the > model being > analyzed. > > Henry Rich > > Roger Hui wrote: > > Please read the vocabulary page for ? > > http://www.jsoftware.com/help/dictionary/d640.htm > > In particular the part for 9!:44 and 9!:45. > > The RNGs now in use in J can not be completely > > determined by a "seed" which is a single integer. > > > > If you are pining for the old linear conguenial generator, > > here it is: > > > > tick =: [ <....@%~ (* 3 : > 'qrl=:(<:2^31)|(7^5)*qrl')@]> roll =: > (<:2^31)&tick"0> qrl =: 16807 > > > > I understand that it, with its period of _1+2^31, is totally > > unacceptable for modern usage. Some users have > > also complained that GB_Flip has too short a period > > (_1+2^55). > > > > > > > > ----- Original Message ----- > > From: Brian Schott <[email protected]> > > Date: Tuesday, February 23, 2010 5:33 > > Subject: [Jgeneral] GB_Flip RNG seed > > To: [email protected] > > > >> The following behavior is unexpected for the GB_Flip > >> RNG. Notice that the verb `roll` produces the same seed > >> every time instead of updating the seed each time as is > >> required for most simulation studies, for example those that > >> employ the random components in batches. Also, in order to > >> perform a simulation study which synchronizes the random > >> fractions in order to achieve "variance reduction", an > >> important strategy, and for other research studies to > >> replicate exactly the fractions. > >> The earlier versions of J updated the seed after > >> each usage. Only with the implementation of the newer RNG's > >> was this feature changed. I request that the old behavior be > >> restored at least for GB_Flip. > >> > >> 9!:43]1 > >> 9!:0'' > >> 16807 > >> roll=: monad define > >> i=:0 > >> for. i. y do. ? y > >> i=:>:i > >> smoutput i,9!:0'' > >> end. > >> ) > >> roll 10 > >> 1 16807 > >> 2 16807 > >> 3 16807 > >> 4 16807 > >> 5 16807 > >> 6 16807 > >> 7 16807 > >> 8 16807 > >> 9 16807 > >> 10 16807 > >> 9!:42'' > >> 1 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
