Date: Mon, 12 Feb 2007 07:41:25 -0800
Reply-To: Syb it <sas_datalover@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Syb it <sas_datalover@YAHOO.COM>
Subject: Re: Sampling in SAS
In-Reply-To: <7367b4e20702120730s32482d66oa956763f3b62939f@mail.gmail.com>
Content-Type: text/plain; charset=iso-8859-1
Data_null:
Questions:
1) Can this be done in Proc SQL?
and in your code below:
2) do I = 1 to 2e3; Is 2e3 the maximum number of records in my original data?
3) and that seed number? What exactly is it?
Thanks,
"data _null_;" <datanull@gmail.com> wrote:
SURVEYSELECT is a good choice if you have SAS/STAT software.
data work.aFewThousand;
do I = 1 to 2e3;
output;
end;
run;
proc surveyselect
seed = 205872001 /* use a different number */
method = srs /* Simple Random Sampling */
data = work.afewthousand
out = work.OneHundred
n = 100
;
run;
proc print;
run;
On 2/12/07, Syb it wrote:
> How does one generate a random sample in SAS? LEts say you had a couple thousand observations but one only wanted 100 randomly selected from the bigger database? Any clues?
>
>
> ---------------------------------
> 8:00? 8:25? 8:40? Find a flick in no time
> with theYahoo! Search movie showtime shortcut.
>
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.