Reading the current lesson
Learn
Interactive·

Panel Data

How can we separate firms that were always more productive from firms that increased training spending?

Panel data follow the same firms, people, schools, or countries over time. This lets us distinguish persistent differences between units from changes that occur within the same unit.

A simple pooled regression may confuse firms that are always more productive with the effect of a firm increasing its own training spending.

Key question

When a given firm changes its training spending, how does its own productivity change?

1

Concept

What makes panel data different?

Panel data combine cross-sectional differences with repeated observations over time

Source of variationExample
Between unitssome firms consistently spend more on training than others
Within a unitthe same firm increases or decreases training spending over time
Over timeeconomy-wide shocks affect all firms in a given year

Entities across time

yᵢₜ
i1i2i3t

The same entities are observed again at every period.

Fixed effects

within

Centring each entity on its own mean removes whatever never changes about it.

Within vs between

two slopes

Comparing entities and following one entity can point in opposite directions.

2

Why It Matters

What does fixed effects remove?

Fixed effects remove time-invariant differences between units

Firm culture, location, or long-standing management quality may be unobserved but nearly constant over time. Fixed effects compare each firm with itself after removing its stable average level.

Within-firm interpretation

A training coefficient describes how productivity changes when the same firm changes training spending, net of stable firm-specific characteristics and any included time effects.

Not automatic causality

Fixed effects do not remove omitted factors that change over time, reverse causality, measurement error, or anticipation effects.

3

How It Works

What does random effects assume?

Random effects use both within- and between-unit information under a stronger assumption

Random effects assume the unobserved unit-specific component is uncorrelated with the predictors. When that assumption fails, the coefficient can mix hidden unit differences with the predictor relationship.

ModelMain source of identificationKey concern
Fixed effectschanges within the same unitcannot estimate coefficients for time-invariant predictors
Random effectswithin- and between-unit variationrequires no correlation between unit effects and predictors
4

Example

Within-unit versus between-unit effects

Within-unit and between-unit relationships can differ

Firms that spend more on training on average may also be better managed. That between-firm relationship can be positive even if increasing training within a particular firm has a smaller effect.

Time effects and clustered uncertainty

Year fixed effects can absorb common shocks. Standard errors are often clustered by unit because repeated observations from the same unit are related.

5

Interactive

Change hidden unit differences

Change hidden unit differences

Increase the correlation between a firm’s hidden baseline and its predictor. Compare pooled, fixed-effects, and random-effects estimates.

Pooled OLS slope

5.06

Fixed-effects slope

2.00

Random-effects slope

2.72

Entity A

t=1 · x=1 · y=22.0

t=2 · x=2 · y=24.0

t=3 · x=3 · y=26.0

t=4 · x=4 · y=28.0

Entity B

t=1 · x=2 · y=36.0

t=2 · x=3 · y=38.0

t=3 · x=4 · y=40.0

t=4 · x=5 · y=42.0

Entity C

t=1 · x=3 · y=50.0

t=2 · x=4 · y=52.0

t=3 · x=5 · y=54.0

t=4 · x=6 · y=56.0

These slopes are illustrative summaries designed to show how pooled, fixed-effects, and random-effects estimates respond to the simulated data structure.

What to watch

As hidden unit differences become more related to the predictor, pooled and random-effects estimates can move away from the within-unit relationship.

Key takeaways

  • Panel data separate persistent differences between units from changes within the same unit.
  • Fixed effects remove time-invariant unit characteristics and estimate within-unit relationships.
  • Random effects are more efficient only when unit effects are uncorrelated with the predictors.
  • Use time effects and clustered standard errors when the design and error structure require them.
Next: Time-series regression