* Reference: Chapters 4 and 7 of * Jeffrey M. Wooldridge, Introductory Econometrics: A Modern Approach, * South-Western College Publishing, 2000. SAMPLE 1 353 READ (MLB1.shd) salary teamsal nl years games atbats runs hits & doubles triples hruns rbis bavg bb so sbases & fldperc frstbase scndbase shrtstop thrdbase outfield catcher & yrsallst hispan black whitepop blackpop hisppop pcinc gamesyr & hrunsyr atbatsyr allstar slugavg rbisyr sbasesyr runsyr percwhte & percblck perchisp blckpb hispph whtepw blckph hisppb lsalary SET MISSVALU=-999 SET SKIPMISS SET NOWARNMISS * Section 4.5 * Equation (4.31), p. 140. OLS lsalary years gamesyr bavg hrunsyr rbisyr * Test the hypothesis that the variables bavg, hrunsyr and rbisyr * have no effect on players' salaries. * See the F statistic on p. 145. * The TEST command is used for calculating F-test statistics * for testing a joint hypothesis. TEST TEST bavg=0 TEST hrunsyr=0 TEST rbisyr=0 END * Example 7.11 * Generate interaction variables GENR blckpb=black*percblck GENR hispph=hispan*perchisp * Obtain summary statistics on the percentages of blacks and * Hispanics in the cities in the sample. STAT percblck perchisp * Equation (7.19), p. 229 OLS lsalary years gamesyr bavg hrunsyr rbisyr runsyr fldperc & allstar black hispan blckpb hispph * Test of significance TEST TEST black=0 TEST hispan=0 TEST blckpb=0 TEST hispph=0 END * In a city with 10% blacks, estimate the impact on salary for blacks * compared to whites. TEST black+blckpb*10 * In a city with 20% blacks, estimate the impact on salary for blacks * compared to whites. TEST black+blckpb*20 * Find the percentage of Hispanics required to make a zero differential * between whites and Hispanics. TEST -hispan/hispph STOP