Greetings stata users. I was hoping someone might help me with a rather odd problem I'm having with the dif in dif built-in function. I'm working with a database featuring retail stores and sales across time (time is in months here and the stores are identified with a unique id. This variable is dealer). The dependent variable is sales (y1). The ''treatment'' here is a special arrangement that one particular store got at a specific point in time (identify this with the dummy variable d)
Suppose I have the following dif in dif model to run:
1) didregress (y1) (d), group(dealer) time(month)
expression 1) will return the coefficient of interest (call it beta) and include both time and group fixed effects. If I wanted to eliminate both time and group effects then that could be accomplished by:
2) didregress (y1) (d), group(dealer) time(month) nogteffects
With that in mind, consider the following now:
3) didregress (y1 i.dealer i.month) (d), group(dealer) time(month) nogteffects
Expression 3) and 1) should be equivalent but it turns out that they are not. The reason why I'm interested in this is because I want an estimation featuring only group effects but without time effect (actually i don't want it. I don't think getting rid of group effects is a good idea, but my boss is calling the shots here so i need to get the results for this specification)
to achieve my goal, i was thinking on the following:
4) didregress (y1 i.month) (d), group(dealer) time(month) nogteffects
Expression 4) as I understand it would eliminate group and time effects (nogteffects) and then add time effects manually (i.month) but I'm pretty sure that this is not the case. Clearly I'm not understanding entirely how the didregress buil-in function works, but i've gone through all the documentation i could find about this and everything indicates that expression 4) is the way to go.
Any suggestions on this? (clyde? nik?)
Thank you
Tomas
Suppose I have the following dif in dif model to run:
1) didregress (y1) (d), group(dealer) time(month)
expression 1) will return the coefficient of interest (call it beta) and include both time and group fixed effects. If I wanted to eliminate both time and group effects then that could be accomplished by:
2) didregress (y1) (d), group(dealer) time(month) nogteffects
With that in mind, consider the following now:
3) didregress (y1 i.dealer i.month) (d), group(dealer) time(month) nogteffects
Expression 3) and 1) should be equivalent but it turns out that they are not. The reason why I'm interested in this is because I want an estimation featuring only group effects but without time effect (actually i don't want it. I don't think getting rid of group effects is a good idea, but my boss is calling the shots here so i need to get the results for this specification)
to achieve my goal, i was thinking on the following:
4) didregress (y1 i.month) (d), group(dealer) time(month) nogteffects
Expression 4) as I understand it would eliminate group and time effects (nogteffects) and then add time effects manually (i.month) but I'm pretty sure that this is not the case. Clearly I'm not understanding entirely how the didregress buil-in function works, but i've gone through all the documentation i could find about this and everything indicates that expression 4) is the way to go.
Any suggestions on this? (clyde? nik?)
Thank you
Tomas

Comment