* PS6.11 using DATA6-4 for Example 6.8 SAMPLE 1 49 READ(data6-4) WAGE EDUC EXPER AGE * Generate the logged wages. GENR LNWAGE=LOG(WAGE) * * The residuals from the Basic Model is saved in the vector called UT which * will be used as the dependent variable in the Auxiliary Regression. * OLS LNWAGE EDUC EXPER AGE / RESID=UT LOGLIN * * Generate the squared values for EDUC, EXPER and AGE. * GENR EDUC2=EDUC**2 GENR EXPER2=EXPER**2 GENR AGE2=AGE**2 * * Estimate the Auxiliary Regression. * OLS UT EDUC EXPER AGE EDUC2 EXPER2 AGE2 * * Calculate and print the LM test statistic using the GEN1 and PRINT commands. * The number of observations in the Auxiliary Regression is saved in * the temporary variable $N and the Unadjusted R-square is saved in the * temporary variable $R2. * GEN1 LM=$N*$R2 PRINT LM SAMPLE 1 1 DISTRIB LM / TYPE=CHI DF=3 * DELETE / ALL STOP