* * Example 11.1, page 404. * Heteroscedasticity testing. * all 9 * * The only lines in Table 11.1 that we need are the 11th and 13th, which give the * average compensation and average productivity. These can be obtained easily * with a copy and paste. The "industry" number is deleted. Note, however, a typo * in y(5) in the text file, which is corrected below. * data(unit=input,format=free) / y x 3396.00 3787.00 4013.00 4104.00 4146.00 4241.00 4387.00 4538.00 4843.00 9355.00 8584.00 7962.00 8275.00 8389.00 9418.00 9795.00 10281.00 11750.00 linreg y # constant x set u = %resids * * Park test for heteroscedasticity * set logusq = log(u**2) set logx = log(x) linreg logusq # constant logx * * Glejser test. Results in the book seem to be slightly off. * set absu = abs(u) linreg absu # constant x * * Koenker-Bassett test (page 415) * prj yhat set usq = u**2 set yhatsq = yhat**2 linreg usq # constant yhatsq