* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Fourth Edition, Wiley, 2011. * Working with the Simple Linear Regression Model * Chapters 2, 3, and 4. * Data set on food expenditure and weekly income from a * random sample of 40 households. SAMPLE 1 40 READ (food.dat) / names * The STAT command reports descriptive statistics (Table 2.1, p. 49) STAT food income * The OLS command reports a estimation results that include: * - OLS parameter estimates (p. 53) * - the income elasticity evaluated at the sample means (p. 55) * - estimated standard errors (p. 36). * Estimation results are summarized at top of page 56 * The OLS command also reports: * - the estimate of the error variance SIGMA**2 (p. 66) * - sum of squared residuals SSE (p. 66) * The LIST option gives the predicted values and residuals (Table 2.3, p. 66). * The right portion of SHAZAM output from the LIST option shows * a crude residual plot. * The PCOV option reports the estimated variances and covariances * of the least squares estimators (p. 66). * The OLS command also reports: * - t-test statistics for "tests of significance" and a p-value for * a 2-sided test. * - the R-square (p. 138). OLS food income / LIST PCOV * ------------------------------------------------------------- * The Effects of Scaling Data (Chapter 4.3.1, page 139) * ------------------------------------------------------------- * Rescale income GENR inc100=income*100 OLS food inc100 * ------------------------------------------------------------- * A Linear-Log Model (Chapter 4.3.3, page 144) * ------------------------------------------------------------- * Get log-transformed income GENR lninc=LOG(income) * The LINLOG option on the OLS command calculates elasticities * assuming log-transformed explanatory variables. OLS food lninc / LINLOG * ------------------------------------------------------------- * The Jarque-Bera test for normally distributed errors * (Chapter 4.3.5, page 146) * ------------------------------------------------------------- * On the OLS command the GF option reports tests for normality of the * errors including the Jarque-Bera test statistic and accompanying p-value. OLS food income / GF STOP