* PS8.4, using DATA8-1, for the White's test of Example 8.5 read(data8-1) SALARY YEARS genr LNSALARY=log(SALARY) * generate squares and cross-products genr YRS2 = YEARS*YEARS genr YRS3 = YRS2*YEARS genr YRS4 = YRS2*YRS2 * estimate log quadratic model ols LNSALARY YEARS YRS2 / resid=uhat * generate squared residuals genr usq=uhat*uhat * auxiliary regression ols usq YEARS YRS2 YRS3 YRS4 * compute LM test statistic and p-value gen1 LM=$n*$r2 distrib LM / type=chi df=4 stop