BookmarkSubscribeRSS Feed
s_chanon
Calcite | Level 5
Hello ^^

I'm new for this program, SAS. But for some reason I have to work with this, I have 2 big questions (seems big problem to me too) here ...

1. Is it possible to generate random numbers from a specific distribution (such as a normal or something els)
2. How can I generate set of random numbers with specific range such as 1 - 9.

Thank you for you comment and sorry about my broken english.
3 REPLIES 3
Peter_C
Rhodochrosite | Level 12
what would you imagine?
a RAND function, to provide a random number from the distribution you define?
Read the online-doc here
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001466748.htm
at the reference documentation for
RAND Function
Generates random numbers from a distribution that you specify.


You'll find much useful information in the http://support.sas.com website

2
to generate a uniformly distributed random number between 0 and 1
R01 = rand( 'uniform') ;
or, for a uniformly random integer between 0 and 9
R09 = int( 10 * rand( 'uniform' ) ) ;
s_chanon
Calcite | Level 5
Thanks so much, this is very helpful ^^

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1001 views
  • 1 like
  • 3 in conversation