)
As before, form a team of no more than three people and submit a paper jointly. However, each of you should do the exercise and then compare notes. If you divide it up, you will not learn the methodology very well. Also, be very careful in carrying out the steps. Remember the cliche "garbage in, garbage out." If you screw up, then start over again. The computer session doesn't take that long once you understand what is going on. If you need help, we are here. But you have do your part first. Bring relevant printouts.
You will be using Data6-4 in this computer assignment (see Page 651 for a description of this data set). The basic model is
1. Download the latest version of GRETL. Click
GRETL to download the new
version to your personal computer. Click the link to gretl_install.exe for
the program and data files and the link to manual.pdf for the complete
manual. Choose any location in the USA from which to download and click
the appropriate box. Keep all default settings.
2. Run GRETL, and select FILE, OPEN DATA, SAMPLE FILE, data6-4, and click
OPEN.
3. From the menu in the top row, select VARIABLE, DEFINE NEW VARIABLE.
In the box, type EDUC2=EDUC*EDUC and click OK. Repeat this and generate
EXPER2=EXPER*EXPER, AGE2=AGE*AGE, and LNWAGE=ln(WAGE).
4. From the top menu, select MODEL and OLS procedure. Choose the
dependent variable and the independent variables for the above Model 1.
Click OK to get OLS estimates for the model.
5. In the window for Model 1, Click MODEL DATA, ADD TO DATA SET, and
RESIDUALS. If you switch to the window with the list of variables, you
will find the new variable uhat1 added to the data list. In that
window, choose VARIABLE, DEFINE NEW VARIABLE. In the box, type
lnusq=ln(uhat1*uhat1). Minimize Model 1 window and note that lnusq has
been added in the variable list.
6. The auxiliary equation specifying the variance is assumed to have the
Harvey-Godfrey formulation given by
(2) lnusq = a1 + a2 EDUC + a3 EXPER + a4 AGE
+ a5 EDUC2 + a6 EXPER2 + a7 AGE2
In the main window that lists the variables, click MODEL, OLS, CHOOSE
lnusq as the dependent variable, and the variables in Model 2 as the
independent variables. Click OK to run this auxiliary regresion.
Part II --- Estimation by WLS
7. Next click MODEL DATA and ADD TO DATA SET. Select FITTED VALUES.
If you check the main GRETL window you will note that a new variable
yhat2 has been added. This is the predicted (estimated) ln(sigma
squared sub t).
8. You need to take the antilog of this to get the estimated error
variance. To do this, go to the main window and select VARIABLE,
DEFINE NEW VARIABLE. Generate usqhat=exp(yhat2), and wt=1/sqrt(usqhat)
which is the weight to be used.
9. THIS STEP IS DELICATE AND THEREFORE THINK BEFORE YOU ACT. Next
multiply both sides of Equation (A) by wt and write down the modified
model to be estimated by OLS. Using the method described above,
generate all the new variables needed to run this regression. For
example, create Y=wt*LNWAGE, X2=wt*EDUC, etc. Then use OLS to estimate
the model (you have to use Y as the dependent variable and remove the
const variable that represents the constant term.) Select the appropriate
variables and click OK to run the regression.
11. From the main menu, select MODEL and weighted least squares (NOT
OLS). Choose wt as the weight, LNWAGE (not Y) as the dependent
variable, and const, EDUC, EXPER, and AGE as the independent variables.
11. Close all windows and exit from the program. When asked about
saving the commands from the session and results, say YES and choose
hw1aout as the output file name. When asked about saving the data set,
select WAGE, EDUC, EXPER, AGE, EDUC2, EXPER2, AGE2, and LNWAGE and save
as data6-4a.gdt.
12. Print out the text file hw1out.txt. If you use NOTEPAD or MSWORD
to do that, be sure to change font to COURIER NEW size 10. Otherwise,
alignment will be messed up. If you did this correctly, the last two
regressions you ran should have identical results. Verify with others
whether you got the same results. Check commands carefully and make
sure there were no errors. Only the table with the
coefficients, t-stat, etc. should be identical. The rest of the numbers
like mean of dependent variable, model selection stats will be
different.
13. From the auxiliary regression (Model 2), copy the value of the
unadjusted Rsquared. Compute the value of test statistics,
LM=nRsquared. Under the null hypothesis of no HSK, LM has the
chi-square distribution with d.f. equal to the number of restrictions.
Use the chi-square table inside the front cover of the book and look up
the critical values for the level of significance 0.10. Using the LM
value you got, actually carry out the test.
14. Write a report describing what was done in each step, the null
hypothesis of no heteroscedasticity, the conclusion of the test for
heteroscedasticity and your overall assessment as to whether OLS is
adequate for the model or, if inadequate, state the reasons. For the
final model estimated by WLS (same as FGLS), state what the coefficients
mean. For instance if you increase experience by one year, what is the
numerical effect on wages? (read the section on log-linear model in
Chapter 6) Do the same for EDUC and AGE. Submit this report with the
computer printout attached.