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 (June 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 17 Jun 2011 11:48:56 -0500
Reply-To:   Joe Matise <snoopy369@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Joe Matise <snoopy369@GMAIL.COM>
Subject:   Re: Proc Surveyselect question regarding sample size for simple random sample
Comments:   To: Randall Powers <powers_r@bls.gov>
In-Reply-To:   <201106171646.p5HAlGNq014633@willow.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

Add SELECTALL to the surveyselect statement. That will tell it to take all records if it fails to meet its minimum.

-Joe

On Fri, Jun 17, 2011 at 11:46 AM, Randall Powers <powers_r@bls.gov> wrote:

> Hey Folks, > > I've got a dataset, let's call it sample1. I'd like to user proc > surveyselect to output a simple random sample into dataset sample2. > > I want the sample size to be the min (number of observation of sample1,100) > > Hence, n=100 if # observations>=100 or > n=#observations if n<100 > > What modfications do I need to make to my code below to pull this off? > > Thanks > > Randall > > > > > proc surveyselect data=sample1 method=srs n=100 out=sample2; > run; > proc print data=sample; > run; >


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