<?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: Rolling-window regressions in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194051#M48747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please clean up how your code is formatted?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, do you have a license for SAS/ETS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2015 02:57:46 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-07-02T02:57:46Z</dc:date>
    <item>
      <title>Rolling-window regressions</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194050#M48746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, The question may be confusing.&amp;nbsp; Allow me to explain. I am running a regression Proc reg data= all_compus2&amp;nbsp; outest=est&amp;nbsp; noprint ;&amp;nbsp; ; model2 :model log_ME&amp;nbsp; = log_BE&amp;nbsp; ln_income_positve&amp;nbsp; dummy_NI_negative&amp;nbsp; leverage&amp;nbsp; /noprint; ; by year group ; run;; I have about 2,000 observations per year (this number changes, depending on the year); I have 50 years of data.&amp;nbsp; So I have about 100,000 = 2,000x50 observations, divided- each year in 48 groups.&amp;nbsp; I run the regression and keep the parameter estimates and the intercept for each regression. The tricky part is that for each year&amp;nbsp; "T", I have to use observations for the prior 10 years (from "T-10" to "T-1"). For instance, for the year 2000, I have to run a regression with observations from 1990-1999; then for year 2001, another regression with observations in years 1991-2000; for 2002 with observations 1992-2001…etc. So I will run 40 of identical regressions (I will miss 10 years of data), one per year, using 10 years of data starting the prior year. I have to do a lop, but I do not know how. Any body has an idea how to do this in a simple way? Thank you for your help,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 01:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194050#M48746</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2015-07-02T01:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling-window regressions</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194051#M48747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please clean up how your code is formatted?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, do you have a license for SAS/ETS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 02:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194051#M48747</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-07-02T02:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling-window regressions</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194052#M48748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Reeza, The data consists of apprx 100,000 observations, in rows, each observation is a firm; the variables are firm- accounting characteristics observed annually; the groups identify industries. I have 50 years of data.&amp;nbsp; I need to run about 40 regressions, one regression for each year and group, using observations of the prior 10 years;&amp;nbsp; I keep the estimated coefficients and intercept for each regression to use in other analysis. The proc reg for each regression is Proc reg data= all_compus2&amp;nbsp; outest=est&amp;nbsp; noprint ; model2 :model log_ME&amp;nbsp; = log_BE&amp;nbsp; ln_income_positve&amp;nbsp; dummy_NI_negative&amp;nbsp; leverage&amp;nbsp; /noprint; ; by year group ; run;; I am not sure about the SAS/ETS.&amp;nbsp; I will ask tomorrow to&amp;nbsp; technical support Thank you !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 03:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194052#M48748</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2015-07-02T03:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling-window regressions</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194053#M48749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would try to replicate the data to create all the required 10-year periods. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%let lastYear=2014;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data expanded;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set all_compus2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;do year10 = year to year+9;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; if year10 &amp;lt;= &amp;amp;lastYear then output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sort data=expanded; by year10 group year; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Proc reg data= expanded outest=est&amp;nbsp; noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;model2 :model log_ME&amp;nbsp; = log_BE&amp;nbsp; ln_income_positve&amp;nbsp; dummy_NI_negative&amp;nbsp; leverage&amp;nbsp; /noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by year10 group ; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 03:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Rolling-window-regressions/m-p/194053#M48749</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-07-02T03:48:50Z</dc:date>
    </item>
  </channel>
</rss>

