<?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: Proc Survey Select (Iterative Seed) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442612#M110692</link>
    <description>&lt;P&gt;You might want to investigate the REPS = (replicate) which will select n number of samples of your SAMPSIZE and add a variable Replicate to indicate which.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then either split the set on the replicate variable (not best practice) or do some analysis using BY Replicate to see the behavior of the different samples.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Mar 2018 20:15:33 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-03-05T20:15:33Z</dc:date>
    <item>
      <title>Proc Survey Select (Iterative Seed)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442450#M110682</link>
      <description>&lt;P&gt;Hi everyone, I desperately need some assistance, my head is now spinning.&amp;nbsp; What I am trying to accomplish should not be that difficult.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data TestB;&lt;BR /&gt;set Factor1;&lt;BR /&gt;proc surveyselect data=TestB out=subsetB method=srs sampsize=25 seed=123 noprint;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to select 200 different samples of 25 in a loop and I want seed to increment by 1....so on the first iteration it will be 123, the next will be 124, etc.....I have tried everything but when I try to set a variable such as&lt;/P&gt;&lt;P&gt;%let SeedA=123&amp;nbsp; then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SeedA=123+&amp;amp;s ......s is the loop variable and I make ......seed=&amp;amp;SeedA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it does not work.......any suggestions at this point would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 17:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442450#M110682</guid>
      <dc:creator>keithDwright</dc:creator>
      <dc:date>2018-03-05T17:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Survey Select (Iterative Seed)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442458#M110683</link>
      <description>&lt;P&gt;I have to ask why? Why is it important that the procedure uses exactly those seeds?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 18:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442458#M110683</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-03-05T18:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Survey Select (Iterative Seed)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442479#M110688</link>
      <description>&lt;P&gt;Hi draycut, that was just an example, I just need the seed to change each time for 200 replications that is in a macro&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 19:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442479#M110688</guid>
      <dc:creator>keithDwright</dc:creator>
      <dc:date>2018-03-05T19:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Survey Select (Iterative Seed)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442480#M110689</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I think I need to be more specific, I have both of these in my do loop over 200 replications....I need for the TestA datasets from 1-200 to be different for TestB datasets.....so I cannot use the same do....loop index such as...... seed=&amp;amp;s&amp;nbsp; .....my code below works great for (1) replication, but I need 200 each with different seed numbers....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data TestA;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set Factor1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;proc surveyselect data=TestA out=subsetA method=srs sampsize=25 seed=123 noprint;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data TestB;&lt;BR /&gt;set Factor1;&lt;BR /&gt;proc surveyselect data=TestB out=subsetB method=srs sampsize=25 seed=125 noprint;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 19:13:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442480#M110689</guid>
      <dc:creator>keithDwright</dc:creator>
      <dc:date>2018-03-05T19:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Survey Select (Iterative Seed)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442612#M110692</link>
      <description>&lt;P&gt;You might want to investigate the REPS = (replicate) which will select n number of samples of your SAMPSIZE and add a variable Replicate to indicate which.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then either split the set on the replicate variable (not best practice) or do some analysis using BY Replicate to see the behavior of the different samples.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 20:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442612#M110692</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-05T20:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Survey Select (Iterative Seed)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442653#M110708</link>
      <description>&lt;P&gt;Hi ballardw, thank you!&amp;nbsp; I was trying to avoid using the replicate options because I would have to change some of my other logic, but this worked out great......I used the reps=200.....and then in a do...loop over 200 replications create the 200 datasets I needed to output.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data TestA;&lt;BR /&gt;set Factor1;&lt;BR /&gt;proc surveyselect data=TestA out=subsetA method=srs reps=200 seed=1257 sampsize=25 noprint;&lt;BR /&gt;PROC MEANS N MEAN STD SKEWNESS KURTOSIS; VAR T A;/*PROC CORR; VAR T A;*/&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%do s=1 %to 200; /*START 200 SIMULATIONS*/&lt;/P&gt;&lt;P&gt;data simA&amp;amp;s;&lt;BR /&gt;set subsetA;&lt;BR /&gt;where Replicate=&amp;amp;s;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 23:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Survey-Select-Iterative-Seed/m-p/442653#M110708</guid>
      <dc:creator>keithDwright</dc:creator>
      <dc:date>2018-03-05T23:00:25Z</dc:date>
    </item>
  </channel>
</rss>

