<?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 get sampled output data without sorting in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231738#M54604</link>
    <description>&lt;P&gt;I would expect Proc Surveyselect to use an algorithm where it choses each record with a certain probability. If so then the sort order of the target data set should be the same like the one of the source data set (like: obs3, obs7, obs9,...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Oct 2015 22:06:40 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2015-10-26T22:06:40Z</dc:date>
    <item>
      <title>how to get sampled output data without sorting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231732#M54602</link>
      <description>&lt;P&gt;Hi, every one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Recently, I am trying to select some sample using &lt;SPAN&gt;PROC SURVEYSELECT procedure.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I want to give the sequence the obeservtion, for example, the I have 5 observation, 1 to 5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the sequecne for sampling without replacement may be is 3 5 4 1 2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but, everytime the sas only give me the output data which has been sorted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so, i only can have a data set is 1 to 5.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I check the statement, the sort statement also does not provide the function I asked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if there is a easy way to get the results I want?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2015 21:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231732#M54602</guid>
      <dc:creator>ffgsdf</dc:creator>
      <dc:date>2015-10-26T21:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to get sampled output data without sorting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231735#M54603</link>
      <description>You should post some code and what your input data looks like and what you expect.</description>
      <pubDate>Mon, 26 Oct 2015 21:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231735#M54603</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-10-26T21:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to get sampled output data without sorting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231738#M54604</link>
      <description>&lt;P&gt;I would expect Proc Surveyselect to use an algorithm where it choses each record with a certain probability. If so then the sort order of the target data set should be the same like the one of the source data set (like: obs3, obs7, obs9,...).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2015 22:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231738#M54604</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-10-26T22:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to get sampled output data without sorting</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231742#M54605</link>
      <description>&lt;P&gt;if you want your sample to appear in random order, you must generate the permutation yourself. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
call streaminit(76575);
do x = 10 to 1 by -1;
    order = rand("UNIFORM");
    output;
    end;
run;

proc surveyselect data=test out=sample5 sampsize=5 seed=866787;
run;

proc sort data=sample5 out=sample5(drop=order); by order; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Oct 2015 22:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-get-sampled-output-data-without-sorting/m-p/231742#M54605</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-26T22:32:52Z</dc:date>
    </item>
  </channel>
</rss>

