<?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 does exactly Proc ARIMA generate forecast in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/765483#M4233</link>
    <description>&lt;P&gt;Hi, Koen:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even after reading the explanation on what "conditional forecast" and "unconditional forecast" are, I still cannot tell how the results will differ.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is necessary for us to understand how SAS generates the forecast. From the practitioner's perspective, we usually starting the forecast from the most recent observations (last observations in the estimation sample). The forecast will be very different if SAS actually starts from the earliest observations used in estimation. If we don't understand the difference, we will misinterpret the results.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 19:51:32 GMT</pubDate>
    <dc:creator>jinghan1029</dc:creator>
    <dc:date>2021-09-01T19:51:32Z</dc:date>
    <item>
      <title>How does exactly Proc ARIMA generate forecast</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/763354#M4227</link>
      <description>&lt;P&gt;In general, a time series forecast depends the initial values or the period to start the forecast. Suppose I have a AR(3) model estimated with the sample between 2010 Jan and 2020 Dec. Does proc ARIMA uses the first three months: 2010 Jan, 2010 Feb and 2010 March as the initial condition to generate the forecast and roll forward or use the last three months: 2020 Oct, 20220 Nov and 2020 Dec?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 20:10:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/763354#M4227</guid>
      <dc:creator>jinghan1029</dc:creator>
      <dc:date>2021-08-23T20:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: How does exactly Proc ARIMA generate forecast</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/763364#M4228</link>
      <description>&lt;P&gt;Start with &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/etsug/etsug_arima_overview.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/etsug/etsug_arima_overview.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the overview&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;The ARIMA procedure analyzes and forecasts equally spaced univariate time series data, transfer function data, and intervention data by using the autoregressive integrated moving-average (ARIMA) or autoregressive moving-average (ARMA) model. An ARIMA model&lt;STRONG&gt; predicts a value in a response time series as a linear combination of its own past values, past errors (also called shocks or innovations), and current and past values of other time series&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 23 Aug 2021 21:14:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/763364#M4228</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-23T21:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: How does exactly Proc ARIMA generate forecast</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/763724#M4229</link>
      <description>&lt;P&gt;Thanks. I came here from online help document with confused head. For example, this is the equation shown in the page "Forecast details"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;x^t+k=∑i=1k−1π^ix^t+k−i+∑i=k∞π^ixt+k−i&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it is unclear what is the first period the program starts generating forecasts. I also notice there is an option "align" with feasible values being BEGINNING/MIDDLE/END, but without an specification on how they are defined.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because the iterative nature of the forecasts from time series, the forecasts will differ if we use different starting points.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 20:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/763724#M4229</guid>
      <dc:creator>jinghan1029</dc:creator>
      <dc:date>2021-08-24T20:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: How does exactly Proc ARIMA generate forecast</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/764618#M4230</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;nbsp;In general, a time series forecast depends the initial values or the period to start the forecast. + your question.&lt;/P&gt;
