Economics 421/521

Winter 2012

Solution to Homework 3

1. Using this data set, repeat the example from class for the first of the three cases we discussed, i.e. first regress the log of salary on a constant and the two variables proxying for experience, years and years^{2}:

log(salary) = β_{0} + β_{1}*years + β_{2}*years^{2} + u_{t}

Then, form the estimated residual squared (resid^{2}) and perform the LM test for heteroskedasticity (note: resid is the estimated value of u_{t}).

To do this problem, first read the data in from the Excel spread sheet:

Then, transform the data to get the log of salary and years squared:

Regress the log of salary on a constant, years, and years squared:

To do the test, we need the square of the residuals from this regression:

Regress the squared residuals on a constant, years, and years squared:

The results are:

The test statistic is

NR^{2} = 222*.0747 = 16.59

This is distributes Chi-Square with 2 degrees of freedom, so the critical value (5%) is 5.99. Therefore, the null of no heteroskedasticity is rejected.

2. To do this problem, first regress the log of salary on a constant, years, and years squared:

Next, square the residuals to get an estimate of the variance for each observation, uhatsq:

Regress this on a constant, years, and years squared (this is the model of the variance):

Next, we need the predicted value of the variance. To get the predicted value, we can simply subtract the estimated residuals from the left-hand side variables (this uses that actual Y = predicted Y + predicted error):

Or, you can get exactly the same values by using the forecast button on the regression output:

The next step is to ensure that all the estimates of the variance are positive. If any are negative, they should be replaced by their absolute values:

We need the square root of this value to use in transforming the original data:

Use this value to transform the data:

Use the transformed values to obtain BLUE estimates

The result is:

3. The test statistic is N*R^{2}. In this case, N=30 and R^{2}=.9878 so that the test statistic is 29.624. The 5% critical value for this test is 11.07 (the test is Chi-Square with 5 degrees of freedom, 5 because if the error is homoskedastic, then the coefficients on G, Y, their squared values, and their cross-product must all be zero). Because the test statistic exceeds the critical value, the null of homoskedasticity is rejected.

4. Here is the uncorrected regression from the last homework:

To do White's test, click the view button, then as follows:

Here's the result:

Looking at the line with Obs*R-squared, we see that the probability is les than .05, the significance level, hence the null of no heteroskedasticity is rejected.

To correct the model, run a regression as usual:

Click on options to bring up this screen and click the boxes as shown:

Hit OK to return to this screen:

Hit OK to get this output:

Notice that the coefficient estimates are identical (compare to the original values given above), White's correction fixes the standard errors after the regression is estimated, but it doesn't change the estimates.

5. What are the consequences of estimating an autoregressive model using OLS?

The coefficients remain unbiased, but OLS is inefficient, and OLS results in biased estimates of the standard errors (so the test statistics, e.g. t's and F's, are wrong)

## Comments