<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Easy question on Proc Surveyselect in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Easy-question-on-Proc-Surveyselect/m-p/32204#M7726</link>
    <description>Hello everyone,&lt;BR /&gt;
&lt;BR /&gt;
I have a dataset like:&lt;BR /&gt;
&lt;BR /&gt;
MD#             Volume&lt;BR /&gt;
1                     333&lt;BR /&gt;
2                     22&lt;BR /&gt;
3                     10&lt;BR /&gt;
4                     150&lt;BR /&gt;
5                     250&lt;BR /&gt;
6                     60&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
&lt;BR /&gt;
I want to randomly select MD, also weighted by Volume, giving high volume ones a higher chance to be selected. &lt;BR /&gt;
I know there is a SIZE statement I can use as weighting function, but this statement can't be used for Simple Random Selection. &lt;BR /&gt;
I wonder if anyone can tell me what other options I can use. &lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot,&lt;BR /&gt;
&lt;BR /&gt;
SAS User999</description>
    <pubDate>Thu, 17 Jul 2008 20:44:17 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-07-17T20:44:17Z</dc:date>
    <item>
      <title>Easy question on Proc Surveyselect</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Easy-question-on-Proc-Surveyselect/m-p/32204#M7726</link>
      <description>Hello everyone,&lt;BR /&gt;
&lt;BR /&gt;
I have a dataset like:&lt;BR /&gt;
&lt;BR /&gt;
MD#             Volume&lt;BR /&gt;
1                     333&lt;BR /&gt;
2                     22&lt;BR /&gt;
3                     10&lt;BR /&gt;
4                     150&lt;BR /&gt;
5                     250&lt;BR /&gt;
6                     60&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
&lt;BR /&gt;
I want to randomly select MD, also weighted by Volume, giving high volume ones a higher chance to be selected. &lt;BR /&gt;
I know there is a SIZE statement I can use as weighting function, but this statement can't be used for Simple Random Selection. &lt;BR /&gt;
I wonder if anyone can tell me what other options I can use. &lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot,&lt;BR /&gt;
&lt;BR /&gt;
SAS User999</description>
      <pubDate>Thu, 17 Jul 2008 20:44:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Easy-question-on-Proc-Surveyselect/m-p/32204#M7726</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-17T20:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Easy question on Proc Surveyselect</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Easy-question-on-Proc-Surveyselect/m-p/32205#M7727</link>
      <description>Hello.&lt;BR /&gt;
You have to add METHOD=PPS to the PROC SURVEYSELECT statement. PPS is the equivalent of simple random with weights. And use the SIZE statement.&lt;BR /&gt;
[pre]&lt;BR /&gt;
PROC SURVEYSELECT DATA=in &lt;BR /&gt;
                   OUT=sample&lt;BR /&gt;
                METHOD=pps&lt;BR /&gt;
              SAMPRATE=rate &lt;BR /&gt;
              NOPRINT ;&lt;BR /&gt;
  SIZE volume ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Regards.&lt;BR /&gt;
Olivier</description>
      <pubDate>Fri, 18 Jul 2008 04:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Easy-question-on-Proc-Surveyselect/m-p/32205#M7727</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-07-18T04:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Easy question on Proc Surveyselect</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Easy-question-on-Proc-Surveyselect/m-p/32206#M7728</link>
      <description>Thanks a lot, I tried this before. Here I need to use sampsize statement instead of samprate. PPS has a limitation on sampling size, which depends on relative size of weights variable. &lt;BR /&gt;
&lt;BR /&gt;
Thank you again for the help</description>
      <pubDate>Fri, 18 Jul 2008 15:49:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Easy-question-on-Proc-Surveyselect/m-p/32206#M7728</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-18T15:49:44Z</dc:date>
    </item>
  </channel>
</rss>

