<?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: Random Sampling in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Random-Sampling/m-p/545444#M150896</link>
    <description>&lt;P&gt;So just pick 50 random stocks in your data set and retrieve every observation of those stocks, correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, then I think the &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_surveyselect_syntax05.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;Cluster Statement&lt;/A&gt; in PROC SURVEYSELECT is the way to go&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data stocks(drop=i);
   do i=1 to 1e5;
      stock=rand('integer', 1, 1000);
      output;
   end;
run;

proc surveyselect data=stocks method=srs n=50 seed=123 out=want;
   cluster stock;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 23 Mar 2019 09:29:56 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-03-23T09:29:56Z</dc:date>
    <item>
      <title>Random Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-Sampling/m-p/545435#M150891</link>
      <description>&lt;P&gt;I have a large dataset of stocks and daily returns. Because it is too large, I dont want to any analysis on the whole dataset. I would like to choose a subsample to play around with first. Say, I would like to take&amp;nbsp;50 stocks and I want all observations for those 50 stocks.&lt;/P&gt;&lt;P&gt;How can I achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Mar 2019 05:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-Sampling/m-p/545435#M150891</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2019-03-23T05:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Random Sampling</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-Sampling/m-p/545444#M150896</link>
      <description>&lt;P&gt;So just pick 50 random stocks in your data set and retrieve every observation of those stocks, correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, then I think the &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_surveyselect_syntax05.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;Cluster Statement&lt;/A&gt; in PROC SURVEYSELECT is the way to go&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data stocks(drop=i);
   do i=1 to 1e5;
      stock=rand('integer', 1, 1000);
      output;
   end;
run;

proc surveyselect data=stocks method=srs n=50 seed=123 out=want;
   cluster stock;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Mar 2019 09:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-Sampling/m-p/545444#M150896</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-23T09:29:56Z</dc:date>
    </item>
  </channel>
</rss>

