Programming the statistical procedures from SAS

PPS Sampling Error

Reply
Frequent Contributor
Posts: 139

PPS Sampling Error


Hello All,

I am working on a project where we need to sample some items in a warehouse with the higher dollar items having a higher chance of being picked.  When I ran the data through PROC SURVEYSELECT METHOD=PPS I get the following error  "the relatize size of each sampling unit must not exceed 1/sampsize.

If I redued the sample size to 7 this error goes away, unfortunately I need a sample size of 37.

After soon searching, i found some posts on SAS-L and sas.support to find the maximum sample use that stop this problem from happening or to use the MINSIZE, MAXSIZE, CERTSIZE options.  By toying with the CERTSIZE I got it to work, but the logic behind the MINSIZE and MAXSIZE escape me.

I created a test data set that is fairly representitive of what my inventory data looks like.  For some reason I can't paste my code in here so I hope I make no typos

data one;

  do id=1 to 183;

    lag_value=value;

   if id le 1 then value=id;

     else value=lag_value*1.05;

   lag_value=lag(value);

   output;

  end;

run;

* this outputs as error;

proc surveyselect data=one method=pps seed=6845 n=37 out=sample_one;

  size value;

run;

By using n=20 the error goes away;

Any guidance on using MINSIZE or MAXSIZE would be appreciated.

-Darryl

Ask a Question
Discussion stats
  • 0 replies
  • 276 views
  • 0 likes
  • 1 in conversation