<?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 a dataset without replacement. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148356#M39230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please give some example of output datasets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Oct 2014 08:55:20 GMT</pubDate>
    <dc:creator>RaviKommuri</dc:creator>
    <dc:date>2014-10-30T08:55:20Z</dc:date>
    <item>
      <title>Sampling a dataset without replacement.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148355#M39229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a small dataset ( ~2000 obs) and ~20 vars of which the var X is really crucial. Var x has values ( a and b ) such that a:b =6:4. I want to create two samples ( 1800 Obs and 200 obs) of this dataset such that in final datasets it keeps the ratio of a &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt; in var x same (6:4). How shall i do that. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 20:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148355#M39229</guid>
      <dc:creator>RJ99</dc:creator>
      <dc:date>2014-10-29T20:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling a dataset without replacement.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148356#M39230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please give some example of output datasets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 08:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148356#M39230</guid>
      <dc:creator>RaviKommuri</dc:creator>
      <dc:date>2014-10-30T08:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling a dataset without replacement.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148357#M39231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Separate the original dataset into two, one for x=a and the other for x=b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From x=a data set sample 1080 (60% of 1800) and 120 (60% of 200).&amp;nbsp; Do analogously for x=b data set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join the two subset to get the final file of 1800.&amp;nbsp; Ditto for 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do a sample without replacement, I will often add a variable to the data generated with ranuni (or one of the other random number generators in SAS), sort on that variable and then just do a DATA step to sequentially pull the samples.&amp;nbsp; You should also be able to do this with PROC SURVEYSELECT, but I like the simplicity in interpretation of the DATA step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 13:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148357#M39231</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2014-10-30T13:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling a dataset without replacement.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148358#M39232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For more details on Doc's advice, see the article &lt;A href="http://blogs.sas.com/content/iml/2014/02/03/sample-without-replacement/" title="http://blogs.sas.com/content/iml/2014/02/03/sample-without-replacement/"&gt;&amp;nbsp; Sample without replacement in SAS - The DO Loop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 14:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148358#M39232</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-10-30T14:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sampling a dataset without replacement.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148359#M39233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Doc@Duke and Rick. It is really helpful. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 18:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Sampling-a-dataset-without-replacement/m-p/148359#M39233</guid>
      <dc:creator>RJ99</dc:creator>
      <dc:date>2014-10-30T18:38:39Z</dc:date>
    </item>
  </channel>
</rss>

