# Fixed effects with panel data vs including lagged variables with cross section data

Cross Validated Asked by gannawag on January 3, 2022

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?

## Related Questions

### Basic RNN sequence classifier diagram?

0  Asked on December 3, 2021 by jbuddy_13

### Including the interaction but not the main effects in a model

18  Asked on December 3, 2021 by glen

### Which statistical test to compare weekly weight changes? (Gain or loss)

2  Asked on December 3, 2021

### Why is the autoencoder decoder usually the reverse architecture as the encoder?

2  Asked on December 3, 2021 by duncster94

### Estimate the period effect using logistic regression

0  Asked on December 3, 2021 by user102546

### Set proper threshold for binary prediction in ElasticNet

1  Asked on December 3, 2021

### $X_{1},X_{2},X_{3}overset{i.i.d.}{sim}N(0,1)$, find m.g.f. of $Y=X_{1}X_{2}+X_{1}X_{3}+X_{2}X_{3}$

2  Asked on December 3, 2021 by sofia-fredriksson

### When you do a random permutation F test (by permuting group membership) is inference made on the samples or the populations?

1  Asked on December 3, 2021

### IV changes the sign of exogenous variable

1  Asked on December 3, 2021 by zhenkai-ran

### Time varying Shapley Decomposition

1  Asked on December 3, 2021 by raghav-goyal

### Estimating the blockchain mining time for $N$ nodes

2  Asked on December 3, 2021 by slowmountain

### GLMM indicates a negative trend, graph shows a positive trend

2  Asked on December 3, 2021

### Question on solution to a typical stochastic process – interview question

0  Asked on December 1, 2021

### Proving a hypothesis test is not a UMP test

1  Asked on December 1, 2021 by harisf

### Cluster analysis considering uncertainty

1  Asked on December 1, 2021 by estela

### Causal estimates have high correlation with naive estimates – what may this imply?

2  Asked on December 1, 2021 by cam-davidson-pilon

### How to inform the space and time complexity of K-means, SOM and Hierachical clustering

1  Asked on December 1, 2021

### In SARSA and Q-learning algorithms in RL, is policy updated during the iteration for Q-value learning?

1  Asked on December 1, 2021 by ruye

### Mathematical explanation for this relationship

0  Asked on December 1, 2021 by azmisov

### Definition of a support vector (SVM)

1  Asked on December 1, 2021 by confucius