Announcement

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

  • RDD with panel data

    Hi,
    I'm trying to apply an RDD design (I'm new to it) where Y is the outcome variable of interest, X is the running variable and the cutoff according to which a firm either receives the treatment or not is 0. Suppose that Treat is a dummy that equals 1 if the firm receives the treatment, and 0 otherwise. Now, I have a panel dataset along 2010-2022 of globally spread firms that operate in multiple industries. I went through the rdrobust package and the command I should run to implement the RDD is the following:
    Code:
    rdrobust Y X, p(1) kernel(triangular) bwselect(mserd)
    Or, in the case of covariates, it should be the following:
    Code:
    rdrobust Y X, p(1) c(0) kernel(triangular) bwselect(mserd) covs($covariates)
    The first question I have is the following: should I use rdrobust or I should implement an OLS regression within the optimal bandwidth h selected with rdbwselect? That is, the following command:
    Code:
    reg Y X Treat X*Treat $covariates if X<h & X>h, robust
    Using the second option should also allow me to include year, industry and country dummies:
    Code:
    reg Y X Treat X*Treat $covariates i.year i.industry i.country if X<h & X>h, robust
    which I cannot do with rdrobust.
    What is the correct way of implementing an RDD? Also, is it a problem if I do not find significance when I use rdrobust (without accounting for time, industry, country effect), but I find significance when I regress (including all the dummies) within the optimal bandwidth?

    Thank you so much for your help,

    Martina

  • #2
    I think this the basic regression setup in a stylized setting.

    Code:
    clear all
    
    ** DATA GENERATION **
    set obs 10
    g id = _n
    g treat = id<=5
    g fe = runiform(2,5)
    expand 13
    bys id: g year = _n
    g post = year >= 9
    g t = year - 9
    g x = rnormal()
    
    g y = 10 + fe + 1*year + 5*treat*post + 0.5*x + rnormal(0,0.1)
    
    ** SEE THE DATA **
    lgraph y year, by(treat)
    
    ** REGRESSION **
    reghdfe y c.treat#(c.t c.post) x , absorb(id year)
    Your "if" includes all observations unless one is exactly equal to h.

    I've never gotten anything from rdrobust I found plausible, including this case, but maybe I'm doing it wrong.

    Comment

    Working...
    X