LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) 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 12:46:35 -0400
Reply-To:     Randall Powers <powers_r@BLS.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Randall Powers <powers_r@BLS.GOV>
Subject:      Proc Surveyselect question regarding sample size for simple
              random sample

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