11-21-2014 03:07 PM
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.
11-24-2014 01:46 PM
Back in the 9.2 days PROC SURVEYSELECT used the RANUNI algorithm, as documented here:
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.