Testing for Specification Error using Stata

The steps we will follow in examining specification error will be:

Run the regression analysis

Two regression runs are compared. The first regresses presidential approval on Real GNP, the CPI, and the unemployment rate. Note that this is the very weak fit we have observed in earlier examples.

Test for Specification error

To run the Ramsey RESET test, simply use either

ovtest

or

ovtest, rhs

Note that both the RESET test with powers of the fitted values of approval and the test with the powers of the independent variables produces a significant F test for specification error.

Improve the Model and try again

In order to improve the specification we can change the model specification in some relatively simple ways. First, the rate of growth in the economy is likely to more of a direct impact on approval than the actual level which rises steadily throughout the entire period. Likewise the CPI can give us the quarterly inflation rate, which again captures the immediate trend in the economy. This is the regression of approval on the growth in GNP, the inflation rate, the unemployment rate, a political party of the President dummy variable, and two dummy variables for the Vietnam and Korean wars. The Stata .do file to do this is available.

This model is clearly a better fit. Every variable except the political party of the president is statistically significant, and the r-square has gone up substantially. This model would seem to have resolved (or at least reduced) the specification error that the RESET test indicates is present. A further application of the Ramsey test indicates that specification error reduction has clearly occurred, but that some specification error is still present. Criteria for selecting between the two versions of the test is unclear. I would suggest that it indicates whether the specification error is likely to be related the functional form of the variables currently in the model (powers of the independent variables version), or simply exogenous to the current model entirely (powers of fitted values version).

Specification error appears substantially reduced, going by the magnitude of the F values, but it still appears significent when we test with the powers of the independent variables. This might suggest the functional form of the model needs examinating as well as the variables included. To do this we might consider non-linear models, but we will look at a lagged endogenous variable first.

Run the regression model with the lagged approval variable


Test for autocorrelation with a lagged endogenous variable

durbina


Add an additional lag


Test for extraneous lags using the Schwartz or Aikake Information Criteria

lrtest A B, stats

Run a Stepwise Regression using Stata

sw regress approval grgnp infrate unemrate ptydum Korea Vietnam, pr(.2) pe(.1)