Date: Mon, 11 Jun 2001 10:42:41 +0100
Reply-To: jixian wang <jixian@MEMO.DUNDEE.AC.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: jixian wang <jixian@MEMO.DUNDEE.AC.UK>
Subject: Re: Random Sample
Content-Type: text/plain
Just add another simple solution:
proc surveyselect data=datain
seed=12345 out=dataout samprate=0.49 method=srs;
run;
Please note this proc is not available in V6.
Jason
> -----Original Message-----
> From: Yue Ying Lau [SMTP:ylau1@LINUX2.GL.UMBC.EDU]
> Sent: 08 June 2001 16:40
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: Random Sample
>
> Xiaoyuan, thank you very much for your suggestion. The problem I have is,
> the input dataset is generated from previous step, how can I pass the
> "number of records" into the proc plan?
>
> Thanks.
>
> Anna.
>
> Xiaoyuan <zhux@flcourts.org> wrote:
> : Hi,
> : Please try this simple way. You can get different sample every time.
> : *********************************************************************
> : proc plan;
> : factors x=980 of 2000;***Seeds come from 49% of your observations;
> : output out=number;
> : run;
> : data outfile; set "your import set" ;
> : y=_n_;
> : run;
> : proc sql;
> : create table sample as
> : select *
> : from number, outfile
> : where number.x=outfile.y;
> : quit;
> : data sample (drop=x y); set sample;
> : run;
> :
> *************************************************************************
> : Xiaoyuan
> : Florida Supreme Court
>
> --
|