* * Example 6.4 * J. Wooldridge, Econometrics of Cross Section and Panel Data * * Note: The sample data files include all required data transformations. * However, in many cases we show how these data transformations would * be created in RATS from the basic data, as this is something you will * need to know how to do in practice. * open data nls80.raw data(format=free,org=columns) 1 935 wage hours iq kww educ exper tenure age $ married black south urban sibs brthord meduc feduc lwage * set lwage = log(wage) linreg lwage / resids # constant exper tenure married south urban black educ * * RESET specification test. * This shows the mechanics of doing the test. At the end of this, we'll show how * to use a RATS procedure to do this more easily. * prj lwagehat set y2 = lwagehat**2 set y3 = lwagehat**3 set y4 = lwagehat**4 * * Regress the residuals on the original explanatory variables plus the powers of * y hat. Use TRSQ as the test statistic. The numerical results differ slightly * because the test statistic in the text is based upon a rounded R**2. * linreg resids # constant exper tenure married south urban black educ y2 y3 cdf(title="RESET-3rd order") chisqr %trsq 2 linreg resids # constant exper tenure married south urban black educ y2 y3 y4 cdf(title="RESET-4th order") chisqr %trsq 3 * * The @RegRESET(h=power) procedure is applied immediately after the regression * that you want to test. * linreg lwage # constant exper tenure married south urban black educ @RegRESET(h=3) @RegRESET(h=4)