<?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 extract intercept and residuals from a panel regression as a separate data file in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84147#M563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is quite straitforward to combine OUTEST= and OUT= datasets :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc reg data=myData outest=myParms;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;by myByVar;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;model Y = mon tue wed thrsday;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;output out=myRes r=resid;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;create table noSeason as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;select R.myByVar, P.intercept + R.resid as Yp&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;from myParms as P inner join myRes as R on P.myByVar=R.myByVar&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where P._TYPE_="PARMS";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;quit;&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, 21 Mar 2013 01:45:46 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2013-03-21T01:45:46Z</dc:date>
    <item>
      <title>How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84145#M561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i am estimating a&amp;nbsp; dummy panel regression to remove seasonality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The equation goes something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Y = intercept + b mon + b2 tue + b3 wed + b4 thrsday + e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to calculate a variable which would be intercept+ e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc reg&amp;nbsp; with a "by" variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to extract only the intercept and residual as a seperate data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know how to extract residual , but extracting intercept is very tricky . By using outest command it gives me a very jumbled data set with alot of other observations too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any efficient way???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for helping &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 00:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84145#M561</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-03-21T00:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84146#M562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; kindly help me on this need help urgently, sorry for bugging&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 00:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84146#M562</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-03-21T00:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84147#M563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is quite straitforward to combine OUTEST= and OUT= datasets :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc reg data=myData outest=myParms;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;by myByVar;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;model Y = mon tue wed thrsday;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;output out=myRes r=resid;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;create table noSeason as&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;select R.myByVar, P.intercept + R.resid as Yp&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;from myParms as P inner join myRes as R on P.myByVar=R.myByVar&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where P._TYPE_="PARMS";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;quit;&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, 21 Mar 2013 01:45:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84147#M563</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-03-21T01:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84148#M564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks alot really appreciate &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 02:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84148#M564</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-03-21T02:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84149#M565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; there is one little problem, all the out put tables delete the date variable and i want to include the date variable, is there any remedie for that.&lt;/P&gt;&lt;P&gt;Kindly reply as soon as you can . Really appreciate your help&lt;/P&gt;&lt;P&gt;Thanking you in anticipation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 21:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84149#M565</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-03-28T21:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84150#M566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is your date variable related to your other variables, especially to your BY variable(s)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 01:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84150#M566</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-03-29T01:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84151#M567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is a panel data basically, for 500 stocks , daily data over 7 years. so my by variable is the stock name, which is to say o am estimating regression for every stock seperately,&lt;/P&gt;&lt;P&gt;i managed to get the desired result by manipulating the code you provided , kindly check if i have done it right or if there is a more efficient way kindly suggest that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table noSeason1 as&lt;/P&gt;&lt;P&gt;select R.codneg, P.intercept + R.resid as Yp ,date&lt;/P&gt;&lt;P&gt;from myres as R inner join Myparms as P on R.codneg=P.codneg&lt;/P&gt;&lt;P&gt;where P._TYPE_="PARMS";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 01:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84151#M567</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-03-29T01:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84152#M568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where codneg is the stock name variable, and rest is all the same as you suggested&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 01:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84152#M568</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-03-29T01:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84153#M569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That looks perfectly fine to me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 01:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84153#M569</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-03-29T01:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract intercept and residuals from a panel regression as a separate data file</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84154#M570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks &lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; you are a great help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 01:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-extract-intercept-and-residuals-from-a-panel-regression/m-p/84154#M570</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2013-03-29T01:58:22Z</dc:date>
    </item>
  </channel>
</rss>

