turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- Why does the model fit from PROC AUTOREG look like...

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-24-2013 09:58 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shark

07-25-2013 10:26 AM

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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to udo_sas

07-25-2013 07:13 PM

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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shark

07-26-2013 09:21 AM

Hi Manuel -

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

Thanks,

Udo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to shark

07-10-2015 02:19 PM

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!