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 (March 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


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