* Reference: Chapters 4, 7 and 15 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. SAMPLE 1 471 READ (JTRAIN.shd) year fcode employ sales avgsal scrap rework tothrs & union grant d89 d88 totrain hrsemp lscrap lemploy & lsales lrework lhrsemp lscrap_1 grant_1 clscrap cgrant & clemploy clsales lavgsal clavgsal cgrant_1 chrsemp clhrsemp SET MISSVALU=-999 SET SKIPMISS SET NOWARNMISS * Example 4.7, pp. 132-133 * Restrict the sample to 1987 SET NOWARNSKIP SKIPIF (YEAR.NE.1987) * Obtain summary statistics of the variables * The SAMEOBS option restricts the sample to ensure that all * observations for all variables are non-missing. * This option is available with Version 9 - May 2002, or later versions. STAT scrap lscrap hrsemp lsales lemploy / SAMEOBS * OLS estimation OLS lscrap hrsemp lsales lemploy * The textbook example works with a sample of 30. * The total observations available is 43. Exercise 4.7, p. 157 * reports the estimation results with 43 observations that * can be compared with the SHAZAM estimation results. * Find the effect on the scrap rate for 5 additional hours of training. TEST 5*100*hrsemp * Again, the above result is based on a sample of 43 observations -- * the textbook example is working with 30 observations. DELETE SKIP$ * Example 7.3 * Restrict the sample to 1988 SET NOWARNSKIP SKIPIF (YEAR.NE.1988) * Equation (7.7), p. 217. OLS hrsemp grant lsales lemploy * Section 7.6 * Equation (7.33), p. 238. OLS lscrap grant lsales lemploy DELETE SKIP$ * Example 15.10 * Consider two years 1987 and 1988. SKIPIF (YEAR.NE.1987) COPY scrap scrap87 COPY hrsemp hrsemp87 COPY grant grant87 DELETE SKIP$ SKIPIF (YEAR.NE.1988) COPY scrap scrap88 COPY hrsemp hrsemp88 COPY grant grant88 DELETE SKIP$ GEN1 NOBS=471/3 SAMPLE 1 NOBS * Calculate first differences * Use SET NOWARN to suppress warning messages about missing * observations with LOG. SET NOWARN GENR dlscrap=LOG(scrap88)-LOG(scrap87) SET WARN GENR dhrsemp=hrsemp88-hrsemp87 GENR dgrant=grant88-grant87 * Regression results on p. 490. OLS dhrsemp dgrant 2SLS dlscrap dhrsemp (dgrant) * Compare the 2SLS estimates with OLS OLS dlscrap dhrsemp STOP