<?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: Creating macro to run iterative regressions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/300860#M63589</link>
    <description>&lt;P&gt;I solved the problem. Thank you very much for all your advice!&lt;/P&gt;</description>
    <pubDate>Mon, 26 Sep 2016 20:30:41 GMT</pubDate>
    <dc:creator>easygoing</dc:creator>
    <dc:date>2016-09-26T20:30:41Z</dc:date>
    <item>
      <title>Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293864#M61243</link>
      <description>&lt;P&gt;Hello SAS experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a beginniner in SAS and need some help in performing multivaite analysis using SAS macro.&lt;/P&gt;&lt;P&gt;I have an unbalanced panel data by country (50 countries, sample period 2010-2014) as attached and each country has a number of banks by year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;would like to run a multivariate regression by country as follows and have an output of coefficient estimates, standard errors, t-value, adjusted R square and N by country from each regression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg&lt;/P&gt;&lt;P&gt;model price = gain cashflow CPI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I hope&amp;nbsp;to find a more efficient way of performing analyses that allows running iterative regressions by country instead of running 50 times of&amp;nbsp;regressions and put together each regressions restuls 50 times.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I greatly appreciate your help with this matter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 20:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293864#M61243</guid>
      <dc:creator>easygoing</dc:creator>
      <dc:date>2016-08-24T20:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293866#M61244</link>
      <description>&lt;P&gt;Have you looked at BY group processing -&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=class; by sex;
run;

proc reg data=class;
by sex;
model weight = height age;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Aug 2016 21:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293866#M61244</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-24T21:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293867#M61245</link>
      <description>&lt;P&gt;Sort your data by country and add a &lt;STRONG&gt;BY country&lt;/STRONG&gt; statement in proc reg. You will get a separate regression analysis for each country.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 21:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293867#M61245</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-08-24T21:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293875#M61247</link>
      <description>Thank you for your response.&lt;BR /&gt;It works in terms of running regressions for 50 different countries at one&lt;BR /&gt;time. Would there be any way to have coefficient estimates, standard&lt;BR /&gt;errors, t-value, adjusted R square and N by country in one table?&lt;BR /&gt;Thank you again!&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Wed, 24 Aug 2016 22:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293875#M61247</guid>
      <dc:creator>easygoing</dc:creator>
      <dc:date>2016-08-24T22:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293902#M61265</link>
      <description>&lt;P&gt;Thank you veru much for your advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition, I would like to have results by country, especially estimates, standard errors, t-value and adjusted rsquares in one table and tried the codes as follows. But it did not work. What would be wrong with my codes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=&amp;nbsp;xx;&lt;BR /&gt;MODEL Price = gain cashflow CPI;&lt;BR /&gt;by country;&lt;BR /&gt;ods select DataSummary FitStatistics;&lt;BR /&gt;ods output ParameterEstimates = tt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=&lt;SPAN&gt;tt&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt; noobs;&lt;BR /&gt;var Parameter Estimate Standard Error tValue;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 00:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293902#M61265</guid>
      <dc:creator>easygoing</dc:creator>
      <dc:date>2016-08-25T00:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293905#M61268</link>
      <description>&lt;P&gt;What does your log say is wrong with your code?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 00:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293905#M61268</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-25T00:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293908#M61270</link>
      <description>&lt;P&gt;My log says as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Output 'ParameterEstimates' was not created. Make sure that the output object name,&lt;BR /&gt;label, or path is spelled correctly. Also, verify that the appropriate procedure&lt;BR /&gt;options are used to produce the requested output object. For example, verify that the&lt;BR /&gt;NOPRINT option is not used.&lt;BR /&gt;WARNING: Output 'FitStatistics' was not created. Make sure that the output object name, label,&lt;BR /&gt;or path is spelled correctly. Also, verify that the appropriate procedure options are&lt;BR /&gt;used to produce the requested output object. For example, verify that the NOPRINT&lt;BR /&gt;option is not used.&lt;BR /&gt;WARNING: Output 'DataSummary' was not created. Make sure that the output object name, label, or&lt;BR /&gt;path is spelled correctly. Also, verify that the appropriate procedure options are used&lt;BR /&gt;to produce the requested output object. For example, verify that the NOPRINT option is&lt;BR /&gt;not used.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 01:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293908#M61270</guid>
      <dc:creator>easygoing</dc:creator>
      <dc:date>2016-08-25T01:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293918#M61276</link>
      <description>&lt;P&gt;Check the ODS Table Names section of the Details tab in the proc reg documentation. The procedure options that must be specified to get each ODS table are listed there.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 01:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/293918#M61276</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-08-25T01:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro to run iterative regressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/300860#M63589</link>
      <description>&lt;P&gt;I solved the problem. Thank you very much for all your advice!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 20:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-to-run-iterative-regressions/m-p/300860#M63589</guid>
      <dc:creator>easygoing</dc:creator>
      <dc:date>2016-09-26T20:30:41Z</dc:date>
    </item>
  </channel>
</rss>

