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?
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