|
|||
|
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 size to use(http://support.sas.com/kb/ 23/759.html) that stop this problem from happening or to use the MINSIZE, MAXSIZE, CERTSIZE options (via a few SAS-L post from David Cassel). By toying with the CERTSIZE I got it to work, but the logic behind the MINSIZE and MAXSIZE escapes me. I just don't want the PROC to work by trial and error, I want to UNDERSTAND why it works and that's is where I am missing something. Hopefully, the SAS-Lers can help. 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 |
|
|
||||
|
||||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|