<?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 bootstrap by firm and month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296605#M312044</link>
    <description>&lt;P&gt;I try to bootstrap using proc surveyselect or the following code&lt;/P&gt;&lt;P&gt;data bootstraps;&lt;BR /&gt;do replicate = 1 to 10;&lt;BR /&gt;do simorder = 1 to nobs;&lt;BR /&gt;p = ceil(nobs * ranuni(394747373));&lt;BR /&gt;set sample nobs=nobs point=p;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want&amp;nbsp;the bootstrap&amp;nbsp;run by&amp;nbsp;each id-month combination, rather than apply to the whole dataset. One way is to separate the dataset into small ones (e.g., for id=11, I have sub-dataset for month 1 and 2; and for id=22, also have subdatasets for month 1 and 2), then apply above code to each subdataset, finally merge. It works fine if I have only 2 firms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any options I can refer to, to bootstrap by firm and month? strata option looks like select different observations from different groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2016 23:52:46 GMT</pubDate>
    <dc:creator>Jonate_H</dc:creator>
    <dc:date>2016-09-05T23:52:46Z</dc:date>
    <item>
      <title>bootstrap by firm and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296605#M312044</link>
      <description>&lt;P&gt;I try to bootstrap using proc surveyselect or the following code&lt;/P&gt;&lt;P&gt;data bootstraps;&lt;BR /&gt;do replicate = 1 to 10;&lt;BR /&gt;do simorder = 1 to nobs;&lt;BR /&gt;p = ceil(nobs * ranuni(394747373));&lt;BR /&gt;set sample nobs=nobs point=p;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want&amp;nbsp;the bootstrap&amp;nbsp;run by&amp;nbsp;each id-month combination, rather than apply to the whole dataset. One way is to separate the dataset into small ones (e.g., for id=11, I have sub-dataset for month 1 and 2; and for id=22, also have subdatasets for month 1 and 2), then apply above code to each subdataset, finally merge. It works fine if I have only 2 firms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any options I can refer to, to bootstrap by firm and month? strata option looks like select different observations from different groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 23:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296605#M312044</guid>
      <dc:creator>Jonate_H</dc:creator>
      <dc:date>2016-09-05T23:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: bootstrap by firm and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296619#M312045</link>
      <description>&lt;P&gt;Look at this example:&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=orderedClass; by sex; run;

proc surveyselect data=orderedClass method=urs samprate=100 rep=10 
    out=bootstraps outhits seed=9636365;
strata sex;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Sep 2016 02:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296619#M312045</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-09-06T02:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: bootstrap by firm and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296849#M312046</link>
      <description>&lt;P&gt;Thank you PG!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the key point here is to set&amp;nbsp;samprate=100, and if I want to sample by two variables, I just add another variable to the&amp;nbsp;strata statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;e.g, if there is another variable named&amp;nbsp;region, then the statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;strata sex region;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;will sample by each combination of sex-region, and the samprate=100 will make sure that the bootstrap works within each combination of sex-region.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct me if I am wrong. thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2016 22:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296849#M312046</guid>
      <dc:creator>Jonate_H</dc:creator>
      <dc:date>2016-09-06T22:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: bootstrap by firm and month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296870#M312047</link>
      <description>&lt;P&gt;Right! The sort would also have to be &lt;STRONG&gt;by sex region;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 00:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bootstrap-by-firm-and-month/m-p/296870#M312047</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-09-07T00:47:58Z</dc:date>
    </item>
  </channel>
</rss>

