← All notes
Setup
Given the linear model:
y=Xb+e
We can partition the columns of X into X1 and X2 to get:
y=X1b1+X2b2+e
Solving the least squares problem with the partitioned representation of the model, we find the normal equations:
[X1′X1X2′X1X1′X2X2′X2][b1b2]=[X1′yX2′y]
Solving
Our normal equations form a system of (two) equations. Therefore, solve for b1 and substitute into b2 to find the solution.
Finding b1:
X1′X1b1+X1′X2b2⟹b1=X1′y=(X1′X1)−1X1′(y−X2b2)
Substituting into the second normal equation and expanding:
X2′y=(X2′X2)b2+X2′X1b1=(X2′X2)b2+X2′X1(X1′X1)−1X1′(y−X2b2)=(X2′X2)b2+X2′X1(X1′X1)−1X1′y−X2′X1(X1′X1)−1X1′X2b2
Continuing with algebra to isolate b2:
X2′y+X2′X1(X1′X1)−1X1′yX2′(I+X1(X1′X1)−1X1′)y=(X2′X2)b2−X2′X1(X1′X1)−1X1′X2b2=X2′(I−X1(X1′X1)−1X1′)X2b2
Substitute in the residual maker matrices:
X2′M1y=X2′M1X2b2
Recalling that these residual makers are idempotent and symmetric:
(X2′M1′)(M1y)(M1X2)′(M1y)X~2′y~=(X2′M1′)(M1X2)b2=(M1X2)′(M1X2)b2=X~2′X~2b2
Finally,
b2=(X~2′X~2)−1X~2′y~