References: Chapter 3. Gardini A. (2007).
 Working hypothesis
The assumptions of the generalized least squares estimator are:
- The linear model approximate the conditional expectation, i.e. .
 
- The conditional variance of the response variable  depends on the observation , i.e.  with  for all  with .
 
- The response variables  are correlated  for all  and .
 
Equivalently the formulation of the assumptions in terms of the stochastic component  are
- The residuals have mean zero, i.e.  for all  with .
 
- The conditional variance of the residuals depends on the observation , i.e.  with .
 
- The residuals are correlated, i.e.  for all  and .
 
In this case the variance covariance matrix  is defined as in Equation 14.15 and contains the variances and the covariances between the observations.
 Generalized least squares estimator
Proposition 16.1 ()
The generalized least squares estimator (GLS) is the function  that minimize the weighted sum of the squared residuals and return an estimate of the true parameter , i.e.   Formally, the GLS estimator is the solution of the following minimization problem, i.e.   Notably, if  and  are non-singular one obtain an analytic expression, i.e.
 
The solution is available if and only if  and  are non-singular. In practice the conditions are:
-  for the inversion of .
 
-  and condition 1. for the inversion of .
 
 
 
Proof. Let’s prove the optimal solution in Proposition 16.1. Developing the optimization problem in Equation 16.1:  In order to minimize the above expression, let’s compute the first derivative of  with respect to   Then, setting the above expression equal to zero and solving for  gives the solution, i.e. 
 
 
 
 
Proposition 16.2 ()
The GLS estimator in Equation 16.3 can be equivalently recovered as  where  with  and
-  is the diagonal matrix containing the eigenvalues of .
 
-  is the matrix with the eigenvectors of  that satisfies the following relation, i.e. .
 
Moreover, the matrix  satisfies the product: 
 
Proof. Let’s consider a linear model of the form  and let’s apply some (unknown) transformation matrix  by multiplying on both sides, i.e.  In this context, the conditional expectation of  reads  while it’s conditional variance  The next step is to identify a suitable transformation matrix  such that the conditional variance became equal to the identity matrix (Equation 31.3), i.e.   In this way it is possible to work under the Gauss-Markov assumptions (Theorem 15.1) obtaining an estimator with minimum variance.
A possible way to identify  is to decompose the variance-covariance matrix (Equation 14.15) as follows  where  is the diagonal matrix containing the eigenvalues and  is the matrix with the eigenvectors that satisfy the following relation, i.e. .
Thus, for the particular choice of , one obtain a conditional variance equal to 1 for all the observations, i.e.
 where  reads as in Equation 31.2. Finally, substituting  in the OLS formula (Equation 15.3) and using the result Equation 16.4 one obtain exactly the GLS estimator in Equation 16.3, i.e.  
 
 
 
 
 Properties GLS
Theorem 16.1 ()
Under the following working hypothesis, also called Aikten hypothesis, i.e. 
- .
 
- .
 
- , i.e. heteroskedastic and correlated errors.
 
-  is non-stochastic and independent from the errors  for all ’s.
 
The Generalized Least Square (GLS) estimator is  (Best Linear Unbiased Estimator), where “best” stands for the estimator with minimum variance in the class of linear unbiased estimators of .
 
Proposition 16.3 ()
1. Unbiased:  is correct and it’s conditional expectation is equal to true parameter in population, i.e.  
- Linear in the sense that it can be written as a linear combination of  and , i.e. , where  do not depend on , i.e. 
 
- Under the Aikten hypothesis (Theorem 16.1) it has minimum variance in the class of the unbiased linear estimators and it reads: 
 
 
Proof. The GLS estimator is correct. It’s expected value is computed from Equation 16.3 and substituting Equation 14.11, is equal to the true parameter in population, i.e.
Under the assumption of heteroskedastic and correlated observations the conditional variance of  follows similarly as for the OLS case (Equation 15.12) but with , i.e.  where Equation 15.10 become a special case of Equation 16.9 where .
 
 
 
 
Gardini A., Costa M., Cavaliere G. 2007. 
Econometria, Volume Primo. FrancoAngeli. 
https://cris.unibo.it/handle/11585/119378.