* Reference: Chapter 2 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. * The DIM command is used to allocate space for the * variables used in the prediction exercise. DIM voteA 174 shareA 174 SAMPLE 1 173 * The state code is a character variable. Therefore, a FORMAT * command is used to load the data. FORMAT(8X,A2,2X,F4.0,F6.0,F7.0,2F10.0,F7.0,2F11.0,F7.0) READ (VOTE1.shd) state district democA voteA expendA expendB & prtystrA lexpendA lexpendB shareA / FORMAT * Example 2.5, pp. 34-35 and Example 2.9, p. 41. * NOTE: Wooldridge revised the data set VOTE1.shd and therefore the * estimation results are different from the results reported in * the text. In the revised data set, candidate A has been randomized. * In obtaining the results for Example 2.5 (page 34), candidate A was * always the winning candidate. This results in a truncation problem, * and makes the results less appealing. GENR shareA=100*(expendA/(expendA+expendB)) GEN1 shareA:174=60 OLS voteA shareA * Question 2.3, p. 35 FC / LIST BEG=174 END=174 STOP