<?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: How to subset dataset from large SAS dataset with given conditions? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-subset-dataset-from-large-SAS-dataset-with-given/m-p/872375#M344663</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5431"&gt;@UPRETIGOPI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think a random sample using households as sampling units matches your description, except that only variable &lt;FONT face="courier new,courier"&gt;SERIALNO&lt;/FONT&gt;, but not&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Household_member&lt;/FONT&gt;, would play a special role in the sampling process.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=have
method=srs n=100 seed=2718 out=want;
cluster serialno;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 Apr 2023 20:36:10 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2023-04-26T20:36:10Z</dc:date>
    <item>
      <title>How to subset dataset from large SAS dataset with given conditions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subset-dataset-from-large-SAS-dataset-with-given/m-p/872360#M344656</link>
      <description>&lt;P&gt;I need to subset dataset for 100 households from a large SAS dataset to prepare input for execution of test cases.&amp;nbsp; &lt;BR /&gt;In order to identify a household on data file,&amp;nbsp; A household in datafile can be identified as all members of the household will &lt;BR /&gt;share the same SERIALNO.&amp;nbsp;All members of each selected household must be included in the subset data.&amp;nbsp; There are 50 variables in the dataset and ten thousands SE&lt;SPAN&gt;RIALNO but I needed to subset the dataset based on two variable SERIALNO and Household_member. Each SERIALNO represents one household and also Household_member. I just needed to create a subset of 100 households (SERIALNO) with Household_member included in it with rest of the variables in the dataset.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;In the example below, SERIALNO 20161 has household_number 1, 2, 3 and SERIALNO 20162 has 1 household_member and SERIALNO 20164 has household_number 1, 2, 3 and so on and some household_member are up to 15.&amp;nbsp;&lt;BR /&gt;Ho do I subset of 100 households with SERIALNO that includes household_members as described below? Please help with the SAS program code to subset this dataset&lt;/P&gt;
&lt;P&gt;SERIALNO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Household_member&lt;/P&gt;
&lt;P&gt;20161&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;BR /&gt;20161&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;20161&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;
&lt;P&gt;20162&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp;&lt;BR /&gt;20164&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp;&lt;BR /&gt;20164&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp;&lt;BR /&gt;20164&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 20:05:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subset-dataset-from-large-SAS-dataset-with-given/m-p/872360#M344656</guid>
      <dc:creator>UPRETIGOPI</dc:creator>
      <dc:date>2023-04-26T20:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset dataset from large SAS dataset with given conditions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-subset-dataset-from-large-SAS-dataset-with-given/m-p/872375#M344663</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5431"&gt;@UPRETIGOPI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think a random sample using households as sampling units matches your description, except that only variable &lt;FONT face="courier new,courier"&gt;SERIALNO&lt;/FONT&gt;, but not&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Household_member&lt;/FONT&gt;, would play a special role in the sampling process.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=have
method=srs n=100 seed=2718 out=want;
cluster serialno;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Apr 2023 20:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-subset-dataset-from-large-SAS-dataset-with-given/m-p/872375#M344663</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-04-26T20:36:10Z</dc:date>
    </item>
  </channel>
</rss>

