In statistics, generalized least squares (GLS) is a method used to estimate the unknown parameters in a linear regression model. It is used when there is a non-zero amount of correlation between the residuals in the regression model. GLS is employed to improve statistical efficiency and reduce the risk of drawing erroneous inferences, as compared to conventional least squares and weighted least squares methods. It was first described by Alexander Aitken in 1935. It requires knowledge of the covariance matrix for the residuals. If this is unknown, estimating the covariance matrix gives the method of feasible generalized least squares (FGLS). However, FGLS provides fewer guarantees of improvement.
Method In standard linear regression models, one observes data {yi,xij}i=1,…,n,j=2,…,k on n statistical units with k − 1 predictor values and one response value each. The response values are placed in a vector,𝐲≡(y1⋮yn), and the predictor values are placed in the design matrix,𝐗≡(1x12x13⋯x1k1x22x23⋯x2k⋮⋮⋮⋱⋮1xn2xn3⋯xnk), where each row is a vector of the k predictor variables (including a constant) for the ith data point. The model assumes that the conditional mean of 𝐲 given 𝐗 to be a linear function of 𝐗 and that the conditional variance of the error term given 𝐗 is a known non-singular covariance matrix, 𝜴. That is,𝐲=𝐗𝜷+𝜺,E[𝜺∣𝐗]=0,Cov[𝜺∣𝐗]=𝜴, where 𝜷∈ℝk is a vector of unknown constants, called "regression coefficients", which are estimated from the data. If 𝐛 is a candidate estimate for 𝜷, then the residual vector for 𝐛 is 𝐲−𝐗𝐛. The generalized least squares method estimates 𝜷 by minimizing the squared Mahalanobis length of this residual vector:𝜷̂=argmin𝐛(𝐲−𝐗𝐛)T𝜴−1(𝐲−𝐗𝐛)=argmin𝐛𝐲T𝜴−1𝐲+(𝐗𝐛)T𝜴−1𝐗𝐛−𝐲T𝜴−1𝐗𝐛−(𝐗𝐛)T𝜴−1𝐲,which is equivalent to𝜷̂=argmin𝐛𝐲T𝜴−1𝐲+𝐛T𝐗T𝜴−1𝐗𝐛−2𝐛T𝐗T𝜴−1𝐲,which is a quadratic programming problem. The stationary point of the objective function occurs when2𝐗T𝜴−1𝐗𝐛−2𝐗T𝜴−1𝐲=0,so the estimator is𝜷̂=(𝐗T𝜴−1𝐗)−1𝐗T𝜴−1𝐲.The quantity 𝜴−1 is known as the precision matrix (or dispersion matrix), a generalization of the diagonal weight matrix.
Properties The GLS estimator is unbiased, consistent, efficient, and asymptotically normal withE[𝜷̂∣𝐗]=𝜷,andCov[𝜷̂∣𝐗]=(𝐗T𝜴−1𝐗)−1.GLS is equivalent to applying ordinary least squares (OLS) to a linearly transformed version of the data. This can be seen by factoring 𝜴=𝐂𝐂T using a method such as Cholesky decomposition. Left-multiplying both sides of 𝐲=𝐗𝜷+𝜺 by 𝐂−1 yields an equivalent linear model: 𝐲∗=𝐗∗𝜷+𝜺∗,where𝐲∗=𝐂−1𝐲,𝐗∗=𝐂−1𝐗,𝜺∗=𝐂−1𝜺.In this model, Var[𝜺∗∣𝐗]=𝐂−1𝜴(𝐂−1)T=𝐈, where 𝐈 is the identity matrix. Then, 𝜷 can be efficiently estimated by applying OLS to the transformed data, which requires minimizing the objective,(𝐲∗−𝐗∗𝜷)T(𝐲∗−𝐗∗𝜷)=(𝐲−𝐗𝐛)T𝜴−1(𝐲−𝐗𝐛). This transformation effectively standardizes the scale of and de-correlates the errors. When OLS is used on data with homoscedastic errors, the Gauss–Markov theorem applies, so the GLS estimate is the best linear unbiased estimator for 𝜷.
Weighted least squares
A special case of GLS, called weighted least squares (WLS), occurs when all the off-diagonal entries of Ω are 0. This situation arises when the variances of the observed values are unequal or when heteroscedasticity is present, but no correlations exist among the observed variances. The weight for unit i is proportional to the reciprocal of the variance of the response for unit i.
Derivation by maximum likelihood estimation Ordinary least squares can be interpreted as maximum likelihood estimation with the prior that the errors are independent and normally distributed with zero mean and common variance. In GLS, the prior is generalized to the case where errors may not be independent and may have differing variances. For given fit parameters 𝐛, the conditional probability density function of the errors are assumed to be:p(𝜺|𝐛)=1(2π)ndet𝜴exp(−12𝜺T𝜴−1𝜺). By Bayes' theorem,p(𝐛|𝜺)=p(𝜺|𝐛)p(𝐛)p(𝜺).In GLS, a uniform (improper) prior is taken for p(𝐛), and as p(𝜺) is a marginal distribution, it does not depend on 𝐛. Therefore the log-probability islogp(𝐛|𝜺)=logp(𝜺|𝐛)+⋯=−12𝜺T𝜴−1𝜺+⋯,where the hidden terms are those that do not depend on 𝐛, and logp(𝜺|𝐛) is the log-likelihood. The maximum a posteriori (MAP) estimate is then the maximum likelihood estimate (MLE), which is equivalent to the optimization problem from above,𝜷̂=argmax𝐛p(𝐛|𝜺)=argmax𝐛logp(𝐛|𝜺)=argmax𝐛logp(𝜺|𝐛), where the optimization problem has been re-written using the fact that the logarithm is a strictly increasing function and the property that the argument solving an optimization problem is independent of terms in the objective function which do not involve said terms. Substituting 𝐲−𝐗𝐛 for 𝜺, 𝜷̂=argmin𝐛12(𝐲−𝐗𝐛)T𝜴−1(𝐲−𝐗𝐛).
Feasible generalized least squares If the covariance of the errors Ω is unknown, one can get a consistent estimate of Ω, say Ω^, using an implementable version of GLS known as the feasible generalized least squares (FGLS) estimator. In FGLS, modeling proceeds in two stages:
… excerpt ends here. Continue reading the full article.