Hello everyone.
I am analyzing a data set consisting of mean incidence rates for a certain disease on a county-level in a country.
I have data for 15 years and about 300 counties (4500 observations in total).
After 10 years, there was an intervention in one of these counties and I want to assess the impact of it via diff-in-diff.
Thus, I was setting up the following:
gen after_intervention = time>9
gen trt=county=="County of Intervention"
gen intervention = trt*after_intervention
And then I did the following DiD-Regressions (I don´t have explanatory variables):
1) regr y trt i.time intervention , vce (cluster county)
2) xtset id time
xtreg y i.time intervention, fe vce (cluster county)
Now, I am wondering:
- Is 1) or 2) this the valid model specification? Why are the results nearly equal, but not quite?
- The standard errors from the above models are really small and produce highly significant results, even if I switch the "intervention county" to some "pseudo intervention county" . What are the requirements to use clustered standard errors?
Thanks. Klas
I am analyzing a data set consisting of mean incidence rates for a certain disease on a county-level in a country.
I have data for 15 years and about 300 counties (4500 observations in total).
After 10 years, there was an intervention in one of these counties and I want to assess the impact of it via diff-in-diff.
Thus, I was setting up the following:
gen after_intervention = time>9
gen trt=county=="County of Intervention"
gen intervention = trt*after_intervention
And then I did the following DiD-Regressions (I don´t have explanatory variables):
1) regr y trt i.time intervention , vce (cluster county)
2) xtset id time
xtreg y i.time intervention, fe vce (cluster county)
Now, I am wondering:
- Is 1) or 2) this the valid model specification? Why are the results nearly equal, but not quite?
- The standard errors from the above models are really small and produce highly significant results, even if I switch the "intervention county" to some "pseudo intervention county" . What are the requirements to use clustered standard errors?
Thanks. Klas