Forecasting using SAS Forecast Server, SAS/ETS, and more

Why does the model fit from PROC AUTOREG look like its "offset" when plotted against actuals?

Reply
New Contributor
Posts: 2

Why does the model fit from PROC AUTOREG look like its "offset" when plotted against actuals?

I am using proc autoreg and when I compare the model's predicted values against actuals the model's predicted values appear to be offset by one period.  For instance, if I shift the model's predicted values back one period, that is, actuals for January are matched with the model's predicted value for February instead of January to January, the two line up a lot better.  Does this mean I am misspecifying the model, ignoring something or just don't know what I'm doing?  Any insight you can provide into this is greatly appreciated.

Manuel

SAS Employee
Posts: 416

Re: Why does the model fit from PROC AUTOREG look like its "offset" when plotted against actuals?

Hello -

In the case of a first-order AR process where the autoregressive parameter is exactly 1, the best prediction of the future is the immediate past.

With other words, you may be fitting a a random walk model.

Thanks,

Udo

New Contributor
Posts: 2

Re: Why does the model fit from PROC AUTOREG look like its "offset" when plotted against actuals?

Hi Udo,

Thank you for the reply.  I think I need to provide more information.  I have monthly data on balances and monthly data for economic variables, like gdp, unemployment, etc.  The code I am running is something like this:

proc autoreg data=work.data;

model balances = gdp unemployment / nlag=12 method=ml backstep dw dwprob archtest;

output out=result p=fit r=resid ucl=ucl lcl=lcl;

run;

Now, say that gdp and unemployment are significant and that proc autoreg fits an AR(1) process for the error term.  Now, when I plot fit and balances it looks like fit is "offset" by a period.  What I mean is that if I plot fit against lag(balances) the two line up better and the differences are smaller.  Balances has spikes and dips and the model fit reflects these spikes and dips but it does so on a lag.  The residuals are stationary and normally distributed but the MAPE is relatively high.  I can get MAPE to be lower if I get the differences between model fit and lag(balances), but I know that this is not right.

So, my question is this, is this something that normally happens or am I probably misspecifying the model?  All me test statistics pass (DW, Het-sked, normality, etc.).  Do you have insight into this?

Thank you,

Manuel

SAS Employee
Posts: 416

Re: Why does the model fit from PROC AUTOREG look like its "offset" when plotted against actuals?

Hi Manuel -

Would it be possible to share WORK.DATA as well?

Thanks,

Udo

New Contributor
Posts: 3

Re: Why does the model fit from PROC AUTOREG look like its "offset" when plotted against actuals?

Realizing that this is old thread, but it is still unanswered...

Manuel, what you are observing as an 'offset' in the plot is the error correction mechanism in action. The best way to observe the effects of the ECM would be to revise your plot and show actuals, structural (unconditional) forecasts, and error corrected (conditional) forecasts. On your output statement, use PREDICTEDM= and PREDICTED= for the structural and conditional forecasts, respectively. You will find that there is a substantial difference in fit visually. This is because, in an AR(1) model, the ECM 'corrects' the structural forecast for the current period by applying a percentage of the last period's residual (something a little different happens in the out-of-sample period). Your ECM forecasts will always be expected to 'follow' your actual values in the in-sample period. Be very cautious of relying on the goodness of the in-sample fit, as for this type of model, that may or may not be indicative of accurate forecasts.

Hope this helps any stragglers coming across this post!

Ask a Question
Discussion stats
  • 4 replies
  • 975 views
  • 0 likes
  • 3 in conversation