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 (November 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 Nov 2008 12:18:42 -0600
Reply-To:     Joe Matise <snoopy369@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Matise <snoopy369@GMAIL.COM>
Subject:      Re: random number generator
Comments: To: "./ ADD NAME=Data _null_," <iebupdte@gmail.com>
In-Reply-To:  <ce1fb7450811111009l3238620av930d45e1c687d0ed@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I get the same result, by the way (WIN XP PRO)

NOTE: _N_=1 x=0.2438111604 NOTE: _N_=2 x=0.0894751135 NOTE: _N_=3 x=0.3831937143 NOTE: _N_=4 x=0.0979283946 NOTE: _N_=5 x=0.2575810865 NOTE: _N_=6 x=0.088249594 NOTE: _N_=7 x=0.0362996664 NOTE: _N_=8 x=0.1075859592 NOTE: _N_=9 x=0.4458283407 NOTE: _N_=10 x=0.1431246754

As far as I know, it works as NULL describes.

-Joe

On Tue, Nov 11, 2008 at 12:09 PM, ./ ADD NAME=Data _null_, < iebupdte@gmail.com> wrote:

> As I understand it the function always returns the same numbers given > the same seed. The PSEUDO random part. Below are two small sample > one on UNIX the other WINDOWS. That seems like pretty different > computer to me. You must have changed something else. Can you show > your work. > > UNIX: > > 8 data _null_; > 9 do _n_ = 1 to 10; > 10 x = ranuni(1234); > 11 put 'NOTE: ' _n_= x=; > 12 end; > 13 run; > > NOTE: _N_=1 x=0.2438111604 > NOTE: _N_=2 x=0.0894751135 > NOTE: _N_=3 x=0.3831937143 > NOTE: _N_=4 x=0.0979283946 > NOTE: _N_=5 x=0.2575810865 > NOTE: _N_=6 x=0.088249594 > NOTE: _N_=7 x=0.0362996664 > NOTE: _N_=8 x=0.1075859592 > NOTE: _N_=9 x=0.4458283407 > NOTE: _N_=10 x=0.1431246754 > > Windows: > 1996 data _null_; > 1997 do _n_ = 1 to 10; > 1998 x = ranuni(1234); > 1999 put 'NOTE: ' _n_= x=; > 2000 end; > 2001 run; > > NOTE: _N_=1 x=0.2438111604 > NOTE: _N_=2 x=0.0894751135 > NOTE: _N_=3 x=0.3831937143 > NOTE: _N_=4 x=0.0979283946 > NOTE: _N_=5 x=0.2575810865 > NOTE: _N_=6 x=0.088249594 > NOTE: _N_=7 x=0.0362996664 > NOTE: _N_=8 x=0.1075859592 > NOTE: _N_=9 x=0.4458283407 > NOTE: _N_=10 x=0.1431246754 > > > > On 11/11/08, Hoover, Dale <DHoover@barclaycardus.com> wrote: > > It was my impression that it did not matter what computer and the seed > > should produce the same ordering of random numbers every time. So in > > fact only random based on the choice of a seed. I used this previous > > and it was used in a segmentation scheme based on a seed that would not > > vary over time and hence the segmentation could be produced at any point > > in the future. > > > > Could something else in the code have changes. And more importantly do > > you call set a dataset variable to this number. Maybe the order of the > > dataset record is different from run to run.... > > > > Dale S. Hoover > > > > > > -----Original Message----- > > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of J > > Doyle > > Sent: Tuesday, November 11, 2008 12:45 PM > > To: SAS-L@LISTSERV.UGA.EDU > > Subject: random number generator > > > > I generate some random numbers in a sas program, > > randomi = ranuni(1234); > > > > using 1234 as the seed. Will the set of numbers differ if I run the > > program on two different computers? today, I can't seem to replicated > > the > > values from yesterday that I created on a different pc. That is the only > > explanation I can come up with, and would like to verify. > > > > thank you > > > > > > > > Barclays www.barclaycardus.com > > > > This e-mail and any files transmitted with it may contain confidential > and/or proprietary information. It is intended solely for the use of the > individual or entity who is the intended recipient. Unauthorized use of this > information is prohibited. If you have received this in error, please > contact the sender by replying to this message and delete this material from > any system it may be on. > > >


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