Announcement

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

  • Transforming DID into TWFE

    Dear Stata users,

    I am working on a project that uses DID with continuous treatment variable. I had the following DID specification:

    Click image for larger version

Name:	Picture1.png
Views:	1
Size:	3.9 KB
ID:	1775345

    Is the TWFE version of the above specification is like below:

    Click image for larger version

Name:	Picture2.png
Views:	1
Size:	3.0 KB
ID:	1775346

    Here \delta is the continuous treatment variable which varies over time. Is the above specification correct? X is a vector of covariates, \lambda_{j} and \lambda_{t} are caseworker and referral year fixed effects.

    Previously, I estimated the event-study version of equation-1 in Stata as:

    Code:
       summ     event_time
        g         t = event_time - r(min)
        summ     t if event_time == -1
        local     true_neg = r(mean)
        
        reghdfe        breadth_search c.delta##ib`true_neg'.t  ///
                    LWbas_male age LWbas_married LWbas_immigrant LWbas_child LWbas_pre LWbas_pre9 ///
                    LWbas_s_high LWbas_l_high LWbas_s_univ LWbas_l_univ LW5_emp_mon_last5y ///
                    LWhist_empbef1 LW5_av_dur LW5_last_dur LWhist_income_bef1 LW5_welfare5 , ///
                    absorb(referal_year referal_CWid) ///
                    cluster(referal_CWid)
    Here I used event time == -1 as a reference time.

    My question is how to do the event-study version of the TWFE specification?

    Any help or suggestion would be highly appreciated.

    Regards,
    Zariab
    Uppsala University
Working...
X