# 4.1 — Panel Data and Fixed Effects - Class Notes

## Contents

Tuesday, November 10, 2020

## 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}$$.

## New Packages Mentioned

Note there are several other popular packages (that I have not extensively worked with), such as fixest, lfe.

## Assignments

Homework 5 answers are posted on that page.

## Live Class Session on Zoom

The live class Zoom meeting link can be found on Blackboard (see LIVE ZOOM MEETINGS on the left navigation menu), starting at 11:30 AM.

If you are unable to join today’s live session, or if you want to review, you can find the recording stored on Blackboard via Panopto (see Class Recordings on the left navigation menu).