<?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 Creating a sample design file for SURVEYSELECT in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-sample-design-file-for-SURVEYSELECT/m-p/460896#M70325</link>
    <description>&lt;P&gt;NOTE that if Sample design file contains 0 for sampling rate of cells 6 and 8 these cells will not be in the output dataset.&lt;BR /&gt; I see 2 options:&lt;BR /&gt; 1. Reset variable values, like I did for Spring segmentation but for ALL relevant sampling vars, in a separate data step.&lt;BR /&gt; 2. Rejoin these records into the final file in a separate data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MY QUESTION IS: Is there a 3rd option?&amp;nbsp; Is there a way to indicate that I am NOT sampling from cells 6 and 8 and yet want all records from cells 6 and 8 to be included in the ouput dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[I am using EG 7.1x connecting to an AIX 64 unix server with SAS 9.4 installed and SAS STAT v.??? (installed at same time as SAS 9.4)]&lt;BR /&gt;&lt;BR /&gt;DATA SMPLDESIGN_&amp;amp;SSN.&amp;amp;SFY._&amp;amp;RD0 ;&lt;BR /&gt; INFILE DATALINES DELIMITER="," ;&lt;BR /&gt; INPUT BRAND $4. CELL _RATE_ ;&lt;BR /&gt; DATALINES ;&lt;BR /&gt;HAND,1,0.10&lt;BR /&gt;HAND,2,0.07&lt;BR /&gt;HAND,3,0.07&lt;BR /&gt;HAND,4,0.05&lt;BR /&gt;HAND,5,0.10&lt;BR /&gt;HAND,6,0.0&lt;BR /&gt;HAND,7,0.07&lt;BR /&gt;HAND,8,0.0&lt;BR /&gt;HAND,9,0.05&lt;BR /&gt;HAND,10,0.07&lt;BR /&gt;HAND,11,0.05&lt;BR /&gt;HAND,12,0.05&lt;BR /&gt;HAND,13,0.10&lt;BR /&gt;HAND,14,0.10&lt;BR /&gt;HAND,15,0.07&lt;BR /&gt;HAND,16,0.05&lt;BR /&gt;;&lt;BR /&gt;RUN ;&lt;/P&gt;</description>
    <pubDate>Wed, 09 May 2018 01:25:52 GMT</pubDate>
    <dc:creator>bbenbaruch</dc:creator>
    <dc:date>2018-05-09T01:25:52Z</dc:date>
    <item>
      <title>Creating a sample design file for SURVEYSELECT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-sample-design-file-for-SURVEYSELECT/m-p/460896#M70325</link>
      <description>&lt;P&gt;NOTE that if Sample design file contains 0 for sampling rate of cells 6 and 8 these cells will not be in the output dataset.&lt;BR /&gt; I see 2 options:&lt;BR /&gt; 1. Reset variable values, like I did for Spring segmentation but for ALL relevant sampling vars, in a separate data step.&lt;BR /&gt; 2. Rejoin these records into the final file in a separate data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MY QUESTION IS: Is there a 3rd option?&amp;nbsp; Is there a way to indicate that I am NOT sampling from cells 6 and 8 and yet want all records from cells 6 and 8 to be included in the ouput dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[I am using EG 7.1x connecting to an AIX 64 unix server with SAS 9.4 installed and SAS STAT v.??? (installed at same time as SAS 9.4)]&lt;BR /&gt;&lt;BR /&gt;DATA SMPLDESIGN_&amp;amp;SSN.&amp;amp;SFY._&amp;amp;RD0 ;&lt;BR /&gt; INFILE DATALINES DELIMITER="," ;&lt;BR /&gt; INPUT BRAND $4. CELL _RATE_ ;&lt;BR /&gt; DATALINES ;&lt;BR /&gt;HAND,1,0.10&lt;BR /&gt;HAND,2,0.07&lt;BR /&gt;HAND,3,0.07&lt;BR /&gt;HAND,4,0.05&lt;BR /&gt;HAND,5,0.10&lt;BR /&gt;HAND,6,0.0&lt;BR /&gt;HAND,7,0.07&lt;BR /&gt;HAND,8,0.0&lt;BR /&gt;HAND,9,0.05&lt;BR /&gt;HAND,10,0.07&lt;BR /&gt;HAND,11,0.05&lt;BR /&gt;HAND,12,0.05&lt;BR /&gt;HAND,13,0.10&lt;BR /&gt;HAND,14,0.10&lt;BR /&gt;HAND,15,0.07&lt;BR /&gt;HAND,16,0.05&lt;BR /&gt;;&lt;BR /&gt;RUN ;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 01:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-sample-design-file-for-SURVEYSELECT/m-p/460896#M70325</guid>
      <dc:creator>bbenbaruch</dc:creator>
      <dc:date>2018-05-09T01:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a sample design file for SURVEYSELECT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-sample-design-file-for-SURVEYSELECT/m-p/460917#M70326</link>
      <description>&lt;P&gt;You could always use a trick like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class; by age; run;

data ss;
input age _rate_;
datalines;
11 50
12 50
13 50
14 0.00001
15 50
16 0.00001
;

proc surveyselect data=class samprate=ss out=temp outall outsize;
strata age;
run;

data sample;
set temp;
if SamplingRate &amp;lt; 0.0001 then Selected = 0;
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 May 2018 05:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-sample-design-file-for-SURVEYSELECT/m-p/460917#M70326</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-05-09T05:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a sample design file for SURVEYSELECT</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-sample-design-file-for-SURVEYSELECT/m-p/461109#M70335</link>
      <description>&lt;P&gt;This may in fact be&amp;nbsp;a good "work-around" solution,&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would think that the "better" "work-around solution" would be to allow for the exclusion of strata with no sample selected in the PROC SURVEYSELECT output dataset and then merge these records back in.&amp;nbsp; Just as many steps -- but no danger of misleading values for sample-weights and selection probabilities in the final dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However,&amp;nbsp;I was hoping for a "real" solution that requires neither "gerrymandering" the data with an additional data step or&amp;nbsp;having to merge unsampled strata back in.&amp;nbsp; I guess maybe I will just have to go away singing&amp;nbsp;"You can't always get what you want."&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 16:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-sample-design-file-for-SURVEYSELECT/m-p/461109#M70335</guid>
      <dc:creator>bbenbaruch</dc:creator>
      <dc:date>2018-05-09T16:22:16Z</dc:date>
    </item>
  </channel>
</rss>

