* Reference: Chapter 7 of * Ernst R. Berndt, The Practice of Econometrics, Addison-Wesley, 1991. SAMPLE 1 42 READ (UKELEC) / NAMES * Exercise 1, p. 337. * (a) NAMEFMT(2X,5(2X,A8)) FORMAT(5F10.2) PRINT MC4 MC6 MC8 GAS6 GAS8 / FORMAT * (c) GENR AVGPE=240*EXPEN/KWH GENR F=EXPEN-MC8*KWH/240 GENR RATIO=F/EXPEN PRINT AVGPE MC8 F RATIO STAT RATIO * (d) STAT KWH INC MC6 GAS6 CAP / PCOR GENR LNX=LOG(KWH) GENR LNM=LOG(INC) GENR LNPE2=LOG(MC6) GENR LNPG2=LOG(GAS6) GENR LNH=LOG(CAP) STAT LNX LNM LNPE2 LNPG2 LNH / PCOR * Exercise 3, p. 339. * (a) GENR PRECIP=1/MC6 * The ANOVA option reports the "Equation F-statistic" as a test * for the overall significance of the regression. OLS KWH INC PRECIP GAS6 CAP / ANOVA RESID=E * (b) Heteroskedasticity * Test for heteroskedasticity DIAGNOS / HET * Another test GENR E2=E**2 GENR Z=1/CUST * An artificial regression - look at the statistical significance * of the coefficient on Z. OLS E2 Z * The HETCOV option gives standard error estimates that are robust * under heteroskedasticity. OLS KWH INC PRECIP GAS6 CAP / HETCOV * GLS - Weighted Least Squares OLS KWH INC PRECIP GAS6 CAP / WEIGHT=CUST ANOVA * (d) A log-log model. OLS LNX LNM LNPE2 LNPG2 LNH / LOGLOG ANOVA RESID=E * Test for heteroskedasticity. DIAGNOS / HET GENR E2=E**2 OLS E2 Z STOP