Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- Re: How to generate forecast with autoregressive distributed lag model...

Options

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

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

Posted 10-23-2020 12:23 PM
(546 views)

I am looking to generate ex post forecasts from an ADL(1,1) model. So after the first observation the lagged dependent variable value is not the prior period actual value but rather the prior period predicted value. And this is carried on over the forecast horizon. I do not see that as possible using a SAS procedure (e.g., AUTOREG) so I think this has to be separate coding exercise/macro. Any help anyone can share would be greatly appreciated. Say I have a ADL model with two X variables and one period lags. Thanks.

1 REPLY 1

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

Hi @su17 ,

If you have already used PROC AUTOREG to estimate your model, then one approach you can use to compute forecasts as you described is PROC SIMLIN. (This is an old procedure, but useful for this case!) A second approach is to use PROC MODEL to estimate the model parameters and compute the simulated values in one step. The OUT= data sets produced by these two procedures are structured differently, but the results should be the same for your linear model. Both approaches are illustrated in the syntax below:

```
/* Approach 1 */
proc autoreg data=a outest=est;
model y=lag_y lag_x1 lag_x2;
run;
proc simlin data=a est=est start=2;
endo y;
exog lag_x1 lag_x2;
lagged lag_y y 1;
output out=simlin_out p=expost;
run;
proc print data=simlin_out;
run;
/* Approach 2 */
proc model data=a;
endo y;
exog x1 x2;
parms b0 a b1 b2;
y = b0 + a*lag(y) + b1*lag(x1) + b2*lag(x2);
fit y / outest=mod_est;
solve y / estdata=mod_est start=1 out=model_out outactual outpredict;
run;
quit;
proc print data=model_out;
run;
```

If the approaches described above do not produce your desired results, then please provide an example which illustrates your model and expected results.

I hope this helps!

DW

📢

**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.** **

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.