Announcement

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

  • Copying rdrobust results with another type of regression

    Code:
    rdbwselect black maxscoreraw17,c(-0.9136) vce(cluster refer_id)
    local bw=e(h_1)
    regress black c maxscoreraw17 if maxscoreraw17>(-0.9136-`bw') & maxscoreraw17<(-0.9136+`bw'), vce(cluster refer_id)
    With the above code, I am trying to see if I can get the same results as if I use the code:
    Code:
    rdrobust black maxscoreraw17, c(-.9136) vce(cluster refer_id)
    However, it doesn't seem to be working and I don't know if anyone here is familiar with rdrobust and can help. I am basically trying to get the optimal bandwidth from rdbwselect, put it into a regression and get the same coefficient as rdrobust. Is this even possible?? (A helpful note: I created c with is an indicator variable that equals 1 if you are above my cutoff of -.9136 and 0 otherwise.....)

  • #2
    Is this a sharp RDD? rdrobust uses a triangular kernel by default, so you'll need to replicate the weights at the very least. You will also need to allow for different slopes on either side of the threshold by interacting the slope term with an indicator for crossing.

    Comment


    • #3
      How would I go about replicating the weights? Can you explain also what you mean by interacting the slope term with an indicator for crossing? Like interacting the running variable*indicator for past the threshold? Thanks!!!!!

      Comment


      • #4
        Triangular weights are given by

        w=max(1-abs(f-c)/h,0)

        Where w is the weight, c is the threshold/cutoff, f is the forcing variable, and h is the bandwidth.

        You can also do this, which is straightforward.

        Code:
        drop if f>c+h|f<c-h
        gen w = 1-abs(f-c)/h
        And then run your regression. You are correct with what I mean about interacting the slope. Look up how to add weights with

        Code:
        help reg

        Comment


        • #5
          Thanks so much!

          Comment

          Working...
          X