|
Chapter Contents |
Previous |
Next |
| The AUTOREG Procedure |
In this example, the annual real output series is analyzed over the period 1901 to 1983 (Gordon 1986, pp 781-783). With the DATA step, the original data is transformed using the natural logarithm, and the differenced series DY is created for further analysis. The log of real output is plotted in Output 8.1.1.
title 'Analysis of Real GNP';
data gnp;
date = intnx( 'year', '01jan1901'd, _n_-1 );
format date year4.;
input x @@;
y = log(x);
dy = dif(y);
t = _n_;
label y = 'Real GNP'
dy = 'First Difference of Y'
t = 'Time Trend';
datalines;
... datalines omitted ...
;
proc gplot data=gnp;
plot y * date /
haxis='01jan1901'd '01jan1911'd '01jan1921'd '01jan1931'd
'01jan1941'd '01jan1951'd '01jan1961'd '01jan1971'd
'01jan1981'd '01jan1991'd;
symbol i=join;
run;
Output 8.1.1: Real Output Series: 1901 - 1983
|

where


The preceding trend-stationary model assumes that uncertainty over future
horizons is bounded since the error term,
, has a finite
variance.
The maximum likelihood AR estimates are shown in Output 8.1.2.
proc autoreg data=gnp;
model y = t / nlag=2 method=ml;
run;
Output 8.1.2: Estimating the Linear Trend Model

where
and y0=0.
In general, the difference-stationary process is written as

where L is the lag operator. You can observe that
the class of a difference-stationary process should have at least one unit root
in the AR polynomial
.
The Dickey-Fuller procedure is used to test the null hypothesis that the series has a unit root in the AR polynomial. Consider the following equation for the augmented Dickey-Fuller test:

where
.
The test statistic
is the usual t ratio for
the parameter estimate
, but
the
does not follow
a t distribution.
The %DFTEST macro computes the test statistic
and its p value to perform the Dickey-Fuller test.
The default value of m is 3,
but you can specify m with the AR= option.
The option TREND=2 implies that the Dickey-Fuller test equation
contains linear time trend. See Chapter 4, "SAS Macros and Functions," for details.
%dftest(gnp,y,trend=2,outstat=stat1) proc print data=stat1; run;
The augmented Dickey-Fuller test indicates that the output series may have a difference-stationary process. The statistic _TAU_ has a value of -2.61903 and its p-value is 0.29104. See Output 8.1.3.
Output 8.1.3: Augmented Dickey-Fuller Test Results|
|


The estimated value of
is -0.297 and that of
is 0.0293. All estimated values are statistically
significant.
proc autoreg data=gnp;
model dy = / nlag=1 method=ml;
run;
Output 8.1.4: Estimating the Differenced Series with AR(1) Error
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.