The AUTOREG Procedure |
This example illustrates the use of ODS GRAPHICS. This is a continuation of the section Forecasting Autoregressive Error Models.
These graphical displays are requested by specifying the ODS GRAPHICS statement. For information about the graphs available in the AUTOREG procedure, see the section ODS Graphics.
The following statements show how to generate ODS GRAPHICS plots with the AUTOREG procedure. In this case, all plots are requested using the ALL option in the PROC AUTOREG statement, in addition to the ODS GRAPHICS statement. The plots are displayed in Output 8.7.1 through Output 8.7.8. Note: these plots can be viewed in the Autoreg.Model.FitDiagnosticPlots category by selecting ViewResults.
data a; ul = 0; ull = 0; do time = -10 to 36; u = + 1.3 * ul - .5 * ull + 2*rannor(12346); y = 10 + .5 * time + u; if time > 0 then output; ull = ul; ul = u; end; run; data b; y = .; do time = 37 to 46; output; end; run; data b; merge a b; by time; run;
proc autoreg data=b all plots(unpack); model y = time / nlag=2 method=ml; output out=p p=yhat pm=ytrend lcl=lcl ucl=ucl; run;
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.