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 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 8 Nov 2006 14:40:45 -0600
Reply-To:     Yu Zhang <zhangyu05@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Yu Zhang <zhangyu05@GMAIL.COM>
Subject:      Re: what's wrong with my codes? please help!
In-Reply-To:  <1163017528.577491.81490@h54g2000cwb.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

It seems to me that your code is perfectly O.K. I couldn't replicate your problem with ur code.

data work.sample1; do i = 1 to 20; row_to_read = int(uniform(int(time()))*20+1); set sashelp.class point=row_to_read; output; end; stop; run;

On 11/8/06, Xuhong <zhuxuhong2000@gmail.com> wrote: > > Dear all, > I have a database with 2000 obeservations and what I need is to random > select 100 observations with replacement. But my codes could only > generate one observation. Could you help me find out my mistakes in my > codes below? Thanks very much! > > data work.sample1; > do i = 1 to 100; > row_to_read = int(uniform(int(time()))*2000+1); > set work.file > point = row_to_read; > output; > end; > stop; > run; >


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