Chapter Contents 
Previous 
Next 
The AUTOREG Procedure 
Many time series exhibit high positive autocorrelation, having the smooth appearance of a random walk. This behavior can be explained by the partial adjustment and adaptive expectation hypotheses.
Shortterm forecasting applications often use autoregressive models because these models absorb the behavior of this kind of data. In the case of a firstorder AR process where the autoregressive parameter is exactly 1 (a random walk), the best prediction of the future is the immediate past.
PROC AUTOREG can often greatly improve the fit of models, not only by adding additional parameters but also by capturing the random walk tendencies. Thus, PROC AUTOREG can be expected to provide good shortterm forecast predictions.
However, good forecasts do not necessarily mean that your structural model contributes anything worthwhile to the fit. In the following example, random noise is fit to part of a sine wave. Notice that the structural model does not fit at all, but the autoregressive process does quite well and is very nearly a first difference (A(1) = .976).
title1 'Lack of Fit Study'; title2 'Fitting White Noise Plus Autoregressive Errors to a Sine Wave'; data a; pi=3.14159; do time = 1 to 75; if time > 75 then y = .; else y = sin( pi * ( time / 50 ) ); x = ranuni( 1234567 ); output; end; run; proc autoreg data=a; model y = x / nlag=1; output out=b p=pred pm=xbeta; run; proc gplot data=b; plot y*time=1 pred*time=2 xbeta*time=3 / overlay; symbol1 v='none' i=spline; symbol2 v=triangle; symbol3 v=circle; run;
The printed output produced by PROC AUTOREG is shown in Output 8.3.1 and Output 8.3.2. Plots of observed and predicted values are shown in Output 8.3.3.
Output 8.3.1: Results of OLS Analysis: No Autoregressive Model Fit

Chapter Contents 
Previous 
Next 
Top 
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.