0
$\begingroup$

I am running a regression which analyzes the effects of a state level policy on crime rates in America. I am using the difference-in-differences estimator and I'm not sure whether I can still add fixed effects into the model. I have a couple of control variables as well but I do not know whether including state or time fixed effects would be appropriate when using the difference-in-differences estimator. Also, I am confused as to how to add these fixed effects and what fixed effects to use in Stata.

$\endgroup$
4
  • $\begingroup$ Welcome. At what level is the policy? Is it a state level policy? $\endgroup$ – Thomas Bilach Jun 6 at 21:48
  • $\begingroup$ Yes. It is state level $\endgroup$ – Debbie Jun 6 at 21:49
  • $\begingroup$ FMHO, adding firm and year fixed effects should be a need when dealing with panel data. Regarding the second question, you can use xtset, or areg, or else. These code structure can be searched through the Help command $\endgroup$ – Knowledge-chaser Jun 6 at 21:51
  • $\begingroup$ Thank you. It is a panel data. What examples of state fixed effects could I use? Geography? Size? and how would I present that in the data set. For instance i used dummy variables for the treatment. Would it be the same procedure for the state fixed effects? $\endgroup$ – Debbie Jun 6 at 21:54
1
$\begingroup$

I am using the difference-in-differences estimator and I'm not sure whether I can still add fixed effects into the model.

Of course you can.

If the policy is adopted by treated states at the same time then you can estimate your model more simply as the interaction of a treatment/control dummy with a pre-/post-policy indicator. However, it's rare to observe states adopt crime initiatives uniformly. Thus, the rest of my answer assumes the 'roll out' of the policy is staggered over time.

I have a couple of control variables as well but I do not know whether including state or time fixed effects would be appropriate when using the difference-in-differences estimator.

It's very appropriate.

And you must include state and time (e.g., month, quarter, year, etc.) fixed effects, in addition to your policy variable(s).

I am confused as to how to add these fixed effects and what fixed effects to use in Stata.

Well, this is a bit off-topic. It's a general programming question. Again, you must use unit and time fixed effects. For example, suppose you acquired state level auto theft rates across all 50 states over the last ten years. Simply regress the auto theft rate on state fixed effects, year fixed effects, and the policy indicator (i.e., 'turns on' if a state $s$ adopts and is in the years $t$ when the policy is actually in effect, 0 otherwise). Once you xtset your data, then the basic structure is as follows:

xtset state year
xtreg crime policy other_covariates i.year, fe cluster(state)

where crime is a crime measure of interest and policy is the dichotomous treatment variable. The other_covariates is standing in for any other time-varying covariates at the state level.

$\endgroup$
7
  • $\begingroup$ Can you elaborate on why avoiding including fixed effects is problematic when the policy is adopted by a subset of treated states at the same time? $\endgroup$ – Dimitriy V. Masterov Jun 8 at 19:19
  • 1
    $\begingroup$ Control variables are good as long they vary over time and are not affected by the policy itself or its anticipation. $\endgroup$ – Dimitriy V. Masterov Jun 8 at 19:23
  • $\begingroup$ @DimitriyV.Masterov I don't make the claim it's problematic. Rather, I was suggesting that estimating fixed effects for state and year is redundant if states adopt uniformly and the OP is using the classical DiD estimator. I will update my response to make this a bit more clear. $\endgroup$ – Thomas Bilach Jun 8 at 20:22
  • $\begingroup$ @DimitriyV.Masterov Say 5 treated states adopt a crime initiative in 2015. The post-treatment period is well-defined. The state fixed effects would absorb a treatment/control dummy. Similarly, the year fixed effects would absorb a pre-/post-policy indicator. It shouldn't affect the DiD coefficient, but the model has redundancies. Would you agree? $\endgroup$ – Thomas Bilach Jun 8 at 21:10
  • $\begingroup$ I agree on the treated dummy, but I believe year FEs and the "policy on" coefficient are identified by the variation across states in treatment. There are some untreated states in post-2015 years and some treated, so you could have both with a policy dummy that is 1 in post-treatment for the treated and 0 elsewhere. $\endgroup$ – Dimitriy V. Masterov Jun 8 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.