BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DCL
Obsidian | Level 7 DCL
Obsidian | Level 7

Hi,

 

Ever since I migrated to a new SAS server, i notice that random number generation for a seed value [334766080] gets different in this new server.

Code

data A(drop=i);

call streaminit(334766080);

do i = 1 to 5;

x123 = rand("uniform"); output;

end;

run;

 

Results In OLD server

    x123

0.7852188905
0.1264403092
0.5529167121
0.8073481501
0.3563103683

 

Results in NEW Server

    x123

0.9406947785
0.9712292252
0.0413521428
0.5594002416
0.1823783112

 

 

Seed value is exactly the same. Is there something else which affects the random number generation process? 

 

Thanks in advance!

Dilip

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
DCL
Obsidian | Level 7 DCL
Obsidian | Level 7

It seems that there is a change in random number generation from SAS/STAT14.1

 

https://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_whatsnew_se...

 

When I added following option, I get old results 🙂

OPTIONS SET=SAS_RNG_METHOD=MT1998;

 

Thanks,
Dilip

View solution in original post

4 REPLIES 4
Kurt_Bremser
Super User

What is the difference between your "OLD" and "NEW" server?

 

A test with SAS 9.4 TS1M2 on AIX gave me your "OLD" results; a test with 9.2 on the same platform also.

DCL
Obsidian | Level 7 DCL
Obsidian | Level 7

Hi Kurt,

 

Sorry- i forgot to mention that.

 

OLD server= SAS9.3

New Server= 9.4 (TS1M3 MBCS3170)

 

Thanks,
Dilip

 

DCL
Obsidian | Level 7 DCL
Obsidian | Level 7

It seems that there is a change in random number generation from SAS/STAT14.1

 

https://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_whatsnew_se...

 

When I added following option, I get old results 🙂

OPTIONS SET=SAS_RNG_METHOD=MT1998;

 

Thanks,
Dilip

Kurt_Bremser
Super User

Since it does seem to affect not only certain SAS/STAT procedures, but the random function in Base SAS, this is good to know.

 

It also explains why I got the "old" numbers. Our SAS/STAT is at 13.2.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

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.

Discussion stats
  • 4 replies
  • 1760 views
  • 1 like
  • 2 in conversation