0
$\begingroup$

I am doing a difference-in-differences analysis, looking at whether environmental regulation has an effect on exports. I added fixed effects for country and time, but on STATA it gave me the same coefficients as my original difference-in-difference regression (with controls) and the p values only differ very slightly. What does this mean exactly? How would I be able to interpret this result? Many thanks!

$\endgroup$
6
  • $\begingroup$ Hi Matthew! What do you mean when you say your original difference-in-differences (DiD) regression? If I interpreted your question correctly, you first estimated a DiD equation with a treatment dummy and fixed effects for country and time. Then, you ran a second equation and omitted the fixed effects entirely. After doing both of these, your estimated coefficient on the treatment dummy remained the same. Is this what you are observing? $\endgroup$ – Thomas Bilach Apr 5 '20 at 19:05
  • $\begingroup$ Hi Tom! Apologies, I think I should have been clearer in my explanation. So my first DiD equation had the normal dummy variables for time of intervention and the dummy for the treatment group, the interaction dummy variable and some control variables. My second DiD had my fixed effects. After including my fixed effects, I found that the coefficients I got were exactly the same as the first regression I ran without the fixed effects. Not sure why the coefficients are identical. $\endgroup$ – Mathew Chandy Apr 5 '20 at 19:17
  • $\begingroup$ Thank you for clarifying. So you replaced the main effects in the first equation with fixed effects. Do your units enter into treatment at the same time? $\endgroup$ – Thomas Bilach Apr 5 '20 at 19:25
  • $\begingroup$ Yes they do. I have data from 1990-2018 and my policy intervention is at 2011 affecting the treatment group (UK) and not my control (Australia). $\endgroup$ – Mathew Chandy Apr 5 '20 at 20:03
  • $\begingroup$ The only coefficient that changes is the constant term. All the others are the same $\endgroup$ – Mathew Chandy Apr 5 '20 at 20:45
1
$\begingroup$

I assume you are estimating the following DD equation with two groups and two discrete before-and-after periods:

$$ y_{ct} = \alpha + \gamma\textrm{UK}_{c} + \lambda \textrm{After}_{t} + \delta(\textrm{UK}_{c} \times \textrm{After}_{t}) + \epsilon_{ct}, $$

where you are observing some outcome $y_{ct}$ in countries $c$ across years $t$. In this setting, $\textrm{UK}_{c}$ is a treatment dummy equal to 1 for the United Kingdom, 0 for Australia. The variable $\textrm{After}_{t}$ indexes the years after policy/intervention in both treatment and control groups. In accordance with your description, the post-treatment period (i.e., $\textrm{After}_{t}$) is clearly defined. Treatment is instituted in the United Kingdom in 2011 and stays in effect for the entire observation period. Your causal parameter of interest is $\delta$.

So my first DiD equation had the normal dummy variables for time of intervention and the dummy for the treatment group, the interaction dummy variable and some control variables. My second DiD had my fixed effects. After including my fixed effects, I found that the coefficients I got were exactly the same as the first regression I ran without the fixed effects.

The generalization of the first equation you estimated would include dummies for all countries and all years but is otherwise unchanged. In settings with two groups and two discrete time periods, your estimate of the treatment effect (i.e., $\delta$) should be similar. Here is your second specification,

$$ y_{ct} = \gamma_{c} + \lambda_{t} + \delta T_{ct} + \epsilon_{ct}, $$

where $T_{ct}$ is the same as before $(\textrm{UK}_{c} \times \textrm{After}_{t})$. $T_{ct}$ is a treatment dummy equal to 1 during years when the United Kingdom is exposed to treatment, 0 otherwise. $\gamma_{c}$ denotes country fixed effects; $\lambda_{t}$ denotes year fixed effects. I should note, these fixed effects replace $\textrm{UK}_{c}$ and $\textrm{After}_{t}$, respectively, in the former equation.

You can proceed by estimating the second equation in two ways. First, estimate the country and year effects, then interact $\textrm{UK}_{c}$ with $\textrm{After}_{t}$ (i.e., $\textrm{UK}_{c} \times \textrm{After}_{t}$). Software (R/Stata) will drop the main effects for $\textrm{UK}_{c}$ and $\textrm{After}_{t}$. Do not worry about this; the fixed effects will absorb your treatment and time indicators. However, the coefficient on the interaction term will be estimated; that is your treatment effect. In DD contexts, we typically only care about the interaction term. Another way to estimate the second equation is to create the treatment dummy yourself. For example, if you interact the two main effects manually before running your equation and append it to your data frame, you will notice this is simply a treatment dummy (e.g., $T_{ct}$) equal to 1 for the United Kingdom during years after treatment exposure. The estimate of $\delta$ is equivalent to the coefficient on the interaction term.

