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;
|