<?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: ARIMAX MODELS using PROC ARIMA - problems replicating forecasts produced in SAS, in excel in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/750123#M36475</link>
    <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60547"&gt;@sbxkoenk&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you so much for your help once again.&lt;BR /&gt;&lt;BR /&gt;The models for which I was trying to do this are all ARIMAX. I will have to think of other options...&lt;BR /&gt;&lt;BR /&gt;Thanks for your availability,&lt;BR /&gt;Best Regards&lt;BR /&gt;</description>
    <pubDate>Thu, 24 Jun 2021 09:31:05 GMT</pubDate>
    <dc:creator>alexfx</dc:creator>
    <dc:date>2021-06-24T09:31:05Z</dc:date>
    <item>
      <title>ARIMAX MODELS using PROC ARIMA - problems replicating forecasts produced in SAS, in excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/744774#M36238</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am building several time series model for several target variables. I am using arimax models and using Proc Arima procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code i used for 3 example targets is the following:&lt;/P&gt;&lt;P&gt;Target1&lt;/P&gt;&lt;PRE&gt;ods graphics on;

proc arima data=amostra_des_2 plots=all;
	identify var=N_&amp;amp;var_nvl.(1) minic esacf scan crosscorr=(

_1dif_GDP_perc_yoy
_1dif_indice_prd_const_Var_Lag1Y
);
	
	estimate p=(0) q=(4) input=(

_1dif_GDP_perc_yoy
_1dif_indice_prd_const_Var_Lag1Y

) 
	printall Outest=modelos.Parametros_1NS2 outstat=modelos.Estatisticas_1NS2;
	forecast ID=date LEAD=8 INTERVAL=QTR ALPHA=0.05 align=ending OUT=modelos.previsoes_1NS2;
run;&lt;/PRE&gt;&lt;P&gt;Target2&lt;/P&gt;&lt;PRE&gt;ods graphics on;

proc arima data=amostra_des_2 plots=all;
	identify var=N_&amp;amp;var_nvl.(1,1) minic esacf scan crosscorr=(
_2dif_resid_prices_EUR_Var_Lag1Y
_2dif_TX_JR_consm_EUR_Var_Lag1Y
_2dif_GDP_perc_yoy
);
	estimate p=(4) q=(0) input=(
_2dif_resid_prices_EUR_Var_Lag1Y
_2dif_TX_JR_consm_EUR_Var_Lag1Y
_2dif_GDP_perc_yoy
) 

	printall Outest=modelos.Parametros_9NS3 outstat=modelos.Estatisticas_9NS3;
	forecast ID=date LEAD=8 INTERVAL=QTR ALPHA=0.05 align=ending OUT=modelos.previsoes_9NS3;
run;&lt;/PRE&gt;&lt;P&gt;Target3&lt;/P&gt;&lt;PRE&gt;ods graphics on;

proc arima data=amostra_des_2 plots=all;
	identify var=N_&amp;amp;var_nvl.(1,1) minic esacf scan crosscorr=(
_2dif_GDP_perc_yoy
);

	estimate p=(1) q=(4) input=(
_2dif_GDP_perc_yoy
)
	printall Outest=modelos.Parametros_11NS outstat=modelos.Estatisticas_11NS;
	forecast ID=date LEAD=8 INTERVAL=QTR ALPHA=0.05 align=ending OUT=modelos.previsoes_11NS;
run;

&lt;/PRE&gt;&lt;P&gt;For the first target, the best fit&amp;nbsp;turned out to be&amp;nbsp;an ARIMAX(d=1, p=0, q= 4), for the second target it was an ARIMAX(d=2,p=4,q=0) and for the third target it was an ARIMAX(d=2,p=1,q=4).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the first two models, in which there is only one componente (AR (p)&amp;nbsp;term or MA (q)&amp;nbsp;term)&amp;nbsp;I was able to replicate the forecasts&amp;nbsp;produced by&amp;nbsp;"Proc arima"&amp;nbsp;in excel, in order to better understand the final equation, but in the third case, in which there are two terms (both p (AR) and q (MA) are above 0) I wasn’t able to replicate the results in excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In attach you can find&amp;nbsp;3 excel files, one for each target, so&amp;nbsp;you can better understand the calculations i've done in order to replicate the forecasts generated by the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me understand what I am doing wrong in my attempt of replication for target 3?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 13:25:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/744774#M36238</guid>
      <dc:creator>alexfx</dc:creator>
      <dc:date>2021-05-31T13:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: ARIMAX MODELS using PROC ARIMA - problems replicating forecasts produced in SAS, in excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/744786#M36239</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/325146"&gt;@alexfx&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;W.r.t. implementing ARIMA(X) in Excel.&lt;/P&gt;
