Dear Statlist members,
I am working with a DID for my thesis, but I am still not familiar with DID and I have some technical questions (I got them from reading some papers, so I am sorry not to give a data example)
Here are the settings:
A cross section dataset at the individual level (the outcome variable at the individual level)
A shock that occured in time t at the county level
We want to look at the long term effects of this shock (say whether they go to high school or not, high_school =1 if the individual go to high school and 0 otherwise) on individuals that were in uterus and aged < 1 at the time of the shock.
Treatment group: Those born in time t, t+1 and t+2 (birth_year>= t)
Control group: Those born in time t-1, t-2 and t-3 (birth_year< t)
define variable post= 1 if Treatment group, and 0 if Control group
define variable treat= 1 if born in county with the shock and 0 if born in county without the shock.
My questions:
I saw in this post https://www.statalist.org/forums/for...ferences-model that it is possible to use one # when using fixed effects, so I did it this way, I also included state by birth year fixed effects.
I assume here that we will compare with respect to the last year in the pre-period.
or the following one:
I really appreciate any remarks and I thank you in advance.
Please let me know if I should give more details.
Best,
I am working with a DID for my thesis, but I am still not familiar with DID and I have some technical questions (I got them from reading some papers, so I am sorry not to give a data example)
Here are the settings:
A cross section dataset at the individual level (the outcome variable at the individual level)
A shock that occured in time t at the county level
We want to look at the long term effects of this shock (say whether they go to high school or not, high_school =1 if the individual go to high school and 0 otherwise) on individuals that were in uterus and aged < 1 at the time of the shock.
Treatment group: Those born in time t, t+1 and t+2 (birth_year>= t)
Control group: Those born in time t-1, t-2 and t-3 (birth_year< t)
define variable post= 1 if Treatment group, and 0 if Control group
define variable treat= 1 if born in county with the shock and 0 if born in county without the shock.
My questions:
- Is it possibble to tsset the date at the county level then do the estimations at the individual level (meaning that the outcome variable and some of the covariates are at the individual level)
Code:
tsset county birth_year xtlogit high_school i.post#c.treat covariates i.stateXyear, fe
- My second question is when testing for parallel trends, is it better to use ## instead of # even with fixed effects in order to make Stata drop one more fixed effect instead of drop one year from the interaction part?
Code:
tsset county birth_year xtlogit high_school ib(t-1).birth_year##c.treat covariates i.stateXyear, fe
- My last question is related to the second one, in parallel trend we are only interested in the sign and the significance, right? so should we run the following code:
Code:
tsset county birth_year xtlogit high_school ib(t-1).birth_year##c.treat covariates i.stateXyear, fe est sto m4 coefplot m4, other options
Code:
tsset county birth_year xtlogit high_school ib(t-1).birth_year##c.treat covariates i.stateXyear, fe margins birth_year, dydx(treat) noestimcheck post marginsplot, yline(0) other options
Please let me know if I should give more details.
Best,
Comment