Course outline

Fixed Effects

By the end of this lesson, you should be able to: say precisely what a unit fixed effect removes and what it leaves, rebuild one by hand as a regression on deviations, name the kind of confounder that walks straight through both sets of dummies, and judge from the confounder's behaviour whether fixed effects will help at all.

The ladder everyone climbs

Alder Go spends on courier incentives across 120 cities. Two years of weekly data, 12,480 city-weeks, and the question is what a dollar of incentive buys in orders.

The planted answer is an elasticity of 0.080: 10% more spend gets you 0.8% more orders.

SpecificationEstimateOff by
Pooled OLS0.9530.873
City fixed effects0.4510.371
City and week fixed effects0.2470.167
City and week FE, plus local demand0.0800.000
The truth0.080

Each rung is a real improvement, and each one is doing a specific job.

StepChangeWhat it removed
Pooled to city FE+0.502City size, which never moves
City FE to two-way-0.204The national week
Two-way to plus demand-0.168The one FE cannot see

19% of the pooled bias survives both sets of fixed effects, and the surviving estimate is still three times the truth.

What a fixed effect actually is

Before the failure, the mechanism, because "add city dummies" is where fixed effects stop being understood and start being copied.

Run the 120-dummy regression. Then throw the dummies away, subtract each city's own average from both the outcome and the spend, and run a plain one-variable regression on what's left.

Coefficient
120 city dummies0.451408
Subtract each city's own mean0.451408

They agree to 7.2 × 10⁻¹⁶. This is the same Frisch-Waugh-Lovell result lesson 5 used, with city dummies as the covariates being projected out.

Which gives you the sentence worth carrying: a city fixed effect isn't a control variable, it's an instruction to compare a city only against itself. Big cities are never compared to small ones again. Everything about a city that holds still, its size, its density, its competitive position, its regulatory regime, drops out whether or not you ever measured it. That's an enormous amount of confounding removed for one line of code, and it's why the method is everywhere.

It also tells you the limit in the same breath. Anything that moves inside a city stays.