The GLS model is used in the presence of heteroscedasticity.
It generalizes the OLS (Ordinary Least Squares) model.
If we take the two variable linear regression
Y=β1+β2⋅X
Then we have the following formulas with OLS :
ˆβ2=∑i=ni=1xi⋅yi∑i=ni=1x2i
ˆβ1=¯¯¯Y−ˆβ2⋅¯¯¯X
with xi=Xi−¯¯¯X
and yi=Yi−¯¯¯Y
(¯¯¯X and ¯¯¯Y being the average values of the observations
(Xi,Yi)).
With GLS we have a weighted sum
ˆβ2=(∑wi)(∑wiXiYi)−(∑wiXi)(∑wiYi)(∑wi)(∑wiX2i)−(∑wiXi)2
with wi=1σ2i,
σ2i being the variances of the deviations ui=Yi−E(Y∣Xi)