← All notes

Note · Quantitative Finance / Econometrics

The Effect of Including a Constant Column in OLS

Deviations from means.

Prerequisites: Understanding partitioned least squares and its solution.

Setup

Given the linear model:

y=Xb+e\begin{align} \pmb y = X \pmb b + \pmb e \end{align}

We can partition the columns of XX into X1X_1 and X2X_2 to get:

y=X1b1+X2b2+e\begin{align} \pmb y = X_1 \pmb b_1 + X_2 \pmb b_2 + \pmb e \end{align}

Partitioned Least Squares Result

Recall that b2=(X~2′X~2)−1X~2′y~\pmb b_2 = (\tilde X_2' \tilde X_2)^{-1} \tilde X_2'\tilde{\pmb y} and that each variable with a tilde is the result of being partialled out by M1=I−X1(X1′X1)−1X1′M_1 = I - X_1(X_1'X_1)^{-1}X_1'.

Applying result to inclusion of a column of 1’s

Consider the case where X1=ιX_1 = \pmb \iota, then each column of X~2\tilde X_2 is the form:

x~2=(M1)x2=(I−ι(ι′ι)−1ι′)x2=M0x=x¨\begin{align} \tilde{\pmb x}_2 &= (M_1)\pmb x_2 \\ &= (I - \pmb \iota(\pmb \iota'\pmb \iota)^{-1}\pmb \iota')\pmb x_2 \\ &= M_0 \pmb x \\ &= \ddot{\pmb x} \end{align}

We also have M0yM_0 \pmb y so y~=y¨\tilde{\pmb y} = \ddot{\pmb y} so all variables in the regression are effectively converted to deviations from their means in the regression. (See here for more on M0M_0)

Which brings us to the result including a coefficient has on the solution to regression:

b2=(X¨2′X¨2)−1X¨2′y¨\begin{align} \pmb b_2 = (\ddot X_2'\ddot X_2)^{-1}\ddot X_2' \ddot{ \pmb y} \end{align}

Deriving the coefficient on ι\pmb \iota

Recall that b1=(X1′X1)−1X1′(y−X2b2)\pmb b_1 = (X_1'X_1)^{-1}X_1'(y - X_2 \pmb b_2).

Also, notice that b1\pmb b_1 is just a a scalar b1b_1 (because X1X_1 is just one column).

We have:

b1=(ι′ι)−1ι′(y−X2b2)=(ι′ι)−1(ι′y−ι′X2b2)=(1/n)(nyˉ−nxˉ′b2)=yˉ−xˉ′b2\begin{align} b_1 &= (\pmb \iota'\pmb \iota)^{-1}\pmb \iota'(\pmb y - X_2 \pmb b_2) \\ &= (\pmb \iota'\pmb \iota)^{-1}(\pmb \iota'\pmb y - \pmb \iota' X_2 \pmb b_2) \\ &= (1/n)(n\bar y - n\bar{\pmb x}' \pmb b_2) \\ &= \bar y - \bar{\pmb x}' \pmb b_2 \end{align}