Econometrics PS 3
Follow the instructions of completing your problem set detailed in the syllabus.
This problem set covers the variants on multiple regression from the slides (06_mlrvariants). Whenever you are asked to compare models, report the estimates side by side using the stargazer or modelsummary package. Interpret all coefficients in complete sentences.
Question 1
Load the vote1 dataset from the wooldridge package. Each observation is a 1988 U.S. House of Representatives race between two candidates, A and B. The variables you need are:
-
voteA: percentage of the vote received by candidate A -
expendA,expendB: campaign spending by candidates A and B, in $1,000s -
prtystrA: percentage of the most recent presidential vote in the district that went to A’s party
Estimate the model voteA_i = \beta_0 + \beta_1 expendA_i + \beta_2 expendB_i + \beta_3 prtystrA_i + u_i and interpret \hat{\beta}_1 and \hat{\beta}_3.
Create new variables measuring spending in millions of dollars instead of thousands. Before re-estimating, predict what will happen to each coefficient, its standard error, and the R^2. Then re-estimate the model with the new variables and check your predictions. What would happen instead if
voteAwere measured as a share between 0 and 1?Now estimate the level-log model voteA_i = \beta_0 + \beta_1 \log(expendA_i) + \beta_2 \log(expendB_i) + \beta_3 prtystrA_i + u_i Interpret \hat{\beta}_1. What is the predicted change in A’s vote share if A spends 10% more, holding B’s spending and party strength fixed?
Compare the R^2 of the models in (a) and (c). Is it legitimate to compare them here? Make a scatter plot of
voteAagainstexpendAand another againstlog(expendA). Use the plots to explain which specification fits the data better and why that makes economic sense.
Question 2
Continue with vote1 and the level model from Question 1(a).
Estimate the standardized version of the model, in which the dependent variable and all explanatory variables are standardized, using the
scale()function. Interpret the standardized coefficient onexpendA.Verify the standardized coefficient on
prtystrAby hand, using \hat{\beta}_j^* = \hat{\beta}_j \cdot s_{x_j} / s_y and the sample standard deviations.Based on the raw coefficients in Question 1(a), one might conclude that party strength matters about ten times as much as A’s spending. Based on the standardized coefficients, which variable has the larger association with A’s vote share? Explain why the raw coefficients are misleading for this comparison.
Question 3
Load the nbasal dataset, which contains information on 269 players in the National Basketball Association. The variables you need are:
-
lwage: log of annual salary (salary is in $1,000s) -
points: points per game -
exper,expersq: years as a professional player, and its square -
guard,forward,center: position dummies (each player plays exactly one position)
Estimate \log(wage_i) = \beta_0 + \beta_1 points_i + \beta_2 exper_i + \beta_3 exper_i^2 + \beta_4 guard_i + \beta_5 forward_i + u_i and interpret \hat{\beta}_1.
Write down the effect of one more year of experience on log salary, holding the other variables fixed. Compute it for players with 2, 5 and 10 years of experience. Is the effect increasing or decreasing in experience?
At how many years of experience does predicted log salary reach its maximum? How many players in the sample have more experience than that? Does your answer imply that the most experienced players are paid less than they were a few years earlier? Discuss.
Plot the predicted log salary against
exper, holdingpointsat its sample mean and setting the player to be a center.
Question 4
Continue with nbasal and the model from Question 3(a).
What is the base group for position? What happens if you also include
centerin the regression? Try it and explain R’s output.Interpret the coefficients on
guardandforward, using both the approximation and the exact percentage change.Re-estimate the model using guards as the base group. Which coefficients change, and which do not? Show that the estimated salary difference between forwards and guards is the same in both specifications. Does the R^2 change?
Now add
marr(=1 if married),black(=1 if black) and their interactionmarrblckto the model from Question 3(a). Using the estimates, write down the expected difference in log salary, relative to unmarried non-black players with the same points, experience and position, for each of the three other groups: married non-black, unmarried black, and married black players. What does the coefficient onmarrblckmeasure?
Question 5
Load the attend dataset, which contains information on 680 students in an introductory microeconomics course. The variables you need are:
-
stndfnl: standardized final exam score (the score minus its mean, divided by its standard deviation) -
atndrte: percentage of classes attended -
priGPA: cumulative GPA before the term
Estimate stndfnl_i = \beta_0 + \beta_1 atndrte_i + \beta_2 priGPA_i + \beta_3 priGPA_i^2 + \beta_4 \, atndrte_i \times priGPA_i + u_i
Write down the effect of attendance on the expected final exam score, \partial E(stndfnl \mid \cdot) / \partial\, atndrte. Does \hat{\beta}_1 on its own have a useful interpretation? Why or why not?
Compute the effect of attendance for a student with the average prior GPA. What does it imply for a student who attends 10 percentage points more of the classes? Express your answer in standard deviations of the final exam score.
Compute the effect of attendance for students with a prior GPA of 2.0 and of 3.5, or plot it over the range of
priGPAin the data. What does the interaction tell you about who benefits more from attending class?
Question 6
A college offers a free peer-tutoring program, and you want to estimate the effect of using it on students’ final grades in an introductory course. You have data on each student’s final grade, whether they used the tutoring program (tutor_i = 1), their GPA before the semester started, and the number of hours they studied per week during the semester. You consider two regressions:
\text{Model A:} \quad grade_i = \beta_0 + \beta_1 tutor_i + \beta_2 priorGPA_i + u_i \text{Model B:} \quad grade_i = \beta_0 + \beta_1 tutor_i + \beta_2 priorGPA_i + \beta_3 studyhours_i + u_i
Why is it reasonable to control for
priorGPA?Tutors encourage students to study more, so part of the program’s effect on grades works through study hours. If that is the case, would you expect \hat{\beta}_1 to be larger in Model A or in Model B? Explain.
What does \beta_1 measure in Model B? Which model would you use to estimate the effect of the tutoring program on grades, and why?