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.
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;
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?
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!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.