<?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 Re: proc surveyselect random sample in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-surveyselect-random-sample/m-p/821306#M324247</link>
    <description>&lt;P&gt;You need proportional allocation as done here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=Customers n=41000
                  out=SampleCust;
   strata BAND / alloc=prop ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jul 2022 15:59:54 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2022-07-01T15:59:54Z</dc:date>
    <item>
      <title>proc surveyselect random sample</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-surveyselect-random-sample/m-p/821296#M324244</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm looking to extract 41,000 accounts out of my 200,000 account dataset using random sampling. I want the random sampling to be done based on the proportions of my 'band' variable, which has the following distribution:&lt;/P&gt;
&lt;P&gt;0-&amp;lt;2441 makes up 15.63%&lt;/P&gt;
&lt;P&gt;2449-20001 makes up 80.04%&lt;/P&gt;
&lt;P&gt;200001-High makes up 4.33%&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please can someone tell me what code I could use to randomly get the 41,000 accounts I want based on the proportions (it's fine if the proportions are slightly different, as long as it equals 41,000 accounts)? In my example, the random sampling would mean about 6,150 in the 0-&amp;lt;2441 band, about 32,800 accounts in the&amp;nbsp;2449-20001 band, and about 1,640 accounts in the 200001-High band. I've seen proc surveyselect can be used (and I think proc sort of my accounts by 'band' might need to be done beforehand), but I'm not sure how to write the code to get what I require.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 15:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-surveyselect-random-sample/m-p/821296#M324244</guid>
      <dc:creator>Justin9</dc:creator>
      <dc:date>2022-07-01T15:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyselect random sample</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-surveyselect-random-sample/m-p/821306#M324247</link>
      <description>&lt;P&gt;You need proportional allocation as done here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=Customers n=41000
                  out=SampleCust;
   strata BAND / alloc=prop ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 15:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-surveyselect-random-sample/m-p/821306#M324247</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-07-01T15:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyselect random sample</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-surveyselect-random-sample/m-p/821316#M324251</link>
      <description>It worked, so thanks a lot for your code!</description>
      <pubDate>Fri, 01 Jul 2022 17:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-surveyselect-random-sample/m-p/821316#M324251</guid>
      <dc:creator>Justin9</dc:creator>
      <dc:date>2022-07-01T17:17:24Z</dc:date>
    </item>
  </channel>
</rss>

