<?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 can I use %macro on running multiple regression? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192843#M36313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%macro do_regression(dep);&lt;/P&gt;&lt;P class="p1"&gt;proc reg data=Reg.Reg_raw;&lt;/P&gt;&lt;P class="p1"&gt;model &amp;amp;dep = mktexretm smb hml term default;&lt;/P&gt;&lt;P class="p1"&gt;run; quit;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;%mend&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p1"&gt;%do_regression(exr11)&lt;/P&gt;&lt;P class="p1"&gt;%do_regression(exr12)&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;OR&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;%do_regression(exr11 exr12 exr13)&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;But there's really no reason to code a macro for this&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;proc reg data = whatever;&lt;/P&gt;&lt;P class="p1"&gt;model exr11 exr12 exr13 ... = mktexretm smb hml term default;&lt;/P&gt;&lt;P class="p1"&gt;run; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jan 2015 17:41:50 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2015-01-22T17:41:50Z</dc:date>
    <item>
      <title>How can I use %macro on running multiple regression?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192842#M36312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I would like to run regression on 25 stock portfolios, how can I use the %macro function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code for regression:&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;reg&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;=Reg.Reg_raw;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;model&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;exr11&lt;/SPAN&gt;= mktexretm smb hml term default; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;However,I need to repeatedly changing the dependent variable (*red one*--exr11) into (exr12,&lt;SPAN style="font-size: 13.3333330154419px;"&gt;exr13,......,&lt;SPAN style="font-size: 13.3333330154419px;"&gt;exr55),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;can anyone help to point out what's wrong with my code? Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; (&amp;amp;&lt;STRONG&gt;&lt;EM&gt;name&lt;/EM&gt;&lt;/STRONG&gt;);&lt;/P&gt;&lt;P class="p1"&gt;proc reg data=Reg.Reg_raw;&lt;/P&gt;&lt;P class="p1"&gt;model (&amp;amp;name) = mktexretm smb hml term default; &lt;/P&gt;&lt;P class="p1"&gt;run;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p1"&gt;%&lt;STRONG&gt;&lt;EM&gt;exr11&lt;/EM&gt;&lt;/STRONG&gt; %&lt;STRONG&gt;&lt;EM&gt;exr12&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 17:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192842#M36312</guid>
      <dc:creator>eiua123</dc:creator>
      <dc:date>2015-01-22T17:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use %macro on running multiple regression?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192843#M36313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%macro do_regression(dep);&lt;/P&gt;&lt;P class="p1"&gt;proc reg data=Reg.Reg_raw;&lt;/P&gt;&lt;P class="p1"&gt;model &amp;amp;dep = mktexretm smb hml term default;&lt;/P&gt;&lt;P class="p1"&gt;run; quit;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;%mend&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p1"&gt;%do_regression(exr11)&lt;/P&gt;&lt;P class="p1"&gt;%do_regression(exr12)&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;OR&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;%do_regression(exr11 exr12 exr13)&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;But there's really no reason to code a macro for this&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;proc reg data = whatever;&lt;/P&gt;&lt;P class="p1"&gt;model exr11 exr12 exr13 ... = mktexretm smb hml term default;&lt;/P&gt;&lt;P class="p1"&gt;run; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 17:41:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192843#M36313</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-01-22T17:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use %macro on running multiple regression?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192844#M36314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jan 2015 02:43:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192844#M36314</guid>
      <dc:creator>eiua123</dc:creator>
      <dc:date>2015-01-23T02:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use %macro on running multiple regression?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192845#M36315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 1.5em; background-color: #ffffff;"&gt;&lt;A __default_attr="9481" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 1.5em; background-color: #ffffff;"&gt;I still have some other questions in using SAS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; background-color: #ffffff;"&gt;May I ask how to find out residual standard error of the regression model? As from the output of SAS like the first attached image, I cannot find the s(e) but I am curious if the root of mean square error would be the &lt;SPAN style="color: #141823; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; background-color: #ffffff;"&gt;residual standard error?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-size: 14px; background-color: #ffffff; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif;"&gt;Besides I have no idea what code should I input to SAS &lt;SPAN style="color: #141823; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; background-color: #ffffff;"&gt;to show autocorrelation for lag till 12 period and correlation between variables, like the second attached image from Fama and French (1993) 's paper.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #141823; font-size: 14px; background-color: #ffffff; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif;"&gt;I will be grateful for any help you provide. Thanks^^&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="8856" alt="螢幕快照 2015-01-27 下午11.31.37.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/8856_螢幕快照 2015-01-27 下午11.31.37.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="8857" alt="螢幕快照 2015-01-27 下午11.38.03.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/8857_螢幕快照 2015-01-27 下午11.38.03.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 15:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192845#M36315</guid>
      <dc:creator>eiua123</dc:creator>
      <dc:date>2015-01-27T15:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use %macro on running multiple regression?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192846#M36316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Root Mean Square Error is effectively the standard deviation of the residuals. Technically, there is a slight difference as the Root Mean Square error is more appropriat as it divides the Residual Sum of Squares by the error df, while the standard deviation would divide the residual sum of squares by n-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what you are showing me in table 2 but PROC REG does not perform autocorrelation without manipulation of the input variables. You might want to look into PROC ARIMA or PROC AUTOREG if you have SAS/ETS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 15:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-macro-on-running-multiple-regression/m-p/192846#M36316</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-01-27T15:57:15Z</dc:date>
    </item>
  </channel>
</rss>

