<?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 SURVEYSELECT Replicates in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYSELECT-Replicates/m-p/70959#M3441</link>
    <description>These statements should answer your question.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300 method=srs&lt;BR /&gt;
   out=sample_data_rep1 seed=8 rep=1;; &lt;BR /&gt;
   run;&lt;BR /&gt;
%put _global_;&lt;BR /&gt;
&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300 method=srs&lt;BR /&gt;
   out=sample_data_rep2 seed=&amp;amp;SYSRANEND rep=1; &lt;BR /&gt;
   run;&lt;BR /&gt;
data sample_data_repA;&lt;BR /&gt;
   set sample_data_rep1 sample_data_rep2(in=in2);&lt;BR /&gt;
   if in2 then replicate=2;&lt;BR /&gt;
   run;&lt;BR /&gt;
%put _global_;&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300 method=srs&lt;BR /&gt;
   out=sample_data_repB seed=8 rep=2; &lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
proc compare base=sample_data_repA compare=sample_data_repB;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Thu, 10 Feb 2011 18:12:47 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2011-02-10T18:12:47Z</dc:date>
    <item>
      <title>PROC SURVEYSELECT Replicates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYSELECT-Replicates/m-p/70958#M3440</link>
      <description>Hello All&lt;BR /&gt;
&lt;BR /&gt;
I am trying to run some sampling simulation and found an option in PROC SURVEYSELECT rep=nrep that would let me round repeated samples of a universe.&lt;BR /&gt;
&lt;BR /&gt;
If my seed is fixed how does PROC SURVEYSELECT get the "seed" for the replicates.  My example below compares the REP option vs a MACRO loop.  For the proc surveyselect with replicate=1 has the same sample output as the macro loop 1 (just as expected).&lt;BR /&gt;
&lt;BR /&gt;
I used to have a macro loop through proc surveyselect for repeated samples, but with the REP option PROC SURVEYSELECT is much faster.&lt;BR /&gt;
&lt;BR /&gt;
Any advice?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300  method=srs&lt;BR /&gt;
  out=sample_data_rep seed=8 rep=100; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
** vs;&lt;BR /&gt;
%macro loopit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%do i=1 %to 100;&lt;BR /&gt;
&lt;BR /&gt;
%let seed=%eval(7+&amp;amp;i);&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300  method=srs&lt;BR /&gt;
  out=sample_data&amp;amp;i seed=&amp;amp;SEED; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc append base=sample_data_macro data=sample_data&amp;amp;i;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%end;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%mend loopit;&lt;BR /&gt;
%loopit;&lt;BR /&gt;
&lt;BR /&gt;
proc compare data=sample_data_rep compare=sample_data_macro;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Darryl</description>
      <pubDate>Thu, 10 Feb 2011 14:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYSELECT-Replicates/m-p/70958#M3440</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2011-02-10T14:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT Replicates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYSELECT-Replicates/m-p/70959#M3441</link>
      <description>These statements should answer your question.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300 method=srs&lt;BR /&gt;
   out=sample_data_rep1 seed=8 rep=1;; &lt;BR /&gt;
   run;&lt;BR /&gt;
%put _global_;&lt;BR /&gt;
&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300 method=srs&lt;BR /&gt;
   out=sample_data_rep2 seed=&amp;amp;SYSRANEND rep=1; &lt;BR /&gt;
   run;&lt;BR /&gt;
data sample_data_repA;&lt;BR /&gt;
   set sample_data_rep1 sample_data_rep2(in=in2);&lt;BR /&gt;
   if in2 then replicate=2;&lt;BR /&gt;
   run;&lt;BR /&gt;
%put _global_;&lt;BR /&gt;
proc surveyselect data=sashelp.shoes sampsize=300 method=srs&lt;BR /&gt;
   out=sample_data_repB seed=8 rep=2; &lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
proc compare base=sample_data_repA compare=sample_data_repB;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 10 Feb 2011 18:12:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-SURVEYSELECT-Replicates/m-p/70959#M3441</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-02-10T18:12:47Z</dc:date>
    </item>
  </channel>
</rss>

