Generalized least squares

Short description: Statistical estimation technique

Not to be confused with Generalized linear model.

Part of a series on

Regression analysis
Models

* Linear regression
* Simple regression
* Polynomial regression
* General linear model

* Generalized linear model
* Discrete choice
* Binomial regression
* Binary regression
* Logistic regression
* Multinomial logit
* Mixed logit
* Probit
* Multinomial probit
* Ordered logit
* Ordered probit
* Poisson

* Multilevel model
* Fixed effects
* Random effects
* Linear mixed-effects model
* Nonlinear mixed-effects model

* Nonlinear regression
* Nonparametric
* Semiparametric
* Robust
* Quantile
* Isotonic
* Principal components
* Least angle
* Local
* Segmented

* Errors-in-variables

Estimation

* Least squares
* Linear
* Non-linear

* Ordinary
* Weighted
* Generalized

* Partial
* Total
* Non-negative
* Ridge regression
* Regularized

* Least absolute deviations
* Iteratively reweighted
* Bayesian
* Bayesian multivariate

Background

* Regression validation
* Mean and predicted response
* Errors and residuals
* Goodness of fit
* Studentized residual
* Gauss–Markov theorem

* v
* t
* e

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.[1]

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.

## Contents

* 1 Method
* 1.1 Properties
* 2 Weighted least squares
* 3 Derivation by maximum likelihood estimation
* 4 Feasible generalized least squares
* 5 See also
* 6 References
* 7 Further reading

## 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

Main article: 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.[2]

## 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 islog⁡p(𝐛|ε)=log⁡p(ε|𝐛)+⋯=−12εTΩ−1ε+⋯,where the hidden terms are those that do not depend on 𝐛, and log⁡p(ε|𝐛) 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𝐛log⁡p(𝐛|ε)=argmax𝐛log⁡p(ε|𝐛),

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 Ω^,[3] using an implementable version of GLS known as the feasible generalized least squares (FGLS) estimator.

In FGLS, modeling proceeds in two stages:

1. The model is estimated by OLS or another consistent (but inefficient) estimator, and the residuals are used to build a consistent estimator of the errors covariance matrix (to do so, one often needs to examine the model adding additional constraints; for example, if the errors follow a time series process, a statistician generally needs some theoretical assumptions on this process to ensure that a consistent estimator is available).
2. Then, using the consistent estimator of the covariance matrix of the errors, one can implement GLS ideas.

Whereas GLS is more efficient than OLS under heteroscedasticity (also spelled heteroskedasticity) or autocorrelation, this is not true for FGLS. The feasible estimator is asymptotically more efficient (provided the errors covariance matrix is consistently estimated), but for a small to medium-sized sample, it can be actually less efficient than OLS. This is why some authors prefer to use OLS and reformulate their inferences by simply considering an alternative estimator for the variance of the estimator robust to heteroscedasticity or serial autocorrelation. However, for large samples, FGLS is preferred over OLS under heteroskedasticity or serial correlation.[3][4] A cautionary note is that the FGLS estimator is not always consistent. One case in which FGLS might be inconsistent is if there are individual-specific fixed effects.[5]

In general, this estimator has different properties than GLS. For large samples (i.e., asymptotically), all properties are (under appropriate conditions) common with respect to GLS, but for finite samples, the properties of FGLS estimators are unknown: they vary dramatically with each particular model, and as a general rule, their exact distributions cannot be derived analytically. For finite samples, FGLS may be less efficient than OLS in some cases. Thus, while GLS can be made feasible, it is not always wise to apply this method when the sample is small. A method used to improve the accuracy of the estimators in finite samples is to iterate; that is, to take the residuals from FGLS to update the errors' covariance estimator and then update the FGLS estimation, applying the same idea iteratively until the estimators vary less than some tolerance. However, this method does not necessarily improve the efficiency of the estimator very much if the original sample was small.

A reasonable option when samples are not too large is to apply OLS but discard the classical variance estimator

σ2*(XTX)−1

(which is inconsistent in this framework) and instead use a HAC (Heteroskedasticity and Autocorrelation Consistent) estimator. In the context of autocorrelation, the Newey–West estimator can be used, and in heteroscedastic contexts, the Eicker–White estimator can be used instead. This approach is much safer, and it is the appropriate path to take unless the sample is large, where "large" is sometimes a slippery issue (e.g., if the error distribution is asymmetric the required sample will be much larger).

The ordinary least squares (OLS) estimator is calculated by:

β^OLS=(XTX)−1XTy

and estimates of the residuals u^j=(Y−Xβ^OLS)j are constructed.

For simplicity, consider the model for heteroscedastic and non-autocorrelated errors. Assume that the variance-covariance matrix Ω of the error vector is diagonal, or equivalently that errors from distinct observations are uncorrelated. Then each diagonal entry may be estimated by the fitted residuals u^j so Ω^OLS may be constructed by:

Ω^OLS=diag⁡(σ^12,σ^22,…,σ^n2).

It is important to notice that the squared residuals cannot be used in the previous expression; an estimator of the errors' variances is needed. To do so, a parametric heteroskedasticity model or nonparametric estimator can be used.

