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
- /
- Why does the model fit from PROC AUTOREG look like its "offset" when p...

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 07-24-2013 09:58 PM
(2051 views)

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

4 REPLIES 4

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

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

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

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

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

Hi Manuel -

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

Thanks,

Udo

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

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!

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

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.