02-10-2017 08:09 PM
Should I be able to reproduce a random sample of draws from the standard normal (rannor) generated by someone else as long as I use the same seed number? Would the sample differ depending on version of SAS, machine or any other factors? Thank you. jm
02-11-2017 04:23 AM
if you are simulating data in a datastep. Use
if you are simulating data in IML. the two algorithms are the same for the datastep and IML and to my knowledge you will get the same results across most sas versions as well
02-13-2017 02:32 PM
Draycut gave the correct answer for the RAND (or RANDGEN) function. (For a longer answer, see "Random number streams in SAS.") However, you asked about the RANNOR function, which takes the seed as an argument.
The answer is still "yes." Up to numerical precision, you should get the same values for RANNOR as long as you use the same seed. Some people use the seeds incorrectly, so be sure to read "Random number seeds: Only the first seed matters" to make sure you understand how seeds initialize streams.