Panel Generalized Least Squares (Panel GLS)

Econometrics
Introduced by
Aitken (1935); extended to panel data by Baltagi and others
Year
1935 / developed for panels 1980s–1990s
Type
Generalized linear regression
Family
Econometrics / time series

What does it do?

Panel GLS is a regression method for longitudinal data that models a non-spherical error covariance, allowing heteroscedasticity across units and serial correlation within units.

By weighting observations through the inverse of that covariance, it can give more efficient coefficient estimates than OLS when the error structure is correctly specified. When the covariance takes the error-components form, with a unit-specific effect inside the error term, the random-effects estimator is the special case that applies, and it is consistent only if those unit effects are uncorrelated with the regressors.

The intuition behind the method

In a panel, observations from the same unit over time are often correlated, and different units may have quite different error variances. OLS gives every observation equal weight and ignores both features. Its estimates remain unbiased under exogeneity, but they are inefficient and its conventional standard errors can be misleading. Panel GLS gives less weight to noisy observations and accounts for the correlation within each unit, which is equivalent to running OLS on transformed data in which that structure has been removed.

History

Aitken (1935) formalised Generalized Least Squares as the efficient extension of OLS to non-spherical errors. Its application to panel data, including error-components models and panel-corrected standard errors, is treated in Baltagi (2021) and Wooldridge (2010), which are the references for this page.

When to use it

Choose Panel GLS when the data are panel data and the error structure is known or can be estimated, for example unit-level heteroscedasticity or serial correlation within units. If you use the random-effects (error-components) form, the unit-specific effects should be plausibly uncorrelated with the regressors. The method is most useful with many units observed over a reasonable number of periods, so that the first-stage estimate of Omega is reasonably precise. Do not use the random-effects form when the Hausman test strongly rejects the random-effects assumption, because its estimates will then be inconsistent. If unit effects may correlate with the regressors, use Panel Fixed Effects. If the error structure is hard to specify, Panel OLS with robust standard errors is the more transparent choice.

Limitations and considerations

  • Efficiency gains depend entirely on correct specification of Omega; a misspecified error structure can yield estimates that perform worse than OLS.
  • FGLS replaces Omega with a residual-based estimate, which adds sampling error; this matters most when T is small.
  • Time-invariant confounders correlated with the regressors are not controlled for, so Panel Fixed Effects is needed for that purpose.
  • Cross-sectional dependence from common shocks is difficult to capture fully without additional structure, such as a factor model.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Gives efficient, minimum-variance estimates when the error covariance structure is correctly specified.
  • Handles heteroscedasticity across units and serial correlation within units in one framework.
  • Includes the random-effects estimator as a special case, so it connects directly to standard panel software.
  • Can be applied to unbalanced panels, where units contribute different numbers of time observations.
  • Standard errors come from the estimated error covariance rather than from an assumption of spherical errors.

Applications

  • Estimating production functions or demand equations across firms over time when error variances differ by firm size (heteroscedasticity across units).
  • Macroeconomic cross-country growth regressions where residuals show both country-level heteroscedasticity and serial correlation within countries.
  • Finance panel studies of stock returns or corporate financial ratios across companies and quarters, where error variances may differ across firms and serial correlation within firms may need to be modelled.
  • Health economics analyses of health outcomes across regions over time, where differing measurement precision across regions produces heteroscedasticity across units.
  • Labour economics wage panel studies where earnings volatility differs across workers, producing heteroscedasticity across individuals.

How it works

How it works

1

The model splits the error into a unit-specific component, which captures stable differences between units, and an idiosyncratic error that varies across units and over time. This two-part structure is the starting point for the error covariance used in the error-components form of Panel GLS. Whether the unit-specific component is uncorrelated with the regressors is a separate question, addressed by the Hausman test described under inference.

Formula
y_{it} = X_{it}\beta + u_{it}, \quad u_{it} = \alpha_i + \varepsilon_{it}
2

GLS requires the error covariance matrix Omega, which is not a scalar multiple of the identity here. Its off-diagonal elements can capture correlation within units over time, and under a broader specification also across units. Its diagonal elements can differ across units to reflect heteroscedasticity.

Formula
\Omega = E[uu^{\top}] \neq \sigma^2 I
3

