How to establish relationship between regressions on subsets of data? From classical OLS, the regression of $y\in\mathbb{R}^n$ on $X\in\mathbb{R}^{n\times k}$ yields $\beta = (X^TX)^{-1} X^Ty$. Suppose we were to partition $X$ into two blocks as: $X = \begin{pmatrix} X_1 \\\ X_2 \end{pmatrix}$, such that $X_i\in\mathbb{R}^{n_i\times k}, i\in\{1,2\}$, and $y = \begin{pmatrix} y_1 \\\ y_2 \end{pmatrix}$. Let $\beta_i=(X_i^TX_i)^{-1} X_i^Ty_i$, $i=1,2$. Is there any closed-form relationship between $\beta$, $\beta_1$ and $\beta_2$?
 A: EDIT: There is an elegant and useful way and a (at least) one clumsy one. The former is by whuber in his comment below which I copy here so it does not get overlooked in the comments. My own one follows below.
Useful
Rewrite the normal equations
$$
X'X\hat\beta=X'y
$$
as
$$
X'X\hat\beta=X_1'y_1+X_2'y_2=X_1'X_1(X_1'X_1)^{-1}X_1'y_1+X_2'X_2(X_2'X_2)^{-1}X_2'y_2,
$$
which equals
$$
X'X\hat\beta=X_1'X_1\hat\beta_1+X_2'X_2\hat\beta_2,
$$
Clumsy
With $X:=\begin{pmatrix}X_1\\X_2\end{pmatrix}$,
$$
\hat\beta=(X_1'X_1+X_2'X_2)^{-1}(X_1'y_1+X_2'y_2)
$$
Using https://math.stackexchange.com/questions/17776/inverse-of-the-sum-of-matrices, we may rewrite this as
$$
\hat\beta=[(X_1'X_1)^{-1}-(X_1'X_1)^{-1}X_2'X_2(X'X)^{-1}](X_1'y_1+X_2'y_2)
$$
Multiplying out gives
$$
\hat\beta=\hat\beta_1+(X_1'X_1)^{-1}X_2'y_2-(X_1'X_1)^{-1}X_2'X_2\hat\beta
$$
so that
$$
\hat\beta=[I+(X_1'X_1)^{-1}X_2'X_2]^{-1}(\hat\beta_1+(X_1'X_1)^{-1}X_2'y_2).
$$
If we want $\hat\beta_2$ to show up, we could rewrite
$$
\begin{align*}
\hat\beta&=[I+(X_1'X_1)^{-1}X_2'X_2]^{-1}(\hat\beta_1+(X_1'X_1)^{-1}(X_2'X_2)(X_2'X_2)^{-1}X_2'y_2)\\
&=[I+(X_1'X_1)^{-1}X_2'X_2]^{-1}(\hat\beta_1+(X_1'X_1)^{-1}(X_2'X_2)\hat\beta_2)
\end{align*}
$$
This is closed-form (unsurprisingly, since it just rewrites the closed-form full-sample OLSE), but probably not the type of result you had in mind?