&lt;P&gt;You are absolutely right!&lt;BR /&gt;And I have known this (I think it's clearly stated in one of our SAS/ETS courses how PROC ARIMA deals with this "initialization for forecast generation")&amp;nbsp;but I do not dare to make a definitive statement on it anymore.&lt;BR /&gt;&lt;BR /&gt;It depends on the estimation method:&lt;/P&gt;
&lt;DIV class="xisDoc-refProc"&gt;
&lt;DIV id="etsug.arima.arimaforecdet" class="aa-section"&gt;
&lt;DIV id="etsug_arima006037" class="aa-section"&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI class="xisDoc-paragraph"&gt;METHOD=CLS (&lt;SPAN&gt;&lt;EM&gt;infinite memory forecasts&lt;/EM&gt;&lt;/SPAN&gt;, also called &lt;SPAN&gt;&lt;EM&gt;conditional forecasts&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class="xisDoc-paragraph"&gt;METHOD=ULS or METHOD=ML (&lt;SPAN&gt;&lt;EM&gt;finite memory forecasts&lt;/EM&gt;&lt;/SPAN&gt;, also called &lt;SPAN&gt;&lt;EM&gt;unconditional forecasts&lt;/EM&gt;&lt;/SPAN&gt;)&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="xisDoc-refProc"&gt;
&lt;DIV id="etsug.arima.arimaforecdet" class="aa-section"&gt;
&lt;DIV id="etsug_arima006130" class="aa-section"&gt;
&lt;P class="xisDoc-paragraph"&gt;What method do you use?&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;By default, METHOD=CLS (at least in SAS 9.4 Maintenance Level 7).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;I think in your&amp;nbsp;AR(3) model example, the CLS forecast starts with&amp;nbsp;2010 Jan, 2010 Feb and 2010 March as the initial condition to generate the forecasts as it&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;assumes that the unknown values of the response series before the start of the data are equal to the mean of the series.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;I note also this paragraph in the doc.&lt;BR /&gt;&lt;SPAN&gt;A complete description of the steps to produce the series forecasts and their standard errors by using either of these methods is quite involved, and only a brief explanation of the algorithm is given in the next two sections. Additional information about the finite and infinite memory forecasts can be found in Brockwell and Davis (&lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/etsug/etsug_arima_references.htm#etsug_arimabroc_p91" target="_blank"&gt;1991&lt;/A&gt;&lt;SPAN&gt;). The prediction of stationary ARMA processes is explained in Chapter 5, and the prediction of nonstationary ARMA processes is given in Chapter 9 of Brockwell and Davis (&lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/etsug/etsug_arima_references.htm#etsug_arimabroc_p91" target="_blank"&gt;1991&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&lt;SPAN style="font-family: inherit;"&gt;I will follow-up this question and maybe consult some internal resources on it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;Kind regards,&lt;BR /&gt;Koen&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 28 Aug 2021 12:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/764618#M4230</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-08-28T12:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: How does exactly Proc ARIMA generate forecast</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/764619#M4231</link>
      <description>&lt;P&gt;On top of my previous reply (see above!!) ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xisDoc-refProc"&gt;
&lt;DIV id="etsug.arima.arimaspecper" class="aa-section"&gt;
&lt;P class="xisDoc-paragraph"&gt;The ALIGN= option is used to &lt;FONT&gt;align&lt;/FONT&gt; the ID variable to the beginning, middle, or end of the time ID interval specified by the INTERVAL= option.&lt;BR /&gt;Suppose your interval is HOUR or DTHOUR, then 07h09 becomes 07h00 (align=beginning) or 07:29:59 (align=middle) or something close to 08h00 (align=ending).&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;Look at the dataset WANT in this example and play with beginning | middle | end :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IML;
phi = {1 -0.5};
theta = {1 0.8};
y = armasim(phi, theta, 0, 1, 46, -1234321);
*print y;
create temp from y;
append from y;
close temp;
QUIT;

data have;
 set temp(rename=(col1=y));
 datetimehour=INTNX('dthour','20AUG2021:14:00:00'dt,_N_);
 format datetimehour datetime18.;
run;

proc arima data=have;
  identify var=y;
  estimate p=3;
  FORECAST ALIGN=BEGINNING /* MIDDLE | ENDING */ LEAD=5
           ID=datetimehour INTERVAL=DTHOUR  
           NOPRINT out=want;
quit;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="xisDoc-paragraph"&gt;Good luck,&lt;BR /&gt;Koen&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 28 Aug 2021 12:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/764619#M4231</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-08-28T12:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How does exactly Proc ARIMA generate forecast</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/765483#M4233</link>
      <description>&lt;P&gt;Hi, Koen:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even after reading the explanation on what "conditional forecast" and "unconditional forecast" are, I still cannot tell how the results will differ.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is necessary for us to understand how SAS generates the forecast. From the practitioner's perspective, we usually starting the forecast from the most recent observations (last observations in the estimation sample). The forecast will be very different if SAS actually starts from the earliest observations used in estimation. If we don't understand the difference, we will misinterpret the results.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 19:51:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/How-does-exactly-Proc-ARIMA-generate-forecast/m-p/765483#M4233</guid>
      <dc:creator>jinghan1029</dc:creator>
      <dc:date>2021-09-01T19:51:32Z</dc:date>
    </item>
  </channel>
</rss>