Omega must be known, symmetric and positive definite, so that its inverse square root exists. Multiplying both sides of the model by that inverse square root makes the transformed errors spherical. The closed-form expression shown is algebraically equivalent to applying OLS to the transformed model. The estimator minimises the Omega-weighted sum of squared residuals and is the best linear unbiased estimator when Omega is known.

Formula
\hat{\beta}_{GLS} = (X^{\top}\Omega^{-1}X)^{-1}X^{\top}\Omega^{-1}y
4

Omega is rarely known, so Feasible GLS estimates it, typically from first-stage OLS residuals, and then applies the GLS formula with the estimated matrix. In the error-components case, the variance components are estimated from these residuals. Cross-sectional dependence requires a richer specification of Omega. Panel-corrected standard errors (PCSE) are a different approach: they adjust the standard errors of an OLS estimate for cross-sectional dependence rather than specifying Omega for GLS.

5

Standard errors, t-statistics and Wald tests are built from the estimated Omega, so their validity depends on how well that matrix is estimated. FGLS is consistent and asymptotically efficient only when the estimated Omega is consistent, which requires enough time periods relative to the number of units. With a short time dimension the estimate of Omega is imprecise, and standard errors and tests can be unreliable, so results from short panels should be read with caution. A Hausman test comparing the random-effects GLS estimates with fixed-effects estimates checks whether the random-effects assumption, that individual effects are uncorrelated with the regressors, is tenable.

Common pitfalls

  • Skipping the Hausman test: if unit effects correlate with the regressors, the GLS estimator is inconsistent and Panel Fixed Effects is required.
  • Assuming a simple variance-components structure when cross-sectional dependence is present; a richer specification of Omega, or PCSE applied to OLS, is then needed.
  • Running FGLS with a short time dimension: the estimated Omega is imprecise, which can leave FGLS no better than OLS and sometimes worse.
  • Interpreting GLS coefficients as causal without addressing endogeneity; GLS improves efficiency but does not solve omitted-variable bias.
  • Confusing Panel GLS with Panel WLS (fixed scalar weights per unit): GLS accounts for the full error covariance matrix, not just unit-level variance scalars.

Frequently asked questions

What is the difference between Panel GLS and Panel OLS?

Panel OLS minimises the unweighted sum of squared residuals and is efficient only when errors are homoscedastic and uncorrelated. Panel GLS weights the residuals by the inverse of the error covariance matrix, achieving efficiency when the covariance structure is correctly specified. When errors are in fact spherical, both estimators coincide.

When should I use Panel GLS versus Panel Fixed Effects?

Use Panel Fixed Effects when you suspect that unmeasured unit characteristics correlate with your regressors, since fixed effects removes this bias by differencing them out. The random-effects form of Panel GLS is more efficient if those unit effects are uncorrelated with the regressors. The Hausman test formally compares the two; a significant test statistic favours fixed effects.

What is FGLS and how does it differ from GLS?

GLS requires knowing the true error covariance matrix Omega, which is almost never available in practice. FGLS estimates Omega from first-stage OLS residuals and then applies the GLS formula. Its large-sample properties depend on that first-stage estimate of Omega being consistent, and it generally loses efficiency relative to true GLS, with the loss likely larger when the number of time periods is small.

Does Panel GLS solve endogeneity?

No. GLS improves estimation efficiency under non-spherical errors but does not address endogeneity caused by regressors that correlate with the error term. For endogeneity, you need instrumental variables (IV), GMM, or a natural experiment design.

How do I test whether Panel GLS or Panel OLS is more appropriate?

Run a Breusch-Pagan Lagrange multiplier test. Its null hypothesis is that the variance of the unit-specific random effects is zero, meaning there is no error-components structure. Rejection indicates that pooled OLS ignores this structure and that the error-components GLS estimator is preferred. Then run a Hausman test to decide whether the random-effects GLS or the fixed-effects estimator is consistent.

How do I interpret the Hausman test in this context?

Rejection favours fixed effects. Non-rejection is consistent with random effects, which are then efficient and consistent, but this conclusion holds only under the null that unit effects are uncorrelated with the regressors. The test relies on the random-effects estimator being efficient under that null.

Related methods

Sources

  1. Wooldridge, J. M. (2010). Econometric Analysis of Cross Section and Panel Data (2nd ed.). MIT Press.

    ISBN: 978-0262232586
  2. Baltagi, B. H. (2021). Econometric Analysis of Panel Data (6th ed.). Springer.

    ISBN: 978-3030538002