Date: Thu, 9 Mar 2000 16:47:22 -0500
Reply-To: "Thomas J. Sullivan" <tomsNIXSPAM@RAND.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Thomas J. Sullivan" <tomsNIXSPAM@RAND.ORG>
Organization: RAND
Subject: Re: Select A Group of Random Records
Content-Type: text/plain; charset=us-ascii
correction, the proc rank statement should read (note the addition of
the 'var' line and the spelling of 'ranks' (with an 's'));:
proc rank data=nelson out=ranknels;
by area type;
var rand_num;
ranks myrank;
run;
Nelson Harrison wrote:
> I have a dataset that contains service orders for all of Ontario.
> Ontario is broken up into zones and there is 5 different types of
> service orders.
>
> What I need to do is select randomly 10-20 records for each type of
> service order for each area. For example, 10-20
> 'vvvv','wwww','xxxx','yyyy','zzzz' records for every area (approx 30
> areas).
>
> Dataset looks like the following
>
> Service
> Order # Type Area
> 123456 xxxx 1
> 234567 yyyy 2
> 345678 vvvv 2
> 456789 zzzz 3
> 567890 wwww 4
>
> etc. approx 3-4,000 records
>
> Thanks
>
> Nelson
--
Thomas J. Sullivan
RAND Corporation
1333 H Street, NW, Suite 800
Washington, DC 20005-4707
Phone: (202) 296-5000, x. 5343
http://www.rand.org
|