# Constants in Frisch-Waugh-Lovell / Partialling Out

If in general one wants to apply the Frisch-Waugh-Lovell "Partialling Out"-approach, should we include constants and in which of the following regressions?

• (1) In the first stage where we regress X1 on X2 in order to get the residuals?
• (2) In the auxiliary stage where we regress Y on X2 in order to get the residuals?
• (3) In the second stage where we regress the residuals of (2) on the residuals of (1) to get the estimator?
• Can you provide a detailed description of the methodology you are using in the question. Basically you are estimating slope coefficients which do not depend on constants Jan 12 at 11:14
• If by "include constants" you mean incorporate an intercept in the model, then the mathematics doesn't care: an intercept is just one more variable.
– whuber
Jan 12 at 12:25
• @seanv507, slope coefficients surely can be affected by whether or not the regression includes a constant, no? Jan 12 at 13:27
• @ChristophHanck, agreed Jan 12 at 14:50

As whuber has pointed out, the constant is just another variable, so you may or may not want to partial it out via FWL. Since constants make sense in most regressions, you are more likely to want to partial out the constant than not.

But if you decide to include it, then FWL says you have to include it in both steps (1) and (2), and since it has been partialled out, you need not include it in step (3) anymore. (Indeed, the historical value of the FWL theorem was that it permitted finding regression coefficients from several shorter regressions, when it was still a major issue that inverting the $$X'X$$ matrix becomes rapidly more computationally demanding as the number of regressors increases.)

That said, since the regressor in the final stage (residuals of a regression on a constant among others) is then by contruction orthogonal to that constant by OLS properties, the coefficient on $$x_2$$ (in my answer the roles of $$x_1$$ and $$x_2$$ are the other way round to your question) is not affected so that we can, unnecessarily, include the constant in the final stage, too.

Again, this is a general property of OLS that the coefficients in a short regression are the same as in a long regression when the additional regressors in the long regression are orthogonal to those of the short regression. See Does it make sense to interact two uncorrelated independent variables in linear regression?.

Illustration:

n <- 10
x1 <- rnorm(n)
x2 <- rnorm(n)
y <- 2 + rnorm(n)

resid.firststage.x2 <- resid(lm(x2~x1)) # includes constant by default
resid.firststage.y <- resid(lm(y~x1)) # includes constant by default
coef(lm(resid.firststage.y~resid.firststage.x2-1)) # stage (3), same coefficient for x2 as in...
coef(lm(y~x1+x2))

coef(lm(resid.firststage.y~resid.firststage.x2)) # also includes a constant, coefficient on x2 still the same

resid.firststage.x2.wo.cst <- resid(lm(x2~x1-1)) # ...but it is not the same when we omit the constant in one of the first stage regressions
coef(lm(resid.firststage.y~resid.firststage.x2.wo.cst-1))