UNIVERSITY OF CALIFORNIA, LOS ANGELES
Department of Economics
Economics 143 (Cameron) - Applied Regression
Analysis
Computing Lab Session #9:
Interest Rate Determination
Goal for this lab:
Review some of the key concepts in Problem Set #7:
- Run model interactively and view a number of plots of the relationships
among key variables
- Review simple model from basic Monetary Economics (equilibrium interest rate
determination as a function Money Demand and Money Supply)
- Examine consequences of failure to account for serial correlation in the
errors (by using plain OLS)
- Examine how goodness of fit is dramatically improved by the use of a more
appropriate AR model
- Examine AR(1) error specification:
et = rho*et-1 + Et
where E is a pure "white noise" random error.
- Examine AR(4) error specification (due to quarterly data):
et = rho1*et-1 + rho2*et-2
+ rho3*et-3 + rho4*et-4 +
Et
Details:
Keep this Web page active while you also access the usual SSC Lab Economics 143
window. You will need to "toggle" back and forth to receive instructions about
which commands to enter for your SHAZAM program. This page will then offer some
interpretation of what you see on the SHAZAM screen.
- Sketch a plot of r versus M with a vertical Money Supply curve (determined by
central bank policies) and a downward-sloping Money Demand curve. This simple
model of Money Demand and Money Supply suggests that interest rates depend
inversely on Money Supply and that outward shifts of the Money Demand curve
(resulting from higher incomes) cause equilibrium interest rates to rise. View
all of the empirical results in this exercise from the point of view of these
expected effects. In a model to explain equilibrium real interest rates, the
coefficient on real GNP should be positive, and the coefficient on real money
supply should be negative.
- Get into SHAZAM for Windows and open the file called intlab9.sha. You will also need the data in int2.dat.
- Browse down through the program intlab9.sha and notice that it does
several things. (You may want to read this as you first look at the program file,
and then go over it again as you execute the program.)
- A date variable is created to convert the uninformative observation numbers
into years, so we can readily identify the different time periods. (We should
have done something like this with the credit.sha program, so the crucial May 1987
observation could have been readily identified.)
- The program uses the time series for the price index to calculate the
quarterly rate of inflation on scale of 1992=100. This quarterly rate is
multiplied by 4 to yield the corresponding annualized rate (since the nominal
interest rate is quoted as an annualized rate).
- The real interest rate is calculated by taking the nominal interest rate
and subtracting off the rate of inflation.
- The nominal data for money supply (M1 and M2), and for GNP, are also
converted into real terms (constant 1992 dollar amounts). Note that since the
price index is based on 100.0, rather than 1.000, we should multiply the (nominal
amount/price index) by 100 so that we have not fundamentally changed the scale of
measurement. Notice, however, that such a change of scale would not change the
statistical significance of any variable (the t-ratio). It would affect the
magnitude of the coefficient and the magnitude of the standard error on that
coefficient, but not the variable's significance in the regression. The scale of
the coefficient would simply adjust to offset the change in scale of the
variable.
- We then do some preliminary simple regressions to see the pairwise
relationships between interest rates and money supply, or interest rates and gnp.
This will serve as background for the multiple regressions to come later. We will
see that these simple regession show each explanatory variable, entered
separately, to be statistically significant.
- For the OLS regression of realr on both realyp and realm2, note that we have
exercised the "resid=" option and the "predict=" option on OLS, which allows us to
save (a) the fitted sample regression function errors in "e" and (b) the fitted
values of the dependent variable (the Y-hat values) for each observation in a
variable which we choose to call "fitols" in this instance. We have also asked
for the exact Durbin-Watson test statistic for first-order serial correlation in
the errors, and for some diagnostics for multicollinearity.
- The we generate a number of lagged values of the error term, in order to
"line up" the current and lagged values of e in rows of the augmented data set.
We then look at a plot of et against et-1 and then
et against et-4 as examples. We will be looking at the
plots for visual evidence of serially correlated errors in these
data.
- Finally, we look at the results from an AUTO command, used instead of OLS.
The default option is "order=1" which is first-order serial correlation in the
errors. We then try analogous models that allow for AR(2) errors and then AR(4)
errors, just to see whether the fit of the model is substantially improved by
these even greater degrees of generalization.
- Recall what is going on in the background if you specify an AUTO regression:
SHAZAM does a preliminary OLS command and saves information about the errors to be
used in constructing an initial estimate of rho, the correlation between current
and last-period's errors. (Recall that rho can come from a STAT command on these
two errors, from a regression of et on et-1, or from the DW
test statistic, which is approximately equal to 2(1-rho).) SHAZAM then uses this
initial estimate of rho to form the "generalized differences" of every variable in
the regression (including the constant term). The transformed data allow a
regression of the form:
(Yt - rho*Yt-1) = b1(1-rho) +
b2(Xt - rho*Xt-1) + (et - rho*et-
1)
If the original error term was et = rho*et-1 +
Et, then the error term in the transformed model is just Et,
which has perfectly acceptable properties (if, indeed the error process is AR(1)).
SHAZAM then conveniently reports the results of the model (point estimates,
standard errors, t-ratios, as though the original OLS specification had been used.
With OLS, however, the standard errors were wrong. Now, they are correct because
they come from a model that has, by construction, acceptable error terms. Notice
the Durbin-Watson test statistic for the transformed model. It is very close to
2, which is the expected value of the DW test statistic if, in fact, the true rho
value is zero.
- We also look at the second-order and fourth-order AUTO results, each model
being a little more general in that it does not set to zero the effects of
greater-lagged error terms on the value of the current error term. The fourth-
order model captures the important relationship between et and et-
3 that shows up in the regression of current error on the full set of four
different lags of the error term. Watch what happens to the t-ratios on the slope
and intercept parameters as we go to more-and-more general models of the structure
of the error process. The more serial correlation we manage to purge from the
model, the more "correct" are the inferences to be drawn. Note the iterations
that the program undertakes to find the best value for rho. Iterations generally
belie a nonlinear optimization process in the background when you ask for a
particular procedure (like AUTO) to be done. Some serially correlated error
models estimate rho at the same time as the regression slopes and intercept,
treating all unknown parameters equivalently. The optimization produces
asymptotic t-test statistics that can be used to test whether any particular
estimates rho value is statistically significantly different from
zero.
- The last block in the program has a bunch of plot statements.
- Proceed as follows for the plots:
- look at how nominal interest, inflation, and real interest move
plot r infl realr date / gnu line
- plot all of the variables used in the model
plot realr realyp realm2 date / gnu line
Why is the line for realr coincident with the horizontal axis? Think about the
magnitude of the realr variable, as compared to the realyp and realm2 variables.
- check multicollinearity
plot realyp realm2 / gnu line
This is what I have been calling the "footprint" of the data for the model. The
line that joins the points traces the time path of the joint evolution of these
two variables. The lower left-hand end is the beginning of the data (1959),
whereas the upper right is the most recent stuff (second quarter of 1997). Notice
that there is fairly high multicollinearity. However, the two variable do display
some independent variation, since the relationship is not a straight line.
- look at the fit from an ols model
plot fitols realr date / gnu line
The variable "fitols" contains the fitted values of the dependent variable (the Y-
hats) from the plain (naive) OLS model. This plot shows the variability in the
actual data on realr, as opposed to the very smooth increase in realr predicted by
the model. Would you call this a model with good predictive power? We'll assess
this by looking at the R-squared value for this model when we run the program
again and save the output to a file. Would you get an enthusiastic reception from
the consortium of bankers who have pooled their resources to hire you as a
consultant on the matter of predicting interest rates??? Probably not.
- look for patterns in ols residuals
plot e date / gnu line
We saved the OLS residuals, so we can plot these as a function of time to see if
there appear to by "cycles" in the errors--patterns that would lead to a suspicion
of positive serial correlation.
- look at the fit from an AR(1) error model
plot fitauto realr date / gnu line
When we fitted an AR(1) error, we saved the fitted values as "fitauto." Examine
how well "fitauto" matches the actual data on real interest rates contained in
realr (as contrasted with "fitols"). How would you characterize the fit now.
Remember to check the R-squared value of the first AUTO command to see a measure
of the goodness of fit of this specification.
- look at the fit from an AR(2) error model
plot fitauto2 realr date / gnu line
We see similar much-improved fits from any of the AR models, as compared with the
OLS model.
- look at the fit from an AR(4) error model
plot fitauto4 realr date / gnu line
And again, a much better fit than OLS.
- The key part of the output to look at is the last part. Here is the output
from an OLS command with the / list option attached. After such a
regression, SHAZAM automatically saves and prints the actual and predicted values
of the dependent variable, followed by the implied sample regression errors
associated with each observation in the sample. The latter information is then
shown in a simple plot, where positive errors lie to the right of a center line,
and negative errors lie to the left. By scanning down this listing, it is usually
easy to discern visually whether there is a cyclical pattern to the errors. We
already saw this information in one of the nice gnu line plots, but the /list
option is one way to get better resolution on the error properties without having
to run graphics plots to see these errors. Since the data are printed out
vertically, there is no problem with the horizontal compression that obscures
everything interesting in a conventional horizontal dot-matrix plot.
Updated: 12/7/98; Prepared by: Trudy Ann Cameron; Site Index