I have a question regarding what terminology should I use in my paper when I consider the following model:

$y_{it} = \alpha + \beta_0T_i + \beta_1\text{Time}_{t} + \beta_2(\text{Time}_{t} \times T_i) + \chi'_{it}\gamma + \epsilon_{it}$

In this case the regression is based on the individual-year unit and $T_i$ is a binary variable for treatment and $\text{Time}_{t}$ is a binary variable for the time period (there are only 2).

Since I wanted to use individual and time fixed effects and I have only 2 time periods I took the first difference and ran the following regression:

$\Delta_t(y_i) = \beta_1 + \beta_2T_i + \Delta_t(\chi'_i)\gamma + \Delta_t(\epsilon_i)$

What should I say that I have used: a fixed effects or differences in differences approach?


2 Answers 2


Differencing or demeaning your equation will remove the within-unit effects. In fact, in your setting with $T = 2$, your estimates of $\beta_{2}$ should be the same whether you difference, demean, or 'pool' your data. I conducted a quick test in R using the plm() function to demonstrate this (see below). In settings where $T > 2$, however, this no longer holds.

Both fixed effects and difference-in-differences (DD) models include fixed effects for units/higher-level entities (i.e., firms, counties, states, etc.). Your equation is the canonical DD setup most people see in texts/papers. In my opinion, I would call it a DD approach.

Labeling this a fixed effects approach, however, is not inaccurate either, as DD is a special case of fixed effects. See this post for more information. Again, I should note, differencing your equation will not produce similar treatment effects once you acquire more than two periods.

# Classical DD Equation
# Pooling vs. Differencing vs. Demeaning
# T = 2 ONLY!

data <- tibble(
  id = c(rep(1, 2), rep(2, 2), rep(3, 2), rep(4, 2)),  # 4 units
  time = rep(c(1, 2), 4),                              # 2 periods
  y = rnorm(8, mean = 10, sd = 1)                      # random outcome

data_two_periods <- data %>%
  mutate(treat = ifelse(id == 3 | id == 4, 1, 0),      # treatment group (units 3 and 4)
  post = ifelse(time == 2, 1, 0)                       # post-treatment (period 2)


plm_pool <- plm(y ~ treat*post, data = data_two_periods, index = c("id", "time"), model = "pooling")
plm_diff <- plm(y ~ treat*post, data = data_two_periods, index = c("id", "time"), model = "fd")
plm_fe <- plm(y ~ treat*post, data = data_two_periods, index = c("id", "time"), model = "within")

# Pulling out the coefficients on each interaction term

> plm_pool$coefficients["treat:post"]

> plm_diff$coefficients["treat:post"]

> plm_fe$coefficients["treat:post"]

Please review this interesting post which discusses how the addition of covariates might impact your estimates in the two period case.


This is old but leaving this here because this code could be misleading to some.

In the code above the results are only the same because treat plays the role of an "intercept" / trend in the model matrix in the FE model. In the plm defaults, within does not have a global intercept (since you are assuming a model in which there are unit specific $\alpha_i$'s) while fd does include an intercept.

This does not mean that first differences and fixed effects in the two period case are not equivalent, they are, but in the code above (as in the plm defaults) you have a global intercept in one estimator and not in the other.

So in a general (two period) setup, if you want plm to give you the same results under a fixed effects and first difference model you need to force them to be the same (i.e., drop the intercept from fd or add the time trend to within, results will be different depending on what you decide since they are two different models).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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