Skip to content
Prev 245707 / 398506 Next

Reconcile Random Samples

Yes,

If you use the same pseudorandom number generator in both places.  The ranuni() function in SAS uses a simple multiplicative generator

   SEED = mod( SEED * 397204094, 2**31-1 )

and then returns the value SEED / (2^31 - 1) as the random number. SAS also has a much better generator, rand().  I would instead generate a series of random number in one program and export the numbers to the other program.

Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA