Chapter Contents |
Previous |
Next |

The AUTOREG Procedure |

One of the key assumptions of the ordinary regression model is
that the errors have the same variance throughout the sample.
This is also called the *homoscedasticity* model.
If the error variance is not constant, the data are said to be
*heteroscedastic*.
Since ordinary least-squares regression assumes constant error variance,
heteroscedasticity causes the OLS estimates to be inefficient.
Models that take into account the changing variance can make more
efficient use of the data.
Also, heteroscedasticity can make the OLS forecast error variance inaccurate
since the predicted forecast variance is based on the average variance
instead of the variability at the end of the series.

To illustrate heteroscedastic time series, the following statements re-create the simulated series Y. The variable Y has an error variance that changes from 1 to 4 in the middle part of the series. The length of the series is also extended 120 observations.

data a; ul = 0; ull = 0; do time = -10 to 120; s = 1 + (time >= 60 & time < 90); u = + 1.3 * ul - .5 * ull + s*rannor(12346); y = 10 + .5 * time + u; if time > 0 then output; ull = ul; ul = u; end; run; title "Heteroscedastic Autocorrelated Time Series"; proc gplot data=a; symbol1 v=dot i=join; symbol2 v=none i=r; plot y * time = 1 y * time = 2 / overlay; run;

The simulated series is plotted in Figure 8.10.

To test for heteroscedasticity with PROC AUTOREG, specify the ARCHTEST option. The following statements regress Y on TIME and use the ARCHTEST option to test for heteroscedastic OLS residuals. The DWPROB option is also used to test for autocorrelation.

proc autoreg data=a; model y = time / nlag=2 archtest dwprob; output out=r r=yresid; run;

The PROC AUTOREG output is shown in Figure 8.11.
The Q statistics test for changes in variance across time
using lag windows ranging from 1 through 12.
(See "Heteroscedasticity and Normality Tests" for details.)
The *p*-values for the test statistics are given in parentheses.
These tests strongly indicate heteroscedasticity,
with *p* < 0.0001 for all lag windows.

The Lagrange multiplier (LM) tests also indicate heteroscedasticity. These tests can also help determine the order of the ARCH model appropriate for modeling the heteroscedasticity, assuming that the changing variance follows an autoregressive conditional heteroscedasticity model.

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.