ArticleslgStudy

biology

Generalized least squares

Generalized least squares is a biology topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Generalized least squares rather than just read about it. In short: 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.

Key takeaways

  • Generalized least squares belongs to biology; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Generalized least squares to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Generalized least squares from memory before moving on to harder problems.

Reference excerpt

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 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 Ω^, 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.

Worked examples

Example 1 — a first encounter with Generalized least squares

Start with the simplest possible case. Write down what Generalized least squares claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In biology, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Generalized least squares before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Generalized least squares ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Generalized least squares

In research
Generalized least squares appears in biology research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Generalized least squares in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Generalized least squares is common in secondary-school and first-year university syllabi. It links to neighbouring topics Estimation methods, Least squares, Regression with time series structure, so understanding it makes those chapters shorter.
In everyday life
Look for Generalized least squares outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Generalized least squares” →

How to study Generalized least squares in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Generalized least squares means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Generalized least squares out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Generalized least squares in simple terms?

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.

Why does Generalized least squares matter?

Because it connects several biology ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Generalized least squares?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Generalized least squares.

Tags

  • Estimation methods
  • Least squares
  • Regression with time series structure

Keep exploring