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 (January 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 23 Jan 2008 08:07:05 +0800
Reply-To:     "Hu, Jiangtang" <jiangtanghu@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Hu, Jiangtang" <jiangtanghu@GMAIL.COM>
Subject:      Re: How to randomly select records from a large data set?
Comments: To: Melodyp <pearsonmelody@gmail.com>
In-Reply-To:  <4f856325-751b-406e-9f7d-e8c5fb9eeb02@s13g2000prd.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

data population; do id=1 to 8500; j=ranuni(123); output; end; run;

/*Random sampling without replacement*/

proc surveyselect data=population out=sample1 method=srs rep=1 sampsize=1000 seed=123; id id j; run;

/*Random sampling with replacement*/

proc surveyselect data=population out=sample2 method=urs rep=1 sampsize=1000 seed=123; id id j; run;

On Jan 22, 2008 4:47 AM, Melodyp <pearsonmelody@gmail.com> wrote:

> Hello! I have a question on how to select about 8500 records from a > nearly one million records dataset. > > The 8500 records must be randomly selected. > > Thank you in advance for your help. > > Melody >

-- Jiangtang Hu

Peking University


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