Beginning with SAS/STAT® 12.1 in SAS® 9.3M2 (TS1M2), PROC SURVEYSELECT uses the Mersenne-Twister pseudo-random number generator by default. In previous releases, the RANUNI random number function was used. Because of this change, the procedure generates a different random sample even when the input data set and all the options, including SEED=, are the same.
The main improvement is in the period of the random number generator. The RANUNI function algorithm is a linear multiplicative congruential generator and has a period of 231-1. The Mersenne-Twister generator uses a twisted generalized feedback shift register algorithm that has a period of 219937-1.
A nonstratified sample is selected when the STRATA statement is omitted. To reproduce the same random sample obtained in SAS® 9.3M1 (TS1M1) or earlier, specify the RANUNI option in the PROC SURVEYSELECT statement. For example, if these statements are run in a release prior to SAS 9.3M2 (SAS/STAT® 12.1):
the sample that is selected can be reproduced in SAS/STAT 12.1 and later releases with the following statements:
A stratified sample is selected when the STRATA statement is specified. To reproduce the same stratified random sample obtained in from SAS 9.3M1 or earlier, specify the RANUNI option in the PROC SURVEYSELECT statement. For example, if these statements are run in a release prior to SAS 9.3M2 (SAS/STAT 12.1):
the sample that is selected can be reproduced in SAS/STAT 12.1 and later releases with the following statements:
If a stratified sample is selected in any release from SAS 9.3M2 (SAS/STAT 12.1) through SAS 9.4M2 (SAS/STAT® 13.2) and the RANUNI option is omitted, the sample can be reproduced in SAS® 9.3M3 (TS1M3) (SAS/STAT® 14.1) or later by specifying the option STRATUMSEED=RESTORE in the PROC SURVEYSELECT statement. For example, if these statements are run in any release from to SAS/STAT 12.1 through SAS/STAT 13.2:
the sample that is selected can be reproduced in SAS/STAT 14.1 and later releases with the following statements:
Note that you should use the RANUNI option when selecting a stratified random sample in SAS/STAT 12.1 through SAS/STAT 13.2 due to the issue documented in Problem Note 59705: "The SURVEYSELECT procedure might produce an incorrect stratified sample when the RANUNI option is omitted".
In rare cases, if the preceding instructions fail to reproduce a sample from an earlier release, specify the following statement:
For additional information, see "Random Number Generation" in the Details section of the PROC SURVEYSELECT documentation.
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | SAS/STAT | z/OS | 12.1 | 9.3 TS1M2 | ||
Microsoft® Windows® for x64 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8 Enterprise 32-bit | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8 Enterprise x64 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8 Pro 32-bit | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8 Pro x64 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8.1 Enterprise 32-bit | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8.1 Enterprise x64 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8.1 Pro | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows 8.1 Pro 32-bit | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2003 Datacenter Edition | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2003 Enterprise Edition | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2003 Standard Edition | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2003 for x64 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2008 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2008 R2 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2008 for x64 | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2012 Datacenter | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2012 R2 Datacenter | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2012 R2 Std | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows Server 2012 Std | 12.1 | 9.3 TS1M2 | ||||
Microsoft Windows XP Professional | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Enterprise 32 bit | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Enterprise x64 | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Home Premium 32 bit | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Home Premium x64 | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Professional 32 bit | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Professional x64 | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Ultimate 32 bit | 12.1 | 9.3 TS1M2 | ||||
Windows 7 Ultimate x64 | 12.1 | 9.3 TS1M2 | ||||
Windows Vista | 12.1 | 9.3 TS1M2 | ||||
Windows Vista for x64 | 12.1 | 9.3 TS1M2 | ||||
64-bit Enabled AIX | 12.1 | 9.3 TS1M2 | ||||
64-bit Enabled HP-UX | 12.1 | 9.3 TS1M2 | ||||
64-bit Enabled Solaris | 12.1 | 9.3 TS1M2 | ||||
HP-UX IPF | 12.1 | 9.3 TS1M2 | ||||
Linux | 12.1 | 9.3 TS1M2 | ||||
Linux for x64 | 12.1 | 9.3 TS1M2 | ||||
Solaris for x64 | 12.1 | 9.3 TS1M2 |
Type: | Usage Note |
Priority: | |
Topic: | Analytics ==> Survey Sampling and Analysis SAS Reference ==> Procedures ==> SURVEYSELECT |
Date Modified: | 2023-02-17 14:32:32 |
Date Created: | 2014-07-14 10:24:23 |