Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- Regression with ARMA Errors

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 3 weeks ago
(407 views)

Dear All,

I am very new to SAS and am using SAS on Demand for Academics. I have a question regarding an example in the SAS manual. There is an example of a regression with input series with ARMA models for the errors, where the error follows an ARMA(1,1) process:

```
proc arima data=a;
identify var=sales crosscorr=(price income);
estimate p=1 q=1 input=(price income);
run;
```

But what if I have monthly data and need to run the same model as above, except that this time error is a multiplicative seasonal ARIMA model of the form:

ARIMA(0,1,1)(2,1,0)12 , i.e., here "12" is a subscript (sorry, could not type it in a proper math form!)

From what I understand I need to change “identify” part as follows:

identify var=sales(1,12) crosscorr=(price(1,12) income(1,12));

But even if that was correct, I am not sure how to change the estimate part. Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you very much, Koen, for the code, which I’ve slightly modified as below. If my understanding is correct, any *differencing applied to the disturbance leads to same differencing of each variable in the regression.* Thus, price and income inputs should be differenced in the same manner as the sales. Hence, I believe the code should be as follows, if you could kindly confirm whether it is correct or not:

proc arima data=a; identify var=sales(1,12) crosscorr=(price(1,12) income(1,12)); estimate p=(12 24) q=1 input=(price income) method=ml; run;

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

To be able to write the ESTIMATE statement correctly, you need to know about the transfer function(s) you want to specify for your input(s). The transfer function specification for an input variable is optional. But ... if no transfer function is specified, then the input variable enters the model as a simple regressor.

Example of such a transfer function specification.

`p=... q=... input=(3$(1,2)/(1,2,3)x)`

To find out about the "best" transfer function, ... there are diagnostics for that but still ... that could be a laborious job with PROC ARIMA.

If you use SAS Forecast Server with SAS High Performance Forecasting (HPF-procedures) or SAS Visual Forecasting (PROC TSMODEL) ... then the transfer function will be determined by the software. Much easier than using PROC ARIMA 😁.

(the transfer function determines how the input time series affects / influences the target time series.)

BR, Koen

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for your valuable feedback and suggestions. I will keep them in mind. The current issue I am dealing with does not involve a transfer function. As an example, please refer to the link (https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/etsug/etsug_arima_gettingstarted25.htm) that introduces "Regression with ARMA Errors". In this example, the specified error process is ARMA(1,1).

My question is, what adjustments are needed if the error process follows an ARIMA(0,1,1)(2,1,0,12) model instead ofARMA(1,1)? How should I modify the code provided in the example for this purpose? Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@sasalex2024 wrote:

"Regression with ARMA Errors". In this example, the specified error process is ARMA(1,1).

My question is, what adjustments are needed if the error process follows an ARIMA(0,1,1)(2,1,0,12) model instead ofARMA(1,1)? How should I modify the code provided in the example for this purpose? Thank you.

```
identify var=SALE( 1,12 )
nlag=xxxx noprint;
estimate p=( 12,24 ) q=1
noint method=ML
outmodel=_est_ converge=.0001 delta=.0001 maxiter=150
noprint;
```

Koen

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you very much, Koen, for the code, which I’ve slightly modified as below. If my understanding is correct, any *differencing applied to the disturbance leads to same differencing of each variable in the regression.* Thus, price and income inputs should be differenced in the same manner as the sales. Hence, I believe the code should be as follows, if you could kindly confirm whether it is correct or not:

proc arima data=a; identify var=sales(1,12) crosscorr=(price(1,12) income(1,12)); estimate p=(12 24) q=1 input=(price income) method=ml; run;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@sasalex2024 wrote:

Thank you very much, Koen, for the code, which I’ve slightly modified as below. If my understanding is correct, any

differencing applied to the disturbance leads to same differencing of each variable in the regression.Thus, price and income inputs should be differenced in the same manner as the sales. Hence, I believe the code should be as follows, if you could kindly confirm whether it is correct or not:

**It's correct !** 😊

Some remarks :

- It's common practice (and good practice) to apply the same simple and seasonal differencing to the inputs as the simple and seasonal differencing applied to the variable to be forecast. But it's not mandatory.
- If you apply a functional transformation to the variable to be forecast (like a natural log transformation), then some people apply the same functional transformation to the inputs, but other people specify no transformation for the inputs in that case. I cannot say one practice is more common than the other.

Koen

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.