Calcite | Level 5

## How to generate forecast with autoregressive distributed lag models?

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.

SAS Employee

## Re: How to generate forecast with autoregressive distributed lag models?

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

Discussion stats