Code:
xtreg outcome treated post did $controls i.year, fe vce(robust)
By using the above fixed-effects model, I am estimating a difference-in-difference model. The variable "treated" is a dummy variable that is equal to 1 for the firms that are treated and 0 for firms that are not treated. This is a time-invariant variable, so this gets dropped when the fixed-effects model is estimated. The variable "post" is a dummy variable that is equal to 1 for the periods after the treatment occurs and 0 for the periods before the treatment occurs. "did" is an interaction term calculated by multiplying the treated dummy with the post dummy (treated * post). This approach is well-accepted in my research area, and the results make sense.
Now, I have an instrumental variable (IV) for the treatment effect, and I would like to try testing whether this IV works and whether it helps to establish a stronger causal relationship in my theory. I have tried the following two ways of doing this, but I am not sure which of these two ways is more appropriate (or if they are both incorrect).
The first way is instrumenting for the "treated" variable that gets dropped in a fixed-effects model. The coefficients do not change from the above difference-in-difference model, so I do not think this works, but I am including it here.
Code:
xtivreg outcome post did $controls i.year (treated = instrument), fe vce(robust)
The second way is instrumenting for the "did" variable, which is the interaction term treated * post.
Code:
xtivreg outcome treated post $controls i.year (did = instrument), fe vce(robust)
I would greatly appreciate it if anyone could point me in the right direction. Or, if there is something that I am doing wrong, I would really appreciate the guidance.
Thank you in advance.
0 Response to Using instrumental variable in difference-in-difference model
Post a Comment