Suppose that I have the following model:
$y_i = \beta_0 + \beta_1 x_{1i} + \beta_2 x_{2i} + u_i$
where $\hat{\beta_k}$, k=0,1,2 , are estimated by the method of least squares, using a sample of size n.
How can I show that if $z_i =a_0 + a_1 x_{1i} + a_2 x_{2i} $, where $a_k$ are constants, then:
$\sum_{i=1}^n z_i(y_i-\hat{\beta_0} - \hat{\beta_1} x_{1i} - \hat{\beta_2} x_{2i})=0$ ?
My attempt was to try to expand and compare to the first order condition: $\sum_{i=1}^n (y_i-\hat{\beta_0} - \hat{\beta_1} x_{1i} - \hat{\beta_2} x_{2i})=0$, but things got messy and lead to nowhere.
You are minimizing the following function $$ \arg \min S(\beta)=\arg\min\sum ( y_i - \beta_0 - \beta_1x_{1i} - \beta_2x_{2i} ) ^2 $$ From the F.O.C you have the following equation $$ \sum(y_i - \hat{\beta}- \hat{\beta}_1x_{1i}-\hat{\beta}_2x_{2i})=0 $$ $$ \sum x_{1i}(y_i - \hat{\beta}- \hat{\beta}_1 x_{1i}-\hat{\beta}_2x_{2i})=0 $$ $$ \sum x_{2i}(y_i - \hat{\beta}- \hat{\beta}_1x_{1i}-\hat{\beta}_2 x_{2i})=0 $$, now, multiple eq. (1) by $\alpha_0$, eq. (2) by $\alpha_1$ and eq. (3) by $\alpha_3$ and add them up $$ \sum(\alpha_0 + \alpha_{1}x_{1i} + \alpha_2 x_{2i})(y_i - \hat{\beta}- \hat{\beta}_1 x_{1i}-\hat{\beta}_2 x_{2i})=0 . $$