<?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 without replacement, create two data sets in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Sampling-without-replacement-create-two-data-sets/m-p/443554#M13691</link>
    <description>&lt;P&gt;Beginning with SAS 9.4 Proc Surveyselect allows you to directly create both data sets.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/36/383.html" target="_blank"&gt;http://support.sas.com/kb/36/383.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you haven't a SAS license which gives you access to Proc Surveyselect: There is also a data step approach possible. Just amend the code in Method 3 under this link &lt;A href="http://support.sas.com/kb/24/722.html" target="_blank"&gt;http://support.sas.com/kb/24/722.html&lt;/A&gt; to write non selected rows to another table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 23:32:53 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-03-07T23:32:53Z</dc:date>
    <item>
      <title>Sampling without replacement, create two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Sampling-without-replacement-create-two-data-sets/m-p/443420#M13687</link>
      <description>&lt;P&gt;I have this data set A with N=100. I want to create a data set B with N=75 through simple random sampling without replacement and the remaining 25 should be data set C.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Sampling-without-replacement-create-two-data-sets/m-p/443420#M13687</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2018-03-07T17:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling without replacement, create two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Sampling-without-replacement-create-two-data-sets/m-p/443426#M13688</link>
      <description>&lt;PRE&gt;proc surveyselect data=have out=sampled 
     sampsize=75 outall;
run;&lt;/PRE&gt;
&lt;P&gt;will create a data set sampled with all of the records from the have set and a variable Selected to indicate whether it was selected for the 75 or not. If you want a percentage of records then use SAMPRATE instead of SAMPSIZE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really need to split the data then a separate data step&lt;/P&gt;
&lt;PRE&gt;data samp75 samp25;
  set sampled;
  if selected then output samp75;
  else output samp25;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Sampling-without-replacement-create-two-data-sets/m-p/443426#M13688</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-07T17:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling without replacement, create two data sets</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Sampling-without-replacement-create-two-data-sets/m-p/443554#M13691</link>
      <description>&lt;P&gt;Beginning with SAS 9.4 Proc Surveyselect allows you to directly create both data sets.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/36/383.html" target="_blank"&gt;http://support.sas.com/kb/36/383.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you haven't a SAS license which gives you access to Proc Surveyselect: There is also a data step approach possible. Just amend the code in Method 3 under this link &lt;A href="http://support.sas.com/kb/24/722.html" target="_blank"&gt;http://support.sas.com/kb/24/722.html&lt;/A&gt; to write non selected rows to another table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 23:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Sampling-without-replacement-create-two-data-sets/m-p/443554#M13691</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-03-07T23:32:53Z</dc:date>
    </item>
  </channel>
</rss>

