LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 17 Apr 2007 07:35:00 -0500
Reply-To:     "Huang, JS" <Huang.JS@PRINCIPAL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Huang, JS" <Huang.JS@PRINCIPAL.COM>
Subject:      Re: What is the difference between UNIFORM and RANUNI?
Comments: To: Kevin Qin <sas.runner@GMAIL.COM>
In-Reply-To:  A<>
Content-Type: text/plain; charset="windows-1255"


The following coding and its result seems to suggest they are simply two different names performing the same function. The same seed generating identical 100000 values.

%let seed=12345; data SetUniform; do i=1 to 1e5; a=uniform(&seed); output; end; run;

data SetRanuni; do i=1 to 1e5; a=ranuni(&seed); output; end; run;

proc sql; select max(U.a-R.a)*100000 as MaximumDifferenceX100000 from SetUniform U join SetRanuni R on U.i eq R.i; quit;

***** Output ***** The SAS System 07:17 Tuesday, April 17, 2007 8

Maximum Difference X100000 ャャャャャャ 0 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kevin Qin Sent: Tuesday, April 17, 2007 4:11 AM To: SAS-L@LISTSERV.UGA.EDU Subject: What is the difference between UNIFORM and RANUNI?

Hi All, I find that in SAS Online Help Doc, both have the identical purpose "Returns a random variate from a uniform distribution" and syntax.

>From many SAS code samples, I know that ranuni is popular. But why? I can not see any difference between them. I searched on SAS-L but found no answer.

Would you please help me out? Thanks in advance.

Kevin Qin

-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.

Back to: Top of message | Previous page | Main SAS-L page