I have panel data with many groups $i$ and two time periods $t$. I want to know the effect of a binary treatment $D$ on a continuous outcome $Y$. Some groups go from untreated to treated, while others are treated in both periods, and others are untreated in both periods. I am considering two approaches, and I'm curious about the differences between the two.

Approach 1: Fixed effects with panel data

I shape the data into long format, where each observation is a group-time period (so each group has two observations in this case). Then I run the following regression:

$Y_{it} = \delta_1 D_{it} + \alpha_i + \gamma_t + \epsilon_{it} $

Where $\alpha_i$ is a group-level fixed effect, and $\gamma_t$ is a time period-level fixed effect (in this case it would just be a dummy for the second time period).

Approach 2: including lagged variables with cross section data

Reshape the data into wide format, so each observation is a group. Then I have two new variables that are the lagged outcome value ($Y_{t-1}$), and the lagged treatment status variable ($D_{t-1}$). The $i$ subscript is gone. Run the following regression:

$Y_{t} = \delta_2 D_{t} + \beta_1 D_{t-1} + \beta_2 Y_{t-1} + \nu_{t} $

Question: What is the difference between the two approaches? Is one generally preferred or is it context-specific? here is a screenshot of some made up data in long format. the wide format only uses the observations where the lags are not NA

  • $\begingroup$ After some simulations...my guess now is that the coefficient estimates are going to be similar but the variance of the estimator in approach 2 is consistently lower than the variance of the estimator in approach 1. Still trying to understand why... $\endgroup$ – gannawag Jul 24 '20 at 20:40
  • $\begingroup$ I have a question about your second approach. If the data is in wide format you only have one observation per group. Thus, your lag should be NA if I am not mistaken. You don’t have enough information to use a time-varying treatment dummy. Am I missing something? Care to show us a subset of each data frame? $\endgroup$ – Thomas Bilach Jul 24 '20 at 20:55
  • $\begingroup$ @ThomasBilach you are correct! in the long format there are half as many observations. I will paste in my simulation here but not sure it will help. $\endgroup$ – gannawag Jul 24 '20 at 20:57
  • $\begingroup$ Or at least show us your output for these regressions? What estimate are you getting for $\delta_{2}$? I apologize if I am assuming you ran these models already. $\endgroup$ – Thomas Bilach Jul 24 '20 at 21:03
  • $\begingroup$ @ThomasBilach I pasted a screenshot of some example data. $\endgroup$ – gannawag Jul 24 '20 at 21:04

Your Answer

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

Browse other questions tagged or ask your own question.