&lt;P&gt;This question pops up regularly, also on SAS-internal forums.&lt;/P&gt;
&lt;P&gt;I am a bit reluctant to copy/paste from these internal discussions (although very funny sometimes), but the key-message is:&lt;/P&gt;
&lt;P&gt;DO NOT TRY TO DO THIS!&lt;/P&gt;
&lt;P&gt;It's nearly impossible (de facto impossible).&lt;/P&gt;
&lt;P&gt;As a colleague said:&amp;nbsp;the cost of hiring a consultant to do it may break the bank.&lt;/P&gt;
&lt;P&gt;Calculating ARIMA forecasts requires sophisticated polynomial algebra and matrix algebra functions, something (probably) not available in Excel without buying additional add-ins. Double precision floating point arithmetic is essential.&lt;/P&gt;
&lt;P&gt;And you will also stumble upon this issue:&amp;nbsp;Infinite Memory Forecasts versus Finite Memory Forecasts. See SAS documentation for this!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But why do you try to replicate in Excel??&lt;/P&gt;
&lt;P&gt;Because some people would&amp;nbsp;like to fiddle with the model and do what-if analyses?&lt;/P&gt;
&lt;P&gt;You can call SAS forecasting procedures from Excel if you like (with Office Analytics).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 15:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/744786#M36239</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-31T15:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: ARIMAX MODELS using PROC ARIMA - problems replicating forecasts produced in SAS, in excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/744787#M36240</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Go to the communities home page and type in the search field:&amp;nbsp;replicating ARIMA in Excel&lt;/P&gt;
&lt;P&gt;Make sure you're searching in "All community".&lt;/P&gt;
&lt;P&gt;You will find several hits.&lt;/P&gt;
&lt;P&gt;I haven't opened any of them but I guess these entries/topics will make the same statement as I'm doing above.&lt;/P&gt;
&lt;P&gt;I agree that many&amp;nbsp;business forecasts are generated by Excel out there, but this is something we want to fix, not something we want to exploit.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 15:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/744787#M36240</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-31T15:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: ARIMAX MODELS using PROC ARIMA - problems replicating forecasts produced in SAS, in excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/748092#M36393</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60547"&gt;@sbxkoenk&lt;/a&gt; .&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;I was just trying to understand the final equation that equals to the final forecast series. I am not trying to replicate the entire process of forecasting that SAS does in Excel, just the final numbers.&lt;BR /&gt;Do you think this is something really complex? I was able to replicate the final forecast series for models with just AR terms or MA terms. But not able to do it for models with both AR and MA terms.&lt;BR /&gt;&lt;BR /&gt;Thank you again.</description>
      <pubDate>Tue, 15 Jun 2021 11:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/748092#M36393</guid>
      <dc:creator>alexfx</dc:creator>
      <dc:date>2021-06-15T11:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: ARIMAX MODELS using PROC ARIMA - problems replicating forecasts produced in SAS, in excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/749001#M36411</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/325146"&gt;@alexfx&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know you just want to do forecasting in Excel with the equation(s) estimated by SAS.&lt;/P&gt;
&lt;P&gt;I know you do not want to replicate the entire estimation process of SAS in Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But even then, it's very complex.&lt;/P&gt;
&lt;P&gt;Not so much for pure AR-models or pure MA-models, but for ARMA models it's definitely complex.&lt;/P&gt;
&lt;P&gt;And for ARIMA and ARIMAX, I would not even try.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you really want to proceed with this?&lt;/P&gt;
&lt;P&gt;I am not so handy in Excel, but I can maybe prepare something in SAS that allows you to replicate in Excel.&lt;/P&gt;
&lt;P&gt;Only if you have ARMA ( and not ARIMA(X) ).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 22:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/749001#M36411</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-06-18T22:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: ARIMAX MODELS using PROC ARIMA - problems replicating forecasts produced in SAS, in excel</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/750123#M36475</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60547"&gt;@sbxkoenk&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you so much for your help once again.&lt;BR /&gt;&lt;BR /&gt;The models for which I was trying to do this are all ARIMAX. I will have to think of other options...&lt;BR /&gt;&lt;BR /&gt;Thanks for your availability,&lt;BR /&gt;Best Regards&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Jun 2021 09:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ARIMAX-MODELS-using-PROC-ARIMA-problems-replicating-forecasts/m-p/750123#M36475</guid>
      <dc:creator>alexfx</dc:creator>
      <dc:date>2021-06-24T09:31:05Z</dc:date>
    </item>
  </channel>
</rss>

