BookmarkSubscribeRSS Feed
EdMarino
Calcite | Level 5

Hey, all. New to SAS and having some issues trying to reconstruct an ARIMA equation, as I am having difficulty in deciphering the meaning behind some of these values and abbreviations. I have attached the outest file from Forecast Studio here, as well as a snippet. I am not well versed in the actual code behind SAS and it's GUIs. Any information regarding how best to read and/or construct the equation (if possible) is greatly appreciated.

 

EdMarino_0-1604366524905.png

 

3 REPLIES 3
dw_sas
SAS Employee

Hi @EdMarino 

 

ARIMA and ARIMAX models are often expressed using backshift notation.  The structure of the OUTEST data set generated by Forecast Studio makes it convenient to reconstruct the model using backshift notation.

 

A description of the variables in the OUTEST data set created by Forecast Studio can be found at the following documentation link:

https://go.documentation.sas.com/?cdcId=fscdc&cdcVersion=15.2&docsetId=fsug&docsetTarget=p0xajbrvykr... 

The general notation for an ARIMA model (including a model with input variables) can be found in the following section of the SAS Forecast Server Procedures: User's Guide:

https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=hpfug&docsetTarget=hpf... 

 

Additional details can be found in the following sections of the PROC ARIMA documentation in the SAS/ETS User's Guide:

https://go.documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_arima_gettingstarted13.htm&docse... 

 

https://go.documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_arima_gettingstarted35.htm&docse... 

 

https://go.documentation.sas.com/?docsetId=etsug&docsetVersion=15.2&docsetTarget=etsug_arima_details... 

(See Table 9 where ALTPARM is NO)

 

Based on the OUTEST data set you provided, you can see from the initial rows in the table that exponential smoothing models were used to forecast your input variables WEEKDAY and TEMPERATURE.  A DAMPTREND model was fit to the WEEKDAY series and a SEASONAL exponential smoothing model was fit to your TEMPERATURE variable.  More details on these exponential smoothing models can be found at the link below:

https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=hpfug&docsetTarget=hpf... 

 

A transfer function model was fit to your dependent variable, LOAD.  Using the general notation for ARIMA models provided in the links above and the information in the OUTEST data set that correspond with the rows where _NAME_='Load', we can write out the model in backshift notation.  The _LABEL_ variable provides a description of the model and including information on the differencing orders used (if any) for the dependent and input series.  For your OUTEST data set the _LABEL_ variable is:

 

ARIMA: Load ~ P = 2 D = (365) Q = ((1,2)(365)) + INPUT1: Dif(365) Weekday + INPUT2: Dif(365) Temperature NUM = 2 DEN = 2

 

The model written in backshift notation is:

dw_sas_0-1605214949174.png

 

Substituting in the parameter estimates, the final model can be expressed as:

 

dw_sas_1-1605215097093.png

 

I hope the documentation links and the above example help explain how to derive the model from the results in the OUTEST data set!

DW

EdMarino
Calcite | Level 5

Thanks so much for the reply @dw_sas! This has helped tremendously and really closed a lot of the gaps I was struggling with. I suppose a final follow-up question pertains to the B notation still within the equation with the parameter estimates. I understand that this is just the backshift notation, "lag operator." But what becomes of it when using the model with the parameter estimates? This would mean it does not have a specific value, but still represents something else? What and/how do I put in its place in order to generate a value.

dw_sas
SAS Employee

Hi @EdMarino , 

 

I am glad the previous information was helpful to you! 

 

If your ultimate goal is to write out a forecasting equation from your fitted model in order to calculate the one-step-ahead predicted values and multistep-ahead forecasts outside of Forecast Studio, then I would caution you that the computations are quite involved--particularly for transfer function models.  Various textbooks, such as Box, Jenkins and Reinsel (1994), and Brockwell and Davis (1991), provide details on how the forecasts for ARIMA and ARIMAX models are computed.  Forecast Server computes the forecasts using the decomposition described in the following section of the documentation:

https://go.documentation.sas.com/?docsetId=hpfug&docsetTarget=hpfug_hpfdet_sect026.htm&docsetVersion...   

 

An alternative approach to "hand calculating" the forecasts would be to use the forecasting model score files and DATA step functions provided by Forecast Server.  Please see the following link for details:

https://go.documentation.sas.com/?docsetId=hpfug&docsetTarget=hpfug_macros_toc.htm&docsetVersion=15.... 

 

Regarding your question on how to apply the backshift operator after a model has been fit, I can provide a simple illustration.  Let's say you fit an ARMA(1,1) model as follows:

 

                (1 - θB)
yt = μ + --------------- * at
                (1 - ɸB)

 

If you multiply both sides of the equation by the AR polynomial in the denominator, you get:

(1 - ɸB)yt = (1 - ɸB)μ + (1 - θB)at

 

Multiplying the polynomials and applying the backshift operator you get:

yt - ɸyt-1 = (1 - ɸ)μ - θat-1 + at

 

Note that because μ does not have a time subscript, the backshift operator drops out of that term.  We can refer to that term as the constant, C.  Now, you can isolate yt and write out your final model equation into which you can plug in your estimated parameters:

yt = C + ɸyt-1 - θat-1 + at

 

I hope this illustration helps!

DW

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 675 views
  • 1 like
  • 2 in conversation