<?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: Bizarre %AR Macro error within proc model in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120242#M24746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you're too focused on the error, and not focused on the warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program doesn't know where to find the definition of the %AR macro.&amp;nbsp; The folder that holds the file with the macro definition must be referenced in the SASAUTOS option.&amp;nbsp; Alternatively, but not as professional, your program has to %INCLUDE the file that defines the macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Oct 2013 22:38:50 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2013-10-22T22:38:50Z</dc:date>
    <item>
      <title>Bizarre %AR Macro error within proc model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120241#M24745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have a fairly simple piece of proc model code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc model data=to_forecast1 outparms=parms_out;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods output "Nonlinear OLS Summary of Residual Errors" = stat_out;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods output "Nonlinear OLS Parameter Estimates" = stderrs_probts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; d_Roll_Rate = B1*d_short_rate_up+ B2*lag_d_short_rate_up+ Gamma*(A1*lag_short_rate - lag_Roll_Rate); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %AR(d_Roll_Rate,13);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; fit d_Roll_Rate / dw=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this I obtain the following from the log:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp; proc model data=to_forecast1 outparms=parms_out;&lt;/P&gt;&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where qrm_account=&amp;amp;qrm_acct.;&lt;/P&gt;&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output "Nonlinear OLS Summary of Residual Errors" = stat_out;&lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output "Nonlinear OLS Parameter Estimates" = stderrs_probts;&lt;/P&gt;&lt;P&gt;WARNING: Apparent invocation of macro AR not resolved.&lt;/P&gt;&lt;P&gt;19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d_Roll_Rate = B1*d_short_rate_up+ B3*lag_d_short_rate_up+ Gamma*(A1*lag_short_rate -&lt;/P&gt;&lt;P&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp; lag_Roll_Rate);&lt;/P&gt;&lt;P&gt;21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %AR(d_Roll_Rate,13);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 180&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fit d_Roll_Rate / dw=1;&lt;/P&gt;&lt;P&gt;25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And execution ends..I'm really baffled because I'm fairly sure this is correct syntax for %AR, and this mirrors previous working SAS code I've used almost exactly...If I remove the "%AR(d_Roll_Rate,13);" line then it works fine...I'm not sure what could possibly be wrong in there. Am I missing something obvious?? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 20:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120241#M24745</guid>
      <dc:creator>AllSoEasy</dc:creator>
      <dc:date>2013-10-22T20:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre %AR Macro error within proc model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120242#M24746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you're too focused on the error, and not focused on the warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program doesn't know where to find the definition of the %AR macro.&amp;nbsp; The folder that holds the file with the macro definition must be referenced in the SASAUTOS option.&amp;nbsp; Alternatively, but not as professional, your program has to %INCLUDE the file that defines the macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 22:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120242#M24746</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-10-22T22:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre %AR Macro error within proc model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120243#M24747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%AR is included with the SAS/ETS Package by default, according to the docs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 23:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120243#M24747</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-10-22T23:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Bizarre %AR Macro error within proc model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120244#M24748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the SASAUTOS option.&amp;nbsp; &lt;/P&gt;&lt;P&gt;%put %sysfunc(getoption(SASAUTOS));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the SASAUTOS fileref. &lt;/P&gt;&lt;P&gt;%put %sysfunc(pathname(SASAUTOS));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check to make sure you have installed (and licensed) SAS/ETS.&lt;/P&gt;&lt;P&gt;proc setinit; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Oct 2013 02:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bizarre-AR-Macro-error-within-proc-model/m-p/120244#M24748</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-10-23T02:36:41Z</dc:date>
    </item>
  </channel>
</rss>

