Announcement

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

  • Regression disconitnuity plot does not match regression results

    I am working with the rdrobust command pacckage (https://sites.google.com/site/rdpackages/rdrobust) and I am having issues in producing graphs that match the regression estimation results. My assumption is that the companion command rdplot is the best candidate to produce the graphical counterpart to my estimation results. However, this is not the case.

    Are there specific options that I am supposed to use with rdplot to get a result that is consistent with the one obtained through rdrobust? Otherwise, are there any other command combinations I can use to produce consistent results?

  • #2
    Care to show the code you've tried so far? As well as the dataset you used such code on?

    Comment


    • #3
      Sure thing.

      The code I am using is the following:

      Code:
      rdrobust ui_duration termination_mdy, c(0)
      
      local i = e(h_l)
      
      rdplot ui_duration termination_mdy if abs(termination_mdy) <= `i', c(0) kernel(triangular) h(`i' `i') nbins(15 15)
      As for the data it is a pretty heavy so I am not sure on how to share it. Still the issue persist if using any dataset.

      Comment


      • #4
        Using the example data for rdrobust would work. Just run the example estimations they give in the help file, as well as the rdplot code, and then show what you did here in your next post.

        If they're not replicating correctly, presumably we should be able to replicate this in the sample data they give.

        Comment


        • #5
          Following the example in the help file does not help because they run

          Code:
          rdrobust vote margin
          rdplot vote margin, graph_options(title(RD Plot))
          which does not produce the same results given that by default rdrobust uses a first degree poly, while rdplot uses 4th and that the kernel is triangular when using rdrobust and uniform when using rdplot.

          Comment


          • #6
            you also need to specify the order of the local polynomial, it defaults to 1 in rdrobust and 4 in rdplot. example using rdrobust_senate.dta (available from https://rdpackages.github.io/rdrobust/),
            Code:
            use rdrobust_senate, clear
            
            rdrobust vote margin, kernel(tri)
            local bw = e(h_l)
            
            di e(tau_cl)
            
            rdplot vote margin, kernel(tri) h(`bw')
            
            di el(e(coef_r),1,1) - el(e(coef_l),1,1)
            
            rdplot vote margin, kernel(tri) h(`bw') p(1)
            
            di el(e(coef_r),1,1) - el(e(coef_l),1,1)

            Comment

            Working...
            X