* * Example 11.9, page 422. * open data table6-4.prn data(format=prn,org=columns) 1 64 * linreg cm / resids # constant pgnp flr * * Park test * prj cmhat set usq = resids**2 linreg usq # constant cmhat * * Glejser test * set absu = abs(resids) linreg absu # constant cmhat * * White test - done using auxiliary regressions * set gnpsq = pgnp**2 set flrsq = flr**2 set gnpflr = pgnp*flr linreg usq # constant pgnp flr gnpsq flrsq cdf(title="White Test Omitting Cross Term") chisqr %trsquared 4 linreg usq # constant pgnp flr gnpsq flrsq gnpflr cdf(title="White Test Including Cross Term") chisqr %trsquared 5 * * White test - done using the RegWhiteTest procedure. You apply this immediately * after the regression that you want to test. Use the TYPE=NOCROSS option to get * the test without the cross terms. * linreg cm # constant pgnp flr @RegWhiteTest @RegWhiteTest(type=nocross) * * Regression with White standard errors (done using the ROBUSTERRORS option). * Note that this doesn't change the coefficients, only the std errors and t-stats. * linreg(robusterrors) cm # constant pgnp flr