Overview
Today, we begin our brief look at panel data, where we track multiple individuals over time. Panel data contains its own unique challenges, because it contains a time series component for every individual, giving potential sources of bias.
We now need to understand the third assumption about \(u_i\): no autocorrelation. The errors of our observations are likely going to be correlated within each individual and within each time period.
We can correct for these with a fixed effects model that isolates and absorbs some of that bias. In general, for a two-way fixed effects model:
\[\widehat{\text{Y}}_{it} = \beta_0+\beta_1 \text{X}_{1it} + \beta_2 \text{X}_{2it}+\alpha_{i} + \theta_{t} + \nu_{it}\]
Each observation is an individual \(i\) at time \(t\) (pay attention to the subscripts).
- Let \(Y_{it}\) be our dependent variable, and \(X_{1it}\) be the independent variable of interest. We would like to estimate the causal effect of \(X_{1it} \rightarrow Y_{it}\).
- \(\alpha_i\) is the group fixed-effect. It absorbs all unobservable factors that vary by group but don’t change over time.
- \(\tau_t\) is the time fixed-effect. It absorbs all unobservable factors that do not vary by group but change over time.
- Since the fixed effects do not pick up factors that both vary by group and change over time, we need to include other variables that might cause \(X_{1it}\) to be endogenous: hence, \(X_{2it}\)
- \(\nu_{it}\) is the remaining (random) error term (after we have pulled \(\alpha_i\) and \(\tau_t\) out of \(u_{it}\).
Readings
- Ch. 8.1—8.4 in Bailey, Real Econometrics
Slides
Below, you can find the slides in two formats. Clicking the image will bring you to the html version of the slides in a new tab. Note while in going through the slides, you can type h to see a special list of viewing options, and type o for an outline view of all the slides.
The lower button will allow you to download a PDF version of the slides. I suggest printing the slides beforehand and using them to take additional notes in class (not everything is in the slides)!
Assignments
Problem Set 5 Due Tues Nov 23
Problem Set 5 is due by the end of the day on Tuesday, November 23. This will be your final graded homework!
New Packages Mentioned
fixest
for working with fixed effects modelsfor working with panel data and fixed effects
Note there are several other popular packages for working with panel data and fixed effects. I used to use (and teach) plm
but now find fixest
more efficient. There is also lfe
which I have not worked with.