<?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: 5 Year Rolling regression for Multiple Companies in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/5-Year-Rolling-regression-for-Multiple-Companies/m-p/852864#M37496</link>
    <description>&lt;P&gt;One way to do this:&amp;nbsp;&lt;A href="https://pages.stern.nyu.edu/~adesouza/sasfinphd/index/node25.html" target="_blank"&gt;https://pages.stern.nyu.edu/~adesouza/sasfinphd/index/node25.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2023 17:03:07 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-01-09T17:03:07Z</dc:date>
    <item>
      <title>5 Year Rolling regression for Multiple Companies</title>
      <link>https://communities.sas.com/t5/New-SAS-User/5-Year-Rolling-regression-for-Multiple-Companies/m-p/852863#M37495</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do a rolling OLS regression with a data&amp;nbsp; that has variables YEAR, COMPANY_ID, Y, X1, X2 and X3. The data includes multiple companies (COMPANY_ID) for years 1995-2020 and different companies appear in the sample for different time periods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The end result I am looking for is to have a table with regression coeficcient values for each regression time window. The simple OLS regression code for the first time window would be the following:&lt;/P&gt;&lt;P&gt;PROC REG DATA=MY_DATA;&lt;BR /&gt;MODEL Y=X1 X2 X3;&lt;BR /&gt;where 1995 &amp;lt;= YEAR &amp;lt;= 2000;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how I could include for example a loop into my code that would move the time period with one year after every run and save the coefficcient values to a table? I have found a lot of different macros for rolling regression but I have been unable to use them due to extremely limited knowledge on SAS. Thank you in advance for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 17:00:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/5-Year-Rolling-regression-for-Multiple-Companies/m-p/852863#M37495</guid>
      <dc:creator>pullasorsa</dc:creator>
      <dc:date>2023-01-09T17:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: 5 Year Rolling regression for Multiple Companies</title>
      <link>https://communities.sas.com/t5/New-SAS-User/5-Year-Rolling-regression-for-Multiple-Companies/m-p/852864#M37496</link>
      <description>&lt;P&gt;One way to do this:&amp;nbsp;&lt;A href="https://pages.stern.nyu.edu/~adesouza/sasfinphd/index/node25.html" target="_blank"&gt;https://pages.stern.nyu.edu/~adesouza/sasfinphd/index/node25.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 17:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/5-Year-Rolling-regression-for-Multiple-Companies/m-p/852864#M37496</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-09T17:03:07Z</dc:date>
    </item>
  </channel>
</rss>

