Specifying sigma in generalized least squares

265 Views Asked by At

I am learning linear regression techniques and understand that when the assumption of homoscedasticity of error terms (residuals) are violated we prefer generalized least squares (GLS). One of the methods of GLS requires us to first run an OLS and estimate the serial correlation in residuals. We later use this to specify the sigma in GLS as explained in the example here.

My question is why don't we substitute the covariance matrix of de-meaned dependent variables as sigma into the formula instead? What is the difference?

Please help.