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 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 18 Apr 2008 13:30:33 -0400
Reply-To:     Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:      Re: anybody can help with this function?
Comments: To: AnoniDeer <irain168@gmail.com>
In-Reply-To:  <48ee5c4b-67ee-4097-86cb-6426379560d9@24g2000hsh.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Perhaps a simple example would help:

data test; do i=1 to 100; if ranuni(12371)>0.5 then y=1; else y=0; /* Only for purpose of showing random value and that same seed generates same series. */ x=ranuni(12371); put i= x= y= ; output; end; run;

The variable y should have about a value of 1 in about 50% of the rows of test. Nonetheless, each subsequent value of y in test has a ~50% chance of having a value or 0 instead of 1. S -----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of AnoniDeer Sent: Friday, April 18, 2008 12:05 PM To: sas-l@uga.edu Subject: anybody can help with this function?

Hi,

I am so confused with the function ranuni(), anybody can help?

Thanks


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