In sum, the latter DD estimator is a generalization of the former DD estimator with two groups and two periods. Thus, it is not surprising that your estimates of $\delta$ were similar. I should note, had treatment exposure been staggered over time, with multiple countries entering into treatment at different times, then you would forgo the first estimator and instead opt to estimate the more general DD equation.

Since all "adopter countries" begin treatment in the same year, you can safety estimate either equation. In your setting, where your treated country has a clearly defined pre- and post-period, I am partial to the former.

--- Update to address questions in the comments

I'm attempting to do the parallel trends test....As I understand, you interact the treatment variable with time dummies. But for me, the treatment dummy is an interaction dummy variable as you explained earlier. Do I interact this variable with time dummies or include interactions for all years with the 'Country' variable instead? I'm unsure as to how to conduct the test.

You are mostly right. You interact $\textrm{UK}_{c}$ with individual year dummies. Treatment exposure begins at the same time for all treated entities, so you should perform this specification test with the former equation. First, create a single treatment dummy indexing treated countries. Next, create separate dummies for each year. To be precise, this is a separate dummy for 1990, a separate dummy for 1991, a separate dummy for 1992, so on and so forth. Finally, interact the treatment indicator with each individual year dummy. Don't forget to exclude a year dummy to avoid collinearity! Here is the formulation:

$$ y_{ct} = \gamma\textrm{UK}_{c} + \lambda_{1} (\textrm{UK}_{c}*\mathbf{I}_{t = 2008}) + \lambda_{2} (\textrm{UK}_{c}*\mathbf{I}_{t = 2009}) + \lambda_{3} (\textrm{UK}_{c}*\mathbf{I}_{t = 2010}) + \epsilon_{ct}, $$

where $\mathbf{I}$ is the indicator function. You may have seen this represented with a numeral (i.e., $\mathbf{1}_{\kappa}$). Put in words, set the value to 1 if condition $\kappa$ is satisfied, 0 otherwise. Put in your context, if a country is in a particular year then set it equal to 1, 0 otherwise. To save space, I only included three pre-treatment years. In the context of your problem, you would include separate interactions for all $t$ years before treated countries enter into the treatment condition. You could do these interactions manually, or you could leverage Stata's factor variable notation and let the software do these interactions for you.

Practitioners often refer to this as a pre-specification test. In your case, you would interact your treatment indicator with separate year dummies for all years prior to the treatment/intervention. Your $\lambda_{t}$'s in the pre-period should be indistinguishable from zero. Each interaction is assessing the difference in trend in years preceding treatment exposure. Insignificant effects do not definitively prove you have common trends; rather, it supports claims of trend equivalence.

You also have the discretion to interact your treatment dummy with post-treatment year indicators as well. Treatment could possibly grow or fade throughout the exposure period.

There are many ways to incorporate dynamics in your model specification. This is just one! I hope this helps.

$\endgroup$
8
  • 1
    $\begingroup$ Many thanks for your detailed reply! Really helped a lot! $\endgroup$ – Mathew Chandy Apr 6 '20 at 12:15
  • $\begingroup$ If it answered your question, give it a check! If you have more questions please follow-up here. $\endgroup$ – Thomas Bilach Apr 7 '20 at 2:39
  • $\begingroup$ Hi Tom, I have some questions: Firstly, for DD is it necessary to do a Hausman test to check whether fixed effects can be used in the first place? Secondly, I am using panel data from 1990 to 2018 and I am using STATA for my regressions. If I were to do a regression based on your first equation, what command would I have to use? Is it the normal 'regress' command or do I have to use 'xtreg'? And finally, I have a variable 'Year' which just gives the year of each observation. If I wanted to include time fixed effects, as per your second equation, would I simply add 'i.year?' to the regression? $\endgroup$ – Mathew Chandy Apr 7 '20 at 12:21
  • $\begingroup$ In my opinion, it is not necessary. In practice, we often suspect treatment is confounded in some way. DD is a special case of fixed effects, thus we allow for some selection on the basis of time-invariant country-level characteristics. Moreover, we often have to make stringent assumptions using random effects, one of which is to assume the panel-level effects are independent of the covariates in the model. We do not make this assumption with fixed effects. Proceeding with xtreg should get the job done. Since I mainly work in R, I am hesitant to advise you further regarding Stata's syntax. $\endgroup$ – Thomas Bilach Apr 8 '20 at 18:46
  • $\begingroup$ Hi Tom I'm attempting to do the parallel trends test as shown on this post: stats.stackexchange.com/questions/160359/… As I understand, you interact the treatment variable with time dummies. But for me, the treatment dummy is an interaction dummy variable as you explained earlier. Do I interact this variable with time dummies or include interactions for all years with the 'Country' variable instead? I'm unsure as to how to conduct the test. $\endgroup$ – Mathew Chandy Apr 16 '20 at 15:26

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.