liveBook · Manning

Frisch–Waugh–Lovell theorem

As explained in Causal Inference for Data Science

The Frisch–Waugh–Lovell theorem states that the coefficient of a variable in a multiple linear regression equals the coefficient obtained by regressing residualized outcomes on residualized predictors.

Estimate a treatment’s effect on an outcome by controlling for confounders directly, or by removing their effects from both variables first. The Frisch–Waugh–Lovell theorem says both approaches produce the same treatment coefficient in a linear model. section 8.1.1

Apply the residualization strategy in three steps:

  • Regress treatment D on confounders C, predict each treatment value, and retain the residuals. section 8.1.1
  • Regress outcome O on C, predict each outcome value, and retain the outcome residuals. section 8.1.1
  • Regress residualized outcome on residualized treatment; its coefficient estimates the same effect as O ~ D + C. section 8.1.1

Synthetic treatment and outcome data

Synthetic data generate a confounder, treatment, and outcome with a treatment effect of 5. Direct adjustment estimates 4.9473, while the FWL residual regression returns 4.947307.

Figure 8.2 DML strategy applied to linear regressions to calculate the coefficient from D to O
figure

Trace the residualization strategy from confounder adjustment to the final treatment-effect regression. section 8.1.1

How Causal Inference for Data Science covers it

How deep it goes
Explains the three residualization steps and sketches their error-term intuition while simplifying to one confounder and no intercept.
Examples
Uses synthetic R and Python data, adjusted regression coefficients, residual regressions, and a residualization diagram.
What it assumes
Assumes linear regression and confounders, while teaching the residualization procedure from its prediction and residual calculations.
What you can do after
Apply the theorem in R or Python to reproduce an adjusted treatment coefficient through residualized regressions.
How it connects
Connects linear regression, confounding, causal effects, residuals, and double machine learning.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.