<?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 proc syslin SUR -- how to choose a subset of the full dataset in each of the model equation in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-syslin-SUR-how-to-choose-a-subset-of-the-full-dataset-in/m-p/320127#M61924</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran a cross-sectional regression (across&amp;nbsp;500 stocks) for a particular month. It is repeated for other 60&amp;nbsp;months (say yymonth is 201001-201512). Then, the average (across time) coefficients are calculated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=a outest=b tableout noprint;&lt;/P&gt;&lt;P&gt;model y&amp;nbsp;= &amp;nbsp; x1 x2 x3 &amp;nbsp; &amp;nbsp;/&amp;nbsp; adjrsq ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=RES r=rRESID;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;by yymonth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to run proc syslin SUR grouping all the 60&amp;nbsp;months together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to 'choose' a month's data into each model equation? I think the code goes like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc syslin data = a&amp;nbsp;sur;&lt;BR /&gt;model1: model y =&amp;nbsp;&lt;SPAN&gt;x1 x2 x3; &amp;lt;----this one include only 2010Jan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;model2: model y = x1 x2 x3;&amp;nbsp;&amp;lt;----this one include only 2010Feb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;model60:&amp;nbsp;model y = x1 x2 x3;&amp;nbsp;&amp;lt;----this one include only 2015Dec&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2016 08:44:25 GMT</pubDate>
    <dc:creator>cmy</dc:creator>
    <dc:date>2016-12-20T08:44:25Z</dc:date>
    <item>
      <title>proc syslin SUR -- how to choose a subset of the full dataset in each of the model equation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-syslin-SUR-how-to-choose-a-subset-of-the-full-dataset-in/m-p/320127#M61924</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran a cross-sectional regression (across&amp;nbsp;500 stocks) for a particular month. It is repeated for other 60&amp;nbsp;months (say yymonth is 201001-201512). Then, the average (across time) coefficients are calculated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=a outest=b tableout noprint;&lt;/P&gt;&lt;P&gt;model y&amp;nbsp;= &amp;nbsp; x1 x2 x3 &amp;nbsp; &amp;nbsp;/&amp;nbsp; adjrsq ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output out=RES r=rRESID;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;by yymonth;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to run proc syslin SUR grouping all the 60&amp;nbsp;months together.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to 'choose' a month's data into each model equation? I think the code goes like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc syslin data = a&amp;nbsp;sur;&lt;BR /&gt;model1: model y =&amp;nbsp;&lt;SPAN&gt;x1 x2 x3; &amp;lt;----this one include only 2010Jan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;model2: model y = x1 x2 x3;&amp;nbsp;&amp;lt;----this one include only 2010Feb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;model60:&amp;nbsp;model y = x1 x2 x3;&amp;nbsp;&amp;lt;----this one include only 2015Dec&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 08:44:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-syslin-SUR-how-to-choose-a-subset-of-the-full-dataset-in/m-p/320127#M61924</guid>
      <dc:creator>cmy</dc:creator>
      <dc:date>2016-12-20T08:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc syslin SUR -- how to choose a subset of the full dataset in each of the model equation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-syslin-SUR-how-to-choose-a-subset-of-the-full-dataset-in/m-p/321428#M61958</link>
      <description>&lt;P&gt;Wouldn't a BY statement be sufficient to accomplish this? &amp;nbsp;In fact, the same BY statement that you used in PROC REG looks like it ought to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2016 14:41:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-syslin-SUR-how-to-choose-a-subset-of-the-full-dataset-in/m-p/321428#M61958</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-12-28T14:41:18Z</dc:date>
    </item>
  </channel>
</rss>

