Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fuzzy RD Plot

    I am using the following code for my Fuzzy RDD analysis:

    Y=outcome variable
    R=Running variable relative to a cutoff (Month and year of birth relative to a cutoff)
    D=Treatment variable=1 (R>=0) , 0 otherwise
    Z=instruments
    X=covariates (I have globally declared them)

    rdrobust Y R aw==perweight, fuzzy(Z) p(0) kernel(uniform) vce(cluster month_year_birth)

    eststo clear
    eststo OLS: reg Y D R $X if abs(R)<=bandwidth [aw=perweight], vce(cluster month_year_birth) // bandwidth obtained from rdrobust as mentioned above
    eststo FIRST: reg D Z R $X if abs(R)<=bandwidth [aw=perweight], vce(cluster month_year_birth)
    eststo REDUCED_W_0: reg Y Z R if abs(R)<=bandwidth [aw=perweight], vce(cluster month_year_birth) // Reduced form without covariates
    eststo REDUCED: reg Y Z R $X if abs(R)<=bandwidth [aw=perweight], vce(cluster month_year_birth)
    eststo TWO_SLS: ivregress 2sls Y (D=Z) R $X if abs(R)<=bandwidth [aw=perweight], vce(cluster month_year_birth)
    esttab using "IV.csv", b(%9.3f) se(%9.3f) star(* 0.1 ** 0.05 *** 0.01) nogaps replace mtitle

    All the regressions are clustered based on the month_year of birth

    Question 1. For the optimal bandwidth I am using rdrobust command which by default uses symmetric bandwidth (mserd). Using that bandwidth I am generating the above mentioned regressions. Is that right? I am not using rdrobust command with the fuzzy option as it doesn't give me the OLS and the two stage estimates. It only provides first stage and reduced stage estimates.
    Question 2: I want to plot the graph for the outcome variable. How do I do that? Can anyone help me with the code?
    Question 3: If I use rdplot, then I am getting the following error, even thoigh I have no missing values for the variables used. Can anyone help me on that?
    3351 argument has missing values

  • #2
    Question 3: following sample rdplot command should work:
    rdplot Y R fuzzy(D) binselect(es) p(1)

    <above is an example linear plot using IMSE-optimal evenly-spaced method>

    Question 2:
    With respect to rdrobust command, it does output two stage estimates for me. However, it seems to produce only reduced stage estimates (as you highlighted).
    Sample linear fit rdobust which should give two stage estimates: rdrobust Y R, fuzzy (D) covs(X) p(1) c(0) vce(cluster month_year_birth)

    Alternately, you may check following sample command and see if it works:

    gen above = R > 0
    gen below = 1 - above
    ivregress 2sls Y (D = <running variable>) above below if R > -optimal_bw & R < optimal_bw, vce(cluster month_year_birth)

    Comment


    • #3
      Dear P Dey, thank you very much for posting this code!

      Would it be possible, with the user-written RD plot command, to plot the first stage of the fuzzy RDD as well?

      Comment

      Working...
      X