关键词 > EMET3006/4301/8001

Applied Micro econometrics, EMET3006/4301/8001 Semester 2, 2021 Tutorial 3

发布时间:2022-08-29

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Applied Micro econometrics, EMET3006/4301/8001

Semester 2, 2021

Tutorial 3 (Week 4)

Question 1

Use the course slides to write an R script to regenerate the regressions and graphs I made in the slides. Only change the problem so that:

● X ~ N (50, 25)

● drop if x < 0 and if x > 100

● set the cutoff at x = 50

● y1 = 25 + 0 * D + 1.5 * x + ∈ ~ N (0, 20)

1.  Graph y1 for D=0 and y1 for D=1

2. Include axes labels and a tted line through the data.  (Use my graph commands from the slides)

3. Let the true effect of treatment be 40, now plot the data with the discontinuity. Include all the bells and whistles on your graph.

4.  Generate x2  and x3 .

5. Recreate y as above but including x2  with coefficient 1.

6. Plot the new function of y.

7. Regress y on x, x2  and D. What do your results show?

Question 2

In this question we go through the process of conducting an RDD estimation. We will use the data from Lee (2008).  This is an example from the United States. In that country there are two major political parties, the Republicans and the Democrats.  When a seat in the House of Representatives is up for election both a Republican candidate and a Democratic candidate compete with each other to win. Whoever wins is the incumbent in the next election, that is, whoever wins already holds the seat at the next election.  In this study Lee tries to look at the effect of incumbency on the likelihood of being re-elected at the next election. Lee hypothesizes that already holding the seat gives the incumbent an advantage in the next election for various reasons. The problem is, whoever holds the seat may be doing so because they are the best person for the job and that is why they will win again. Lee tries to separate out this effect.

This is an RDD design because with a vote share just over 50 a person wins. So they go from losing to winning as the vote share goes above 50. The idea is that people with a vote share just over 50 are very similar to people with a vote share just under 50.  In that case, one candidate is not really better than the other. If the person who won by a very small margin in the current election goes on to win in the next election, then Lee argues, that is the effect of incumbency - of already holding the seat and nothing else.

“The result is applied to an analysis of the incumbency advantage in elections to the United States House of Representatives. It is plausible that the exact vote count in large elections, while influenced by political actors in a non-random way, is also partially determined by chance beyond any actor’s control. Even on the day of an election, there is inherent uncertainty about the precise and nal vote count. In light of this uncertainty, the local independence result predicts that the districts where a party’s candidate just barely won an election—and hence barely became the incumbent—are likely to be comparable in all other ways to districts where the party’s candidate just barely lost the election. Differences in the electoral success between these two groups in the next election thus identifies the causal party incumbency advantage.”

What we want to do is to see whether there is an effect of incumbency on winning the next election.   Winning the next election is the outcome, incumbency is the treatment.

 

Figure 1: Election results over time

1. Download all the Lee data from Wattle.

2. Use the data in gure1.dta to reproduce gure 1: What does this graph show us?

3. Using the individ final.dta dataset we will now plot the outcome against the cutoff to see whether there is a discontinuity.  Describe the data using str or any other command from Tutorial 0. Although not very useful, you may notice that several variables appear twice, only the second time with a p in the name. Lee has generated lines to t to the data, we will use these variables to add lines to our scatter plots in the next questions.

4. Plot mmyoutcomenext” against difshare” which is the result of the subsequent election plotted against the margin by which the incumbent won the current election. Tell R to t a line through the two portions of the graph using my code from the slides and mpmyoutcomenext as the y variable for the line. Your graph should look somewhat like panel a in gure 2:

 

Figure 2: Treatment effect and continuity of covariates

5. We need to check that no other variables have a discontinuity at the cutoff .  Repeat the graph you did above for the variables: No. of past victories (mofficeexp) (fig2, panel b), probability of candidacy (mruna- gain), No.  of previous attempts as of election t (melectexp).  Try to condition on values of x between -0.25 and 0.25.

6. You could also plot vote share election t-1 and vote share election t+1 as two separate graphs as well as the probability of victory in those two elections against vote share in election t. (4 graphs, hopefully you reach the point where it becomes easy to copy your code and change a few of the details in it). For this you use the group final.dta dataset.

7. Discuss what the graphs show.

8. Before we run the estimations let’s do the McCrary test. We can install the McCrary package known as rddensity .

9. The command to run the test is then:

density  <-  rddensity(individ final$difshare,  c  =  0) rdplotdensity(density,  individ final$difshare)

10. What does the graph tell you? Did you expect this?

11. Time to regress:

(a) Load the table two final.dta dataset. This data allows us to repli- cate Lee’s table 2. Investigate the data just so you can see which variables are there. As you may notice Lee has already created the polynomial terms. The variable right” is the treatment variable, all variables beginning with an r are the treatment interacted with the polynomial explanatory variables. Lee has chosen to measure the outcomes by whether or not a democratic candidate had won.

It would make no difference to have chosen to measure the vote share of Republican candidates.

(b)  Start by typing:

table two allvars<-table two final  %>%

filter(use==1)

model1<-  lm robust(demsharenext  ~  difdemshare  +     right,  data=table two final,  clusters=statedisdec)

(use is a variable equal to one if we observe all the variables needed for the regression).

(c) What do the results of this regression say?

(d) Why did we cluster on the state and district?

(e) Now add the polynomial terms to the regression, what happens to the results?

(f)  Can you replicate some of the results in Table 2 in Lee (2008)?