BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
I created an ARIMA model in SAS, but I need to implement the formula
for the forecasts in Excel. Below is the SAS code for the model. The model is
AR(5,10,15,20) MA(1,5) with differencing of 5 periods.

proc arima data=test;
identify var=calls (5) nlag=49;
estimate p=(5 10 15 20) q=(1 5);
run;

I tried using Y(t)-Y(t-5)=Mu+MA/AR, but the forecasts on the spreadsheet are still different from the SAS output. This notation is based on a document from SAS Support here: http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/viewer.htm#etsug_tffordet_sect0...

Can you please help me with translating the ARIMA forecast to Excel? Thank you.
Valentin
1 ACCEPTED SOLUTION

Accepted Solutions
udo_sas
SAS Employee

Hello -
This is not the answer you are looking for, but in my opinion you will have a hard time replicating ARIMA models created in SAS using Excel. The implementation of these kinds of models is more sophisticated than you might expect - and as such difficult to translate to simple Excel statements (in a straightforward manner that is).

Wouldn't it be more appropriate to leave the calculation of the ARIMA model in SAS and export the results to Excel only?

Thanks,
Udo

View solution in original post

5 REPLIES 5
udo_sas
SAS Employee

Hello -
This is not the answer you are looking for, but in my opinion you will have a hard time replicating ARIMA models created in SAS using Excel. The implementation of these kinds of models is more sophisticated than you might expect - and as such difficult to translate to simple Excel statements (in a straightforward manner that is).

Wouldn't it be more appropriate to leave the calculation of the ARIMA model in SAS and export the results to Excel only?

Thanks,
Udo

nav1
Calcite | Level 5

i have tried replicating the SAS ARIMA (AR model) model in excel and have been successful for the most part... below is the equation that i am using.. 

 

below is the equation for p =(1,7,14) model with no d and q terms

Yt = Constant Estimate + ar1*lag1 +ar7*lag7 +ar14*lag14

 

if the model has other input variables apart from these 3 lags, below is the equation (p =(1,7,14), with input=Temp, with no d and q terms):

Yt =  Constant Estimate + ar1*lag1 +ar7*lag7 +ar14*lag14+ num1*Temp-ar1*num1*temp1-ar7*num1*temp7-ar14*num1*temp14

 

hope this helps.

thanks 

Synchro
Calcite | Level 5

Thanks for the Logic, I am struggling with the notations num1. Can you please clarify?

Thanks in advance!

nav1
Calcite | Level 5

num1,num2 etc. are coefficients for other terms you may include in your arima model.. proc arima lets you add other variables (like regressive) into your model using the followin statement:

 

  estimate input=XYZ;

referrence: http://support.sas.com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_arima_sect012....

 

hope that helps... if you just have AR term you don't have to worry about the num1,num2 etc.

Synchro
Calcite | Level 5

Thanks for the quick response. It helped me move 1 step ahead, I could replicate ARMA (1,1) with 2 input variables. Now I am trying extend it to a general form of more than 1 AR term (AR 1,2 ) with 2 or more input variables. The below mentioned form does not conform with SAS output.

 Yt =  Constant Estimate + ar1*lag1 +ar2*lag2 + num1*Temp-ar1*num1*Temp1-ar2*num1*Temp2    {changed the subscripts}

 Yt =  Constant Estimate + ar1*lag1 +ar2*lag2 + num1*(Temp- ar1*Temp1- ar2*Temp2)                    {brought num1 forward}

 Yt =  Constant Estimate + ar1*lag1 +ar2*lag2 + num1*(Temp- (ar1*Temp1+ ar2*Temp2))                 {Regression - AR contribution to get the marginal contribution for temp}

 

I believe the above form suggests that whenever you have AR with input variables, we need to take out the AR interaction out of the input variable to see the marginal contribution of the input variable (Temp in our case). This form does not match with SAS

 

So i think, there should be a term to take care of the effect of interaction between Ar1 and Ar2 something like A1*Ar2

 Yt =  Constant Estimate + ar1*lag1 +ar2*lag2 + num1*(Temp-(ar1*temp1 + ar2*temp2 - ar1*temp1*ar2*temp2)

 

Unfortunately this does not help either.

Nav1, any guidance would be helpful. Thanks a ton!

 

sas-innovate-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 5779 views
  • 0 likes
  • 4 in conversation