Skip to content

Frisch–Waugh–Lovell theorem

The Frisch–Waugh–Lovell theorem recovers a multiple-regression slope by residualising both variables. Check an exact example, the one-sided mistake and standard-error limits.

The Frisch–Waugh–Lovell (FWL) theorem says that an ordinary least-squares coefficient in a multiple regression can be recovered by removing the other regressors from both the outcome and the regressor of interest, then regressing the resulting residuals on each other. For a quant estimating a signal's return association alongside sector or market controls, it identifies exactly which remaining variation determines the signal's fitted coefficient.
This is an algebraic identity for the chosen sample and model. “Removing” means subtracting a fitted linear projection, not deleting observations or establishing that the remaining association is causal.

The same adjustment on both sides

Suppose the full multiple linear regression is fitted by ordinary least squares:
y=Cγ+xβ+ε.y=C\gamma+x\beta+\varepsilon.
Here xx is the single regressor whose coefficient matters, and CC contains all the controls, including the intercept if the full model has one. Assume the combined design has full column rank. To recover β^\hat\beta:
  1. Regress yy on CC and keep the residuals, ryr_y.
  2. Regress xx on the same CC and keep rxr_x.
  3. Regress ryr_y on rxr_x through the origin:
β^=rx⊤ryrx⊤rx.\boxed{\hat\beta=\frac{r_x^\top r_y}{r_x^\top r_x}.}
The slope and final residual vector equal those from the full model. When CC includes a constant, both residual series already have zero sample mean; adding a constant in the last fit leaves the slope unchanged, though it can change software's default degrees-of-freedom calculation. Hansen's residual-regression theorem states the equivalence for entire blocks of regressors as well as a single column.

Four observations you can check by hand

Take four synthetic observations, with active return yy recorded as a percent number, a dimensionless score xx, and a binary group indicator zz. Thus y=1y=1 means a 1%1\% active return. These deliberately small numbers illustrate the identity; they are not an empirical signal study.

Regress both xx and yy on an intercept and zz. Because the only control is a binary group, these fits subtract each variable's mean within its group:

x^C=1+z,y^C=2+5z.\widehat x_C=1+z,\qquad \widehat y_C=2+5z.
ObservationScore xxGroup zzReturn yy (%)Residual score rxr_xResidual return ryr_y (pp)
1001−1−1
2114−1−3
320311
4311013

The partial slope is

β^=(−1)(−1)+(−1)(−3)+(1)(1)+(1)(3)(−1)2+(−1)2+12+12=84=2.\hat\beta =\frac{(-1)(-1)+(-1)(-3)+(1)(1)+(1)(3)}{(-1)^2+(-1)^2+1^2+1^2} =\frac84=2.

Fitting all three columns at once gives the same score coefficient:

y^=0+2x+3z.\hat y=0+2x+3z.

Within this fitted model, one additional score unit is associated with a 22 pp higher active return, holding group fixed. The full-model group coefficient is 33 pp. The preliminary outcome-on-group slope was 55 pp because that preliminary fit had not also controlled for the score.

Four synthetic observations. Adjusting return for intercept and group but leaving score raw gives slope 1.6. Adjusting both gives residual score −1, −1, 1, 1 and residual return −1, −3, 1, 3 pp, with slope 2, matching the full regression.
Four synthetic observations. Adjusting return for intercept and group but leaving score raw gives slope 1.6. Adjusting both gives residual score −1, −1, 1, 1 and residual return −1, −3, 1, 3 pp, with slope 2, matching the full regression.
Original synthetic active-return example. The left panel leaves shared control variation in the score; the right panel removes the same controls from both axes. Row labels identify the same observations.
The one-sided mistake: regressing ryr_y on the original xx, with an intercept, gives ry≈−2.4+1.6xr_y\approx-2.4+1.6x, not a slope of 22. Adjusting the outcome alone leaves the regressor's control-related variation in its denominator. For the residual-on-residual construction, residualise both variables.
There is a useful asymmetric identity in the other direction: regressing raw yy on rxr_x also gives the full-model slope because rxr_x is orthogonal to CC. But its residuals differ from the full model's residuals, so its reported uncertainty is not automatically usable. Ding, §2.2, distinguishes this variant explicitly.

Why the cancellation works

Define the residual-maker matrix

MC=I−C(C⊤C)−1C⊤.M_C=I-C(C^\top C)^{-1}C^\top.

It annihilates the control columns, MCC=0M_CC=0, and is symmetric and idempotent: MC⊤=MCM_C^\top=M_C and MC2=MCM_C^2=M_C. Thus rx=MCxr_x=M_Cx and ry=MCyr_y=M_Cy. After eliminating the control coefficients from the full normal equations,

β^=(x⊤MCx)−1x⊤MCy=(rx⊤rx)−1rx⊤ry.\hat\beta=(x^\top M_Cx)^{-1}x^\top M_Cy =(r_x^\top r_x)^{-1}r_x^\top r_y.
The lesson Least Squares and Regression Geometry develops the projection and residual-orthogonality argument (public preview; full lesson requires membership).
This also explains the rank condition. If the controls reproduce xx exactly, then rx=0r_x=0 and there is no denominator with which to identify a separate coefficient. If little residual variation remains, individual attribution can be imprecise. Multicollinearity: VIF and Consequences for Inference connects this residual variation to coefficient variance (public preview; full lesson requires membership).

Coefficients match; check the uncertainty calculation

In the four-row example, both correct fits leave residuals (1,−1,−1,1)(1,-1,-1,1) pp, with squared sum 4 pp24\text{ pp}^2. The full model estimates three coefficients, leaving 4−3=14-3=1 residual degree of freedom. Under the classical constant-variance covariance formula, its estimated score-coefficient standard error is

SE^(β^)=4/(4−3)rx⊤rx=1pp per score unit.\widehat{\mathrm{SE}}(\hat\beta) =\sqrt{\frac{4/(4-3)}{r_x^\top r_x}}=1 \quad\text{pp per score unit}.

A naive through-origin fit of ryr_y on rxr_x counts just one estimated coefficient and uses 4−1=34-1=3 degrees of freedom. It reports 1/3≈0.5771/\sqrt3\approx0.577 instead. The control fitting has not become free merely because its coefficients are hidden from the last regression.

Ding's Theorem 2 and §2.2 show that unadjusted heteroskedasticity-robust HC0 covariance estimates do agree for the full and correctly residualised fits. Degrees-of-freedom corrections and leverage-based variants need separate treatment. Equality of point estimates alone is insufficient, and an algebraic covariance identity does not establish that a chosen estimator gives valid inference for the data's dependence structure.

Use the same observation rows, controls and fitting convention throughout. Weighted least squares requires a consistent weighted projection and the same weights in every stage. Partialling out by ordinary OLS and then changing the final regression's weights is a different calculation. Finally, FWL supplies no causal identification: omitted confounders, simultaneity and a poorly chosen control set survive the algebra.

Sources

Last updated
  • regression
  • partial regression
  • residualisation
  • factor exposures
  • linear algebra
← Back to the glossaryBack to top ↑