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