Hi,
I am trying to estimate an effect of legislation introduced in 2010 on companies (panel data) and I would like to see lagged effects of this legislation. I have control group and data before and after treatment so I am using Diff-in-Diff.
My question is what is the proper method to do lags in a case of DD coefficient?
My code:
I know I can use lagged time variables within Stata (L., L2., ...), but the problem is that using this method I always use one year - lagging does that, even though it would be suitable for me to use zeros to the missing last year... Therefore I can adjust my coefficient manually:
But then I struggle with how to implement more lags in the regression and what would the interpretation be afterwards...
Whether the proper solution would be to put all of those together or include one regression for each time lag:
Or:
Thank you so much in advance
Vojtech
I am trying to estimate an effect of legislation introduced in 2010 on companies (panel data) and I would like to see lagged effects of this legislation. I have control group and data before and after treatment so I am using Diff-in-Diff.
My question is what is the proper method to do lags in a case of DD coefficient?
My code:
Code:
gen Treat = 1 if EU == 1 gen Time = 1 if year >= 2010 mvencode Time Treat, mv(0) xtset company year xtreg y Treat##Time i.year, fe
Code:
gen TimeLag = 1 if year >=2011 gen TimeLag2 = 1 if year >= 2012 gen TimeLag3 = 1 if year >= 2013 mvencode TimeLag*, mv(0) xtreg y Treat##TimeLag i.year, fe
Whether the proper solution would be to put all of those together or include one regression for each time lag:
Code:
xtreg y Treat##TimeLag Treat##TimeLag2 Treat##TimeLag3 i.year, fe
Code:
xtreg y Treat##TimeLag i.year, fe xtreg y Treat##TimeLag2 i.year, fe xtreg y Treat##TimeLag3 i.year, fe
Vojtech
Comment