<?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 What does nlag= in the autoreg procedure do? in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/What-does-nlag-in-the-autoreg-procedure-do/m-p/834657#M4509</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am doing an interrupted time-series analysis and use the autoreg procedure. I have difficulties to understand what excatly the nlag= option does in this procedure as it changes my results minimally, but the follow-up graph&amp;nbsp;practically not at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would be great if someone could shortly explain the function of the nlag= option simple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my SAS coding:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc autoreg data=mydata;
model measurements = preintervention intervention postintervention sin cos/ method=ml nlag=1 /*dw=5*/ dwprob 
covb;
output out=autoreg_out predicted=pred pm=trend lcl=pred_l ucl=pred_u residual=resid
        predictedm=predm lclm=predm_l uclm=predm_u residualm=residm;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Sep 2022 13:44:09 GMT</pubDate>
    <dc:creator>Tamino</dc:creator>
    <dc:date>2022-09-22T13:44:09Z</dc:date>
    <item>
      <title>What does nlag= in the autoreg procedure do?</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/What-does-nlag-in-the-autoreg-procedure-do/m-p/834657#M4509</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am doing an interrupted time-series analysis and use the autoreg procedure. I have difficulties to understand what excatly the nlag= option does in this procedure as it changes my results minimally, but the follow-up graph&amp;nbsp;practically not at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would be great if someone could shortly explain the function of the nlag= option simple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my SAS coding:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc autoreg data=mydata;
model measurements = preintervention intervention postintervention sin cos/ method=ml nlag=1 /*dw=5*/ dwprob 
covb;
output out=autoreg_out predicted=pred pm=trend lcl=pred_l ucl=pred_u residual=resid
        predictedm=predm lclm=predm_l uclm=predm_u residualm=residm;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Sep 2022 13:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/What-does-nlag-in-the-autoreg-procedure-do/m-p/834657#M4509</guid>
      <dc:creator>Tamino</dc:creator>
      <dc:date>2022-09-22T13:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: What does nlag= in the autoreg procedure do?</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/What-does-nlag-in-the-autoreg-procedure-do/m-p/834683#M4510</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the documentation not clear enough?&lt;/P&gt;
&lt;P&gt;This is what the doc says :&lt;/P&gt;
&lt;P&gt;The AUTOREG Procedure&lt;BR /&gt;SAS/ETS® 15.2 User's Guide&lt;/P&gt;
&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/etsug/15.2/etsug_autoreg_syntax05.htm" target="_blank" rel="noopener"&gt;https://go.documentation.sas.com/doc/en/etsug/15.2/etsug_autoreg_syntax05.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=" aa-term "&gt;NLAG=&lt;SPAN class=" aa-argument"&gt;number&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=" aa-term "&gt;NLAG=&lt;SPAN class=" aa-argument"&gt;(number-list)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies the order of the autoregressive error process&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A id="etsug.autoreg.autoreg_a0000000048" class="indexterm" target="_blank"&gt;&lt;/A&gt;or the subset of autoregressive error lags to be fitted. Note that NLAG=3 is the same as NLAG=(1 2 3). If the NLAG= option is not specified, PROC AUTOREG does not fit an autoregressive model.&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;Thus, for nlag=3, you believe (and test) that the lags 1, 2 and 3 of the target variable (=dependent variable) are playing a role in modelling it.&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;Thanks,&lt;/P&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;Koen&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 16:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/What-does-nlag-in-the-autoreg-procedure-do/m-p/834683#M4510</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-09-22T16:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: What does nlag= in the autoreg procedure do?</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/What-does-nlag-in-the-autoreg-procedure-do/m-p/834729#M4511</link>
      <description>&lt;P&gt;Specifying option nlag=1 is loosely like requesting :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;model measurements = measurements_1 preintervention intervention postintervention sin cos/ method=ml&amp;nbsp; dwprob covb;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where &lt;EM&gt;measurements_1&lt;/EM&gt; is the measurement value from the preceeding observation. I.e. you model the measurements as depending not only on independent variables but also on the previous state of the system.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 19:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/What-does-nlag-in-the-autoreg-procedure-do/m-p/834729#M4511</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-09-22T19:40:10Z</dc:date>
    </item>
  </channel>
</rss>