Estimate βFGLS1 using Ω^OLS using[4] weighted least squares:

β^FGLS1=(XTΩ^OLS−1X)−1XTΩ^OLS−1y

The procedure can be iterated. The first iteration is given by:

u^FGLS1=Y−Xβ^FGLS1

Ω^FGLS1=diag⁡(σ^FGLS1,12,σ^FGLS1,22,…,σ^FGLS1,n2)

β^FGLS2=(XTΩ^FGLS1−1X)−1XTΩ^FGLS1−1y

This estimation of Ω^ can be iterated to convergence.

Under regularity conditions, the FGLS estimator (or the estimator of its iterations, if a finite number of iterations are conducted) is asymptotically distributed as:

n(β^FGLS−β) →d 𝒩(0,V)

where n is the sample size, and

V=p-lim⁡(XTΩ−1X/n)

where p-lim means limit in probability.

## See also

* Confidence region
* Effective degrees of freedom
* Prais–Winsten estimation
* Whitening transformation

## References

1. ↑ Aitken, A. C. (1935). "On Least Squares and Linear Combinations of Observations". Proceedings of the Royal Society of Edinburgh 55: 42–48. doi:10.1017/s0370164600014346.
2. ↑ Strutz, T. (2016). Data Fitting and Uncertainty (A practical introduction to weighted least squares and beyond). Springer Vieweg. ISBN 978-3-658-11455-8. , chapter 3
3. ↑ 3.0 3.1 Baltagi, B. H. (2008). Econometrics (4th ed.). New York: Springer.
4. ↑ 4.0 4.1 Greene, W. H. (2003). Econometric Analysis (5th ed.). Upper Saddle River, NJ: Prentice Hall.
5. ↑ Hansen, Christian B. (2007). "Generalized Least Squares Inference in Panel and Multilevel Models with Serial Correlation and Fixed Effects". Journal of Econometrics 140 (2): 670–694. doi:10.1016/j.jeconom.2006.07.011.

## Further reading

* Amemiya, Takeshi (1985). "Generalized Least Squares Theory". Advanced Econometrics. Harvard University Press. ISBN 0-674-00560-0. https://books.google.com/books?id=0bzGQE14CwEC&pg=PA181.
* Johnston, John (1972). "Generalized Least-squares". Econometric Methods (Second ed.). New York: McGraw-Hill. pp. 208–242. https://books.google.com/books?id=BZtvwZAGyV0C&pg=PA208.
* Kmenta, Jan (1986). "Generalized Linear Regression Model and Its Applications". Elements of Econometrics (Second ed.). New York: Macmillan. pp. 607–650. ISBN 0-472-10886-7. https://books.google.com/books?id=Bxq7AAAAIAAJ&pg=PA607.
* Beck, Nathaniel; Katz, Jonathan N. (September 1995). "What To Do (and Not to Do) with Time-Series Cross-Section Data" (in en). American Political Science Review 89 (3): 634–647. doi:10.2307/2082979. ISSN 1537-5943. https://www.cambridge.org/core/journals/american-political-science-review/article/abs/what-to-do-and-not-to-do-with-timeseries-crosssection-data/0E778B85AB008DAF8D13E0AC63505E37.

* v
* t
* e

Least squares and regression analysis

Computational statistics|

* Least squares
* Linear least squares
* Non-linear least squares
* Iteratively reweighted least squares

Correlation and dependence|

* Pearson product-moment correlation
* Rank correlation (Spearman's rho
* Kendall's tau)
* Partial correlation
* Confounding variable

Regression analysis|

* Ordinary least squares
* Partial least squares
* Total least squares
* Ridge regression

Regression as a
statistical model|

| Linear regression|

* Simple linear regression
* Ordinary least squares
* Generalized least squares
* Weighted least squares
* General linear model

|

Predictor structure|

* Polynomial regression
* Growth curve (statistics)
* Segmented regression
* Local regression

Non-standard|

* Nonlinear regression
* Nonparametric
* Semiparametric
* Robust
* Quantile
* Isotonic

Non-normal errors|

* Generalized linear model
* Binomial
* Poisson
* Logistic

Decomposition of variance|

* Analysis of variance
* Analysis of covariance
* Multivariate AOV

Model exploration|

* Stepwise regression
* Model selection
* Mallows's Cp
* AIC
* BIC
* Model specification
* Regression validation

Background|

* Mean and predicted response
* Gauss–Markov theorem
* Errors and residuals
* Goodness of fit
* Studentized residual
* Minimum mean-square error

Design of experiments|

* Response surface methodology
* Optimal design
* Bayesian design

Numerical approximation|

* Numerical analysis
* Approximation theory
* Numerical integration
* Gaussian quadrature
* Orthogonal polynomials
* Chebyshev polynomials
* Chebyshev nodes

Applications|

* Curve fitting
* Calibration curve
* Numerical smoothing and differentiation
* System identification
* Moving least squares

* Regression analysis category
* Statistics category
*   * Statistics outline
* Statistics topics

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Generalized least squares. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Generalized_least_squares&oldid=4158138"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template