<?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: Sampling in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/418166#M280397</link>
    <description>&lt;P&gt;I do want to oversample as a 1:1 ratio.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Dec 2017 14:50:31 GMT</pubDate>
    <dc:creator>Sth19</dc:creator>
    <dc:date>2017-12-04T14:50:31Z</dc:date>
    <item>
      <title>Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417866#M280391</link>
      <description>&lt;P&gt;I&amp;nbsp;am working on a predictive model with a&amp;nbsp;sample size of about 430K, of which the target is binary.&amp;nbsp; The rare event (1) has about 1000 samples.&amp;nbsp;I need to come up with a way so that the ratio is about 50%. Currently I only have access to SAS Enterprise Guide.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are some recommendations on how to handle this with sample code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 21:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417866#M280391</guid>
      <dc:creator>Sth19</dc:creator>
      <dc:date>2017-12-01T21:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417868#M280392</link>
      <description>&lt;P&gt;Which Task/Proc are you using? I'm assuming Logistic regression but depends partially on your variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you define your model/proc you can find full examples in the SAS documentation for that procedure.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 21:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417868#M280392</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-01T21:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417878#M280394</link>
      <description>&lt;P&gt;Use proc surveyselect, stratify by your target variable, and&amp;nbsp;request sampling rates of 1 and 1/430 for your target and non target strata, respectively.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 22:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417878#M280394</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-12-01T22:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417879#M280395</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Use proc surveyselect, stratify by your target variable, and&amp;nbsp;request sampling rates of 1 and 1/430 for your target and non target strata, respectively.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or instead of sample rate you can specify an exact sample size. If you request 100 from reach strata your sample will be half of one and half of the other.&lt;/P&gt;
&lt;P&gt;It is helpful to know that Surveyselect will provide both the selection probability and the sampling weight for each record.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 22:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417879#M280395</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-01T22:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417931#M280396</link>
      <description>&lt;P&gt;You want oversample as ratio 1:1 ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
 set sashelp.class;
run;
proc sort data=class;
by sex;
run;
proc surveyselect data=class out=want sampsize=(5 5) seed=12345678;
strata sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Dec 2017 10:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/417931#M280396</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-12-02T10:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/418166#M280397</link>
      <description>&lt;P&gt;I do want to oversample as a 1:1 ratio.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 14:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sampling/m-p/418166#M280397</guid>
      <dc:creator>Sth19</dc:creator>
      <dc:date>2017-12-04T14:50:31Z</dc:date>
    </item>
  </channel>
</rss>

