# Showing the unbiased estimator of variance for GLS estimator

I have the following regression

$$y = X\beta +u$$

where $$y$$ and $$u$$ are $$(n\times 1)$$ and $$X$$ is a fixed $$(n \times k)$$ matrix with full column rank and $$\beta$$ is an unknown $$(k\times 1)$$ vector of parameters.

$$E(u)=0$$ and $$var(u)=\sigma^2 V$$ with $$(n\times n)$$ symmetric and positive definite non-diagonal matrix $$V$$.

It is defined as $$s^2= e_{GLS}' V^{-1} e_{GLS} /(n-k)$$ with $$e_{GLS}=y-X\hat{\beta}_{GLS}$$

I want to show that $$E(s^2)= \sigma^2$$

What I did

By Cholesky decomposition, there is a $$(n\times n)$$ non-singular matrix $$P$$ such that $$V^{-1} = P'P$$

I transform the regression $$y = X\beta +u$$ as

$$Py = PX\beta +Pu$$

$$y^* = X^* \beta +u^*$$

In this transformed model, there is no heteroskedasticity problem since

$$var(u^*)=var(Pu)=\sigma^2$$

Next, I re-consider the transformed model $$y^* = X^* \beta +u^*$$

by the OLS estimation, I will obtain that

$$y^* = X^* \hat{\beta_{GLS}} +e^*$$

where $$e^*$$ is OLS residuals from this transformed model.

$$e^* =y^* - X^* \hat{\beta_{GLS}} = Py - PX \hat{\beta_{GLS}}$$

$$e^* = P(y - X \hat{\beta_{GLS}})= P e_{GLS}$$

Then,

$$s^2= \frac{e_{GLS}' V^{-1} e_{GLS}}{(n-k)}=\frac{{e^* }' e^*}{(n-k)}$$

I re-consider the regression

$$y^* = X^* \hat{\beta_{GLS}} +e^*$$

I multiply with the projection matrix $$M_{X^* } = I - X^* ({X^* }' X^* ){X^* }'$$

$$M_{X^* } y^* = M_{X^* } X^* \hat{\beta_{GLS}} + M_{X^* } e^*$$

$$e^* = M_{X^* } y^* = M_{X^* } [X^* \beta + u^*] = M_{X^* }u^*$$

So, $${e^*}' e^* = {u^*}' M_{X^* } u^*$$

Then,

$$E(s^* ) = E(\frac{{u^* }' M_{X^* } u^* }{n-k}) = \frac{E({u^* }' M_{X^* } u^* ) }{n-k}$$

Rules:

  (i) tr(A) = A for scalar. (tr = trace)

 (ii) E(tr(A)) = tr(E(A))

 (iii) tr(ABC) = tr(ACB)= ...


By using these rules, and since $${u^* }' M_{X^* } u^*$$ is scalar,

$$E({u^* }' M_{X^* } u^* ) = tr ( E({u^* }' M_{X^* } u^* )) = E(tr({u^* }' M_{X^* } u^* )) = E(tr({u^* }'u^* M_{X^* } ))$$ $$= tr(E({u^* }'u^* ) M_{X^* } ) = tr(\sigma^2 M_{X^* } ) = \sigma^2 tr (M_{X^* }) = \sigma^2 (n-k)$$

So,

$$E(s^* ) = \frac{E({u^* }' M_{X^* } u^* ) }{n-k} = \frac{\sigma^2 (n-k) }{n-k}= \sigma^2$$

What I did is that. But, I am not sure because it seems very complicated and a bit fabrication and incorrect. Please discuss how can I show that $$E(s^2)=\sigma^2$$? How can I correct and simplify my solution?

How can you solve this question in a shortest and logical way?