Suppose we have a data set and run a regression to obtain the form $$\hat{y_i}=\hat{\alpha}+\hat{\beta}x_i+\hat{\gamma}z_i$$

Suppose $x_i=3,z_i=5$ we can calculate the fitted value $\hat{y_i}$ assume to be $10$ given $\hat{\alpha},\hat{\beta},\hat{\gamma}$ is known.

However, in Eview, the programme calculate the fitted value by regress again in the form of $$\hat{y_i}^*=\hat{\alpha}^*+\hat{\beta}^*(x_i-3)+\hat{\gamma}^*(z_i-5)$$ then $\hat{\alpha}^*$ will be the fitted value $10$ as the fitted value of first equation.

I was wabbling about the intuition behind this, I feel it's right but I am surprised I cannot tell why this basic algebra, what guarantee such happens?

Appreciate any comments

  • $\begingroup$ Could you please attach any relevant screenshots or code parts? $\endgroup$
    – Spätzle
    Oct 21, 2021 at 8:18

1 Answer 1


Simply plug in $x_i = 3$ and $z_i = 5$ in the new regression. You will see that $\hat y_i^\ast = \hat\alpha^\ast$. The new regression simply shifts the data. The idea of this approach is that any statistical software will report standard errors for your estimate of $\alpha$, so you can obtain standard errors of the prediction.

Note that in the original regression we have that $\hat y_i = \hat\alpha + 3\hat\beta + 5\hat\gamma$. As the data is shifted, we have in the new regression (for $x,z=0$) that $\hat y_i^\ast = \hat\alpha^\ast - 3 \hat\beta^\ast - 5\hat\gamma^\ast$.

Let $\mathbf A$ be given by $$\mathbf A = \begin{bmatrix} 1 & -3 & -5 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}.$$ When multiplied from the left with another matrix, $\mathbf A$ multiplies the first column of the other matrix with 3 and 5 and subtracts it from the second and third column, respectively. Note that $\mathbf A^{-1}\mathbf A = \mathbf I_3$ as $$\mathbf A^{-1} = \begin{bmatrix} 1 & 3 & 5 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}.$$ Let $\mathbf X$ be the matrix of explanatory variables and $\mathbf y$ the vector of dependent variables, i.e. $$ \mathbf X = \begin{bmatrix} 1 & x_1 & z_1 \\ 1 & x_2 & z_2 \\ \vdots & \vdots & \vdots \\ 1 & x_n & z_n \end{bmatrix}\qquad\text{and}\qquad \mathbf y = \begin{bmatrix} y_1 \\ y_2 \\ \vdots \\ y_n\end{bmatrix}.$$ The OLSE in the first regression is given by $$\boldsymbol{\hat\theta} =(\mathbf X'\mathbf X)^{-1}(\mathbf X'\mathbf y).$$ Let $\hat y = ((\mathbf A^{-1})'\mathbf e_1)\cdot\boldsymbol{\hat\theta}$, where $\mathbf e_1$ is the first canonical basis vector in $\mathbb R^3$, i.e. $\mathbf e_1 = \begin{bmatrix} 1 & 0 & 0 \end{bmatrix}'$. Thus, $(\mathbf A^{-1})'\mathbf e_1$ is first row of $\mathbf A^{-1}$ (as column vector). Recall that we constructed $\mathbf A$ according to the values for which we want the prediction. The OLSE in the second model is given by $$\begin{align*}\boldsymbol{\hat\vartheta} &= ((\mathbf X\mathbf A)'(\mathbf X\mathbf A))^{-1}(\mathbf X\mathbf A)'\mathbf y \\&= \mathbf A^{-1}(\mathbf X'\mathbf X)^{-1}(\mathbf A')^{-1}\mathbf A'\mathbf X'\mathbf y \\&= \mathbf A^{-1}(\mathbf X'\mathbf X)^{-1}(\mathbf X'\mathbf y) \\&= \mathbf A^{-1}\boldsymbol{\hat\theta}.\end{align*}$$ Now observe that $$\hat y = (\mathbf A^{-1})'\mathbf e_1\cdot\boldsymbol{\hat\theta} = \mathbf e_1'\mathbf A^{-1}\boldsymbol{\hat\theta} = \mathbf e_1'\boldsymbol{\hat\vartheta}.$$ Recall that, by definition, the first element of $\boldsymbol{\hat\vartheta}$ is $\hat\alpha^\ast$ and that $\mathbf e_1$ extracts the first element of this vector.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.