PROBLEM 12: CORRECTING FOR AUTOCORRELATION
(Kmenta 1986, 2nd edition, pp. 311-323 and P&R pp. 154-158).
OBJECT OF THE PROBLEM
To correct for autocorrelation using the Hildreth-Lu method. To
use the Cochrane-Orcutt procedure for correcting for
autocorrelation as found in PROC AUTOREG. To gain some experience
using the Econometric Software Package (ESP).
INTRODUCTION
One of several methods available for correcting for
autocorrelation is the Hildreth-Lu method. This method uses a
grid search procedure to find the value of rho which minimizes
the sum of squared residuals. Rho is used to transform all of the
variables in the model by subtracting from them the value of rho
multiplied by the value of the previous observation of the
variable.
Because SAS does not have a procedure for doing the
Hildreth-Lu method we use ESP to do the analysis.
On pages 316 to 317 Kmenta presents an example of the use of
the Hildreth-Lu procedure involving the estimation of a
consumption function.
The Cochrane-Orcutt procedure for correcting for
autocorrelation uses the OLS residuals to calculate rho. Rho is
then used to transform the observations of the dependent and
independent variables, and these new variables are used in a
reestimation of the model. The residuals from the new model are
then used to transform the transformed variables. The process
continues until convergence is reached in the values of the
betas.
PROC AUTOREG in SAS uses the Cochrane-Orcutt method to
correct for autocorrelation. The order (iteration) of the error
process must be specified in AUTOREG.
PROBLEM PROGRAM FOR HILDRETH-LU PROCEDURE
The following program can be used to complete Kmenta's problem.
Note: Before submitting this problem for batch processing, the
dataset must be unnumbered. ESP will not run on numbered
datasets. Unnumbering can be done while in EDIT mode by typing in
UNNUM. Be sure that verify is on.
//PROB12A JOB (AF,A592),yourname,REGION=4096K
/*OPENBIN
//S1 EXEC ESP
//FT24F001 DD DUMMY
//FT34F001 DD DUMMY
//SYSIN DD *
$$NAME, HILDLU$
LOAD$
SMPL 1 20$
IDGENR ID 1 1$
OLSQ CONS,C,MONEY$
HILU -.95,.9,.05,CONS,C,MONEY$
CORC CONS,C,MONEY$
END$
SMPL 1 20$
LOAD CONS$
214.6 217.7 219.6 227.2 230.9 233.3 234.1 232.3 233.7 236.5 238.7
243.2 249.4 254.3 260.9 263.3 265.6 268.2 270.4 275.6$
SMPL 1 20$
LOAD MONEY$
159.3 161.2 162.8 164.6 165.9 167.9 168.3 169.7 170.5 171.6 173.9
176.1 178.0 179.1 180.2 181.2 181.6 182.5 183.3 184.3$
END$
//
DISCUSSION OF THE HILDRETH-LU PROGRAM
Because this is the first problem in which you use ESP this
section will carefully discuss the program. The JCL for the
program is similar to that found in SAS. The ESP portion of the
program begins with a NAME card. Note that in ESP a line ends
with a "$," not a ";" as in SAS. The NAME card simply identifies
the program. The NAME card is followed by the LOAD card which
helps read in our data to the program. The next card, the SMPL
card, controls the number of observations to be used in the
analysis. In this case we are using observations one to twenty.
The next part of the program begins our estimation
procedures. First, we just run ordinary least squares (OLS) for
comparison purposes. Second we run the Hildreth-Lu procedure,
specified as "HILU." Within the HILU statement we must specify
the variables to be used in the analysis as well as the range of
iterations and the steps of iteration. The first number following
HILU specifies the beginning value for searching for rho. The
second number specifies the last value for iteration, and the
next number the amount to increment between iterations. The next
value on the line specifies the dependent variable. The last
observation(s) specifies the independent variable(s). The C is
used to include the intercept term in the analysis.
In addition to running the Hildreth-Lu correction we also do
the Cochrane-Orcutt procedure (CORC) so that you can compare
results. For all these models the first variable specified is the
dependent variable, CONS, and is followed by the intercept
term,C, and the explanatory variable, MONEY.
The section of the program following the first "END"
statement reads in the data. It uses a SMPL card to control the
number of variables. The procedure chosen here for loading the
data is to first load the consumption data in an array and then
the money data. They could have been loaded simultaneously but
only with one observation per line (i.e. LOAD CONS MONEY$). With
the technique used we can put many observations on one line. This
part of the program is completed with an END statement. the data
for the problem are those supplied by Kmenta on pp. 316-317.
INSTRUCTIONS FOR WRITE-UP
Give an intuitive and econometrics notation explanation of each
step of the program, and an intuitive explanation of what the
problem is trying to accomplish. Write out each of the estimated
models and analyze them (in terms of t and F-statistics, R-
Square, etc.). Give an intuitive explanation of each model. Label
all output. Draw a Durbin-Watson distribution, for each model
complete with critical points to help in the analysis of the
Durbin-Watson statistic supplied. How many iterations does it
take for convergence? What are the properties of the OLS
estimators (before and after correction for autocorrelation)?
The Cochrane-Orcutt procedure for correcting for
autocorrelation uses the OLS residuals to calculate rho. Rho is
then used to transform the observations of the dependent and
independent variables, and these new variables are used in a
reestimation of the model. The residuals from the new model are
then used to transform the transformed variables. The process
continues until convergence is reached in the values of the
betas.
PROC AUTOREG in SAS uses the Cochrane-Orcutt method to
correct for autocorrelation. The order (iteration) of the error
process must be specified in AUTOREG.
PROBLEM PROGRAM FOR COCHRANE-ORCUTT ITERATIVE PROCEDURE
The following program is an example of the use of PROC AUTOREG:
//PROB12B JOB (AF,A592),yourname,REGION=4096K
/*OPENBIN
//S1 EXEC SAS
//ESPDATA DD DSN=ACAD.ECONOMIC.QRTRLY,DISP=SHR
//SYSIN DD *
DATA MACRO; INFILE ESPDATA;
INPUT GNP 28-36 #2 MS 55-63 #4 UNE 1-9 BEH 28-36 #10;
N+1; IF N>100 THEN STOP;
LABEL GNP = GROSS NATIONAL PRODUCT
MS = M1 DEFINITION OF MONEY SUPPLY
UNE = UNEMPLOYMENT RATE
BEH = BUDGET EXPENDITURES HIGH EMPLOYMENT;
PROC REG; MODEL UNE=GNP MS BEH/DW;
PROC AUTOREG; MODEL UNE=GNP MS BEH/NLAG=1;
MODEL UNE=GNP MS BEH/NLAG=3;
MODEL UNE=GNP MS BEH/NLAG=5;
MODEL UNE=GNP MS BEH/NLAG=7;
//
DISCUSSION OF THE COCHRANE-ORCUTT PROGRAM
The procedure for calling the data should be familiar to you by
now. Once we have the data we first run PROC REG to check the
Durbin-Watson statisitcs. Then we use PROC AUTOREG and specify
lags of 1, 3, 5, and 7 for the autoregressive process. By
comparing the AUTOREG results we can determine which process is
best. This is done by looking at the t-statistics, Rsquare, and
MSE in the AUTOREG output.
INSTRUCTIONS FOR WRITE-UP
Give an intuitive and econometrics notation explanation of each
step of both programs, and an intuitive explanation of what each
problem is trying to accomplish. Write out each of the estimated
models and analyze them (in terms of t and F-statistics, R-
Square, etc.). Give an intuitive explanation of each model. Is
there autocorrelation in the primary model? How can you tell?
Which model corrects for the autocorrelation best (assuming that
there is some)? Why? Label all output. Draw a Durbin-Watson
distribution, for each model complete with critical points to
help in the analysis of the Durbin-Watson statistic supplied. How
many iterations does it take for convergence, in the Hildreth-Lu
method? What are the properties of the OLS estimators (before and
after correction for autocorrelation)? In general, what are the
properties of the OLS estimators (before and after correction for
autocorrelation)?