Even the old pseudorandom number generator would not repeat the full random number until something like 2**31 draws. This only true for the complete floating point pseudorandom number. (almost?) any transformations of the underlying variable result in repeats. any of compute dichot = rv.bernoulli(.5). compute temp = rnd(rv.normal(50,10)). compute item(#k) = rnd(rv.uniform(1,6)). will repeat the final random value very quickly. to get more insight into the old PRNG Save all your current work, then open a new instance of SPSS. Cut-and-paste then run the syntax after the sig block. Art Art@DrKendall.org Social Research Consultants University Park, MD USA Inside the Washington, DC beltway. (301) 864-5570 new file. * this syntax generates 3 cases * demonstrating that using this base which is part of the PRNG produces * numbers. It can be used to test transforms. * it also show that the result of one draw is the seed for the next, * hence the pseudo in pseudorandom number generator. set seed = 20050201. input program. loop id = 1 to 3. end case. end loop. end file. end input program. compute base= (2**31)-1. do if id eq 1. compute x_uniform = rnd(rv.uniform(1,base)). print record=1 /x_uniform (f40.16). show seed. end if. * this is a rare instance of needing the execute more than once * so that the SHOW SEED works after each case. There is no compute s= $seed. execute. do if id eq 2. compute x_uniform = rnd(rv.uniform(1,base)). print record=1 /x_uniform (f40.16). show seed. end if. execute. do if id eq 3. compute x_uniform = rnd(rv.uniform(1,base)). print record=1 /x_uniform (f40.16). show seed. end if. execute. show seed. Peck, Jon wrote: >See below > >-----Original Message----- >From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Richard Ristow >Sent: Thursday, September 29, 2005 10:17 AM >To: SPSSX-L@LISTSERV.UGA.EDU >Subject: Re: [SPSSX-L] Random number without replacement > > >Similarly, I'm not sure whether you'd now recommend discarding a number >of variates after seeding. (Perhaps SPSS even does this, after >auto-seeding.) >[>>>Peck, Jon] That advice dates back to when computers were hand cranked. > >Back on 6 August, Richard Oliver gave a reference to the random-number >algorithms SPSS uses: "The new random number generator is the Mersenne >Twister, and the old one is now referred to as the "SPSS 12.0 >compatible" random number generator." Could you say how SPSS >random-initializes it, and what you now think about throwing away a few >variates after seeding? >[>>>Peck, Jon] Again, no need to discard values. The Twister has better numerical properties, especially a very long period, but the older generator should be more than adequate for most purposes short, perhaps, of lengthy Monte Carlo simulations. In both cases, using RANDOM for the start constructs a starting point based on low-order bits of the system clock (after various manipulations), but there is no reason to think that this is a problem > > > >For compatibility, the old random number generator is still the default, but you can set the Mersenne Twister as the default in Edit/Options > >And thanks for correcting what I'd assumed about the menus. > >-Cheers, > Richard > > > >