Hello,
Im running a DID model( over two waves of a longitudinal survey) where the code that I use is;
Suppose I wanted to find the effect for various age cohort separately, which is generated using the following code,
the data is like this,
[CODE]----------------------- copy starting from the next line -----------------------
Should I run the code like this?
or this
But if I do the latter, the coefficient in stata will not show for the cbin==1.
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
separately for the differently defined treatments.
which one is the right way to go about it?
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?
Comment