# Econometrics - Panel Data: Relationship between total, within and between

I need to prove the following statement, which is $$\hat{\beta}_{total} = W(x)\hat{\beta}_{within} + (I-W(x))\hat{\beta}_{between}$$,

where $$\hat{\beta}_{within}$$ is the fixed effect estimator(i.e. the estimator of the linear regression of $$y_{it} - \bar{y_i}$$ on $$x_{it} - \bar{x_i}$$), $$\hat{\beta}_{between}$$ is the estimator of the linear regression of $$\bar{y_i}$$ on $$\bar{x_i}$$, and $$\hat{\beta}_{total}$$ is just the regression of y on x, pretending it’s not a panel data. $$W(x)$$ is a matrix-valued function of the data $$\{x_{it}\}_{i=1, t=1}^{N, T}$$, and the question need us to find an explicit expression for $$W(x)$$ as well.

In the previous part, I have already proved that $$\sum_{i=1}^N\sum_{t=1}^T (x_{it} - \bar{x_i})’ (x_{it} - \bar{x_i}) + T\sum_{i=1}^N \bar{x_i}’\bar{x_i} = \sum_{i=1}^N\sum_{t=1}^Tx_{it}’x_{it}$$

And

$$\sum_{i=1}^N\sum_{t=1}^T (x_{it} - \bar{x_i})’ (y_{it} - \bar{y_i}) + T\sum_{i=1}^N \bar{x_i}’\bar{y_i} = \sum_{i=1}^N\sum_{t=1}^Tx_{it}’y_{it}$$

I don’t know how to connect these two parts to prove the actual statement. The matrix algebra is so confusing, and I don’t know what $$W(x)$$ can be. Any help is welcome. Thanks!

• "I don’t know what $W(x)$ can be." If you have to prove a statement where you do not understand the notation, asking for clarification from the lecturer or rereading the textbook is probably a good idea. Mar 9 at 8:58
• @Giskard I think it’s part of the proof to deduct $W(x)$. Mar 9 at 9:02
• If you only "think" so, asking your lecturer is still a good idea? And if you are right, then the objective is not to "prove" the statement but to find $W(x)$. Mar 9 at 9:11