* PS6.12 using DATA6-1 for Ramsey's RESET test - Example 6.9 SAMPLE 1 20 READ(data6-1) UNITCOST OUTPUT INPCOST * * Test whether a Linear Relationship is adequate. * * Regress UNITCOST against a Constant, OUTPUT, and INPCOST. Then save the * estimated UNITCOST (YHAT) with the PREDICT= option. * OLS UNITCOST OUTPUT INPCOST / PREDICT=YHAT * * Generate different powers of the estimated UNITCOST (YHAT). * GENR Y2=YHAT**2 GENR Y3=YHAT**3 GENR Y4=YHAT**4 * * Regress UNITCOST against a Constant, OUTPUT, INPCOST and the powers of the * estimated UNITCOST (YHAT). Test whether the coefficients on the powers of * the estimated UNITCOST variable are significant. * * OLS UNITCOST OUTPUT INPCOST Y2 Y3 Y4 TEST TEST Y2=0 TEST Y3=0 TEST Y4=0 END * * Note: * The RESET test may also be performed with the DIAGNOS command. * This command must immediately follow the OLS equation from which * the coefficients are to be tested. * ?OLS UNITCOST OUTPUT INPCOST DIAGNOS / RESET * * Repeat example with square of OUTPUT added to the model GENR OUTPUT2=OUTPUT**2 OLS UNITCOST OUTPUT INPCOST OUTPUT2 /PREDICT=YHAT5 GENR Y6=YHAT5**2 GENR Y7=YHAT5**3 GENR Y8=YHAT5**4 OLS UNITCOST OUTPUT INPCOST OUTPUT2 Y6 Y7 Y8 TEST TEST Y6=0 TEST Y7=0 TEST Y8=0 END DELETE / ALL STOP