BookmarkSubscribeRSS Feed
SASdevAnneMarie
Barite | Level 11

Hello Experts,

 

Could you explain me please, what does mean normal(999) function.

Which seed is better to choose for the normal function?

 

Thank you!

 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

the NORMAL function is deprecated (that means it is an old function and best practice is that you should not use it any more) https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/p05tjojnyjll0zn1qq3xjl9aawl0.htm  The 999 was a "seed" that you could use to make the sequence of random numbers generated reproducible.

 

Better to use the rand('normal') function and CALL STREAMINIT() to specify a seed and make the random numbers reproducible.

 

--
Paige Miller
Rick_SAS
SAS Super FREQ

And regarding "which seed is better", they are all equivalent in the sense that a random sample from one seed has the same statistical properties as a random sample from another seed.  I have discussed this question in the article, "How to choose a seed for generating random numbers in SAS."

 

sbxkoenk
SAS Super FREQ

How to choose a seed for generating random numbers in SAS?

By Rick Wicklin on The DO Loop June 1, 2017

https://blogs.sas.com/content/iml/2017/06/01/choose-seed-random-number.html

 

It says ( amongst others )
A seed value specifies a particular stream from a set of possible random number streams. When you specify a seed, SAS generates the same set of pseudorandom numbers every time you run the program. However, there is no intrinsic reason to prefer one stream over another. The stream for seed=12345 is just as random as the stream for the nine-digit prime number 937162211.

 

BR, Koen

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 976 views
  • 8 likes
  • 4 in conversation