I want to run a diff-in-diff model including state-specific linear trends. The code I am currently running is the following
where time_decr is the post dummy, treated_decr is the treatment dummy and did_decr is the diff-in-diff term (time_decr*treated_decr).
Then I added time and state fixed effects using factor notation as i.state and i.year and I am trying to include state-specific linear trends. My treatment group is made of one only state (#2), while my control group is made of states #5, #6, #8. Adding the term c.year#i.state I think I am adding all the interactions between years and states, so it seems right to me.
Still I have some doubts: the first one is about the use of i. or c. From what I got c. should be used with continuous variables, while i. with binary variables. Is it right? Would it make sense in my case? And more in general, do you think my specification make sense?
If you need I can provide a sample of my dataset.
Code:
preserve keep if (state == 2|state == 5|state == 6|state == 8) & year >= 1984 reg log_GON time_decr treated_decr did_decr i.year i.state c.year#i.state, cluster(state) restore
Then I added time and state fixed effects using factor notation as i.state and i.year and I am trying to include state-specific linear trends. My treatment group is made of one only state (#2), while my control group is made of states #5, #6, #8. Adding the term c.year#i.state I think I am adding all the interactions between years and states, so it seems right to me.
Still I have some doubts: the first one is about the use of i. or c. From what I got c. should be used with continuous variables, while i. with binary variables. Is it right? Would it make sense in my case? And more in general, do you think my specification make sense?
If you need I can provide a sample of my dataset.
Comment