Im running a DID model( over two waves of a longitudinal survey) where the code that I use is;
Code:
reg `y' i.treatment##i.post $controls i.PERSONID , cl(PSUID)
Code:
recode agecohort(15/22=1) (23/29=2) (30/36=3) (37/43=4) (43/50=5) , gen(cbin)
[CODE]----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(agecohort cbin) 45 5 33 3 26 2 19 1 36 3 40 4 27 2 40 4 26 2 36 3 32 3 28 2 49 5 29 2 28 2 34 3
Code:
reg `y' i.treatment##i.post $controls i.PERSONID if cbin==1 , cl
Code:
reg `y' i.treatment##i.post##i.cbin $controls i.PERSONID , cl
Please clarify what the difference is between the two.
Or third option is I define my treatment in a way that it is in cbin==1 ,2,3 respectively and do
Code:
reg `y' i.treatment##i.post $controls i.PERSONID , cl(PSUID)
which one is the right way to go about it?
0 Response to Interaction in manual DID
Post a Comment