Hello,
The change in random number generators between 9.2 and 9.3 is giving me some problems. Specifically, I need to replicate the random number generation process in 9.2 (using ranuni), while using the 9.3 software. I found a link a while back that claimed to have code to do this, but it became inactive before I could test it. Does anyone have experience with this? Specifically, I need to be able to validate that samples generated using 9.2 were done correctly, while having access to only the 9.3 software.
Thanks!
What does your SAS 9.2 code look like? Did you use the streamint function in 9.2 as well?
just your standard ranuni:
proc surveyselect data = frame
out = pj.sample samplesize = 80 seed = 20047
run;
or, ranuni within a datastep.
Emma
and no, never used teh streamint function.
Back in the 9.2 days PROC SURVEYSELECT used the RANUNI algorithm, as documented here:
SAS/STAT(R) 9.2 User's Guide, Second Edition
In your example, the PROC uses the default sampling method, which is SRS (simple random samples without replacement). The doc says that "PROC SURVEYSELECT uses Floyd’s ordered hash table algorithm for simple random sampling.... See Bentley and
Floyd (1987) and Bentley and Knuth (1986) for details." So I'd look up the algorithm and use the RANUNI function in the SAS 9.3 DATA step to try to recreate the 9.2 behavior.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.