# the difference between $\hat{e}^2_i$ and $\sigma^2_i$

What is the difference between $\hat{e}^2_i$ and $\sigma^2_i$?

In regression, we assume that $var(e_i)=E(e_i^2)=var(y_i)=\sigma_i^2$.

Does this imply that $\sigma_i^2$(the sample variance) is equal to $\hat{e}_i^2$?

When we calculate FGLS (feasible generalized least squres), we consider $\ln(\hat{e}_i^2)=\ln(\sigma_i^2)+v_i$, where $v_i$ is just the error term. This seems that we distinguish $\sigma_i^2$ from $\hat{e}_i^2$.

But, when we calculate the robust robust standard error, we simply repalce $\sigma_i^2$ with $\hat{e}_i^2$. Thus, theses two are considered to be equal.

I am confused with these two terms. Can anybody clarify this?

Certainly the true variance is not equal to the squared residual.

In the case or robust standard errors, it has been proven that if we use $\hat{e}^2_i$ we obtain a consistent estimator of the variance-covariance matrix as a whole, even though $\hat{e}^2_i$ is not equal to $\sigma^2_i$ and even though each single $\hat{e}^2_i$ does not converge in probability to $\sigma^2_i$ (it converges to the true squared error, which is a random variable).

The fundamental reason for this result is that

$$E(\hat{e}^2_i) \to_{n \to \infty} E(e^2_i) =\sigma^2_i$$

So the OP's phrase

When we calculate the robust robust standard error, we simply repalce $\sigma^2_i$ with $\hat{e}^2_i$. Thus, theses two are considered to be equal.

is simply wrong.