Nonlinear Generalized Least Squares (NGLS)

Econometrics
Introduced by
Gallant (1975); extended by Davidson & MacKinnon
Year
1975
Type
Nonlinear estimator
Family
Econometrics / time series

What does it do?

Nonlinear Generalized Least Squares extends the classical GLS framework to regression models where the mean function is nonlinear in the parameters.

It accounts for non-spherical errors, such as heteroscedasticity or autocorrelation, by pre-weighting the nonlinear objective with an error covariance matrix. When the mean function and the error covariance are correctly specified, NGLS can be consistent and asymptotically more efficient than nonlinear least squares. When the covariance matrix is estimated, these properties depend on the first-stage estimate and are most reliable in large samples.

The intuition behind the method

Think of OLS applied to a nonlinear model as fitting a curve by minimising plain sum of squared gaps. If the gaps are larger for some observations than others (heteroscedasticity) or correlated over time (autocorrelation), those noisy observations unfairly pull the curve. NGLS down-weights unreliable observations using an estimated error structure, so the curve fit is guided more by the observations that carry genuine information. The procedure is iterative: fit, estimate the error structure, re-weight, and fit again until convergence.

History

The extension of GLS to nonlinear mean functions is treated at length in A. Ronald Gallant's 1987 monograph Nonlinear Statistical Models, which sets out the asymptotic theory of these estimators under regularity conditions. Davidson and MacKinnon's Econometric Theory and Methods treats least squares, the method of moments and GMM within a unified framework.

When to use it

Use Nonlinear GLS when the relationship between the outcome and predictors is genuinely nonlinear in the parameters AND the errors are non-spherical (heteroscedastic or autocorrelated). It is especially suited to time-series models (e.g., exponential growth, logistics curves) with AR or ARCH errors, or to cross-sectional models where error variance varies systematically with covariates. Do NOT use it when the mean function is actually linear — plain GLS is simpler and equivalent. Avoid NGLS when the sample is small (estimation of Ω is imprecise), when the error model is misspecified (resulting in an inconsistent Ω̂ that distorts inference), or when the nonlinear functional form has not been justified by theory, as misspecification in f(x, β) can dominate the efficiency gain.

Limitations and considerations

  • Requires correct specification of both the mean function f(x, β) and the error covariance structure Ω; misspecification in either damages consistency.
  • Estimation of Ω from a first-stage NLS residuals introduces additional estimation uncertainty, complicating finite-sample inference.
  • Iterative numerical optimisation may fail to converge or converge to a local minimum if the objective is non-convex or starting values are poor.
  • Computationally more demanding than NLS or linear GLS, especially for large datasets with complex Ω structures.
  • Asymptotic theory may be a poor guide in small samples where Ω̂ is imprecise.

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

Strengths

  • When the errors are non-spherical and both f(x, β) and Ω are correctly specified, the weighted objective is asymptotically efficient relative to NLS, which ignores Ω.
  • Weighting by Ω̂⁻¹ means the asymptotic covariance (FᵀΩ⁻¹F)⁻¹ reflects the error structure, whereas unweighted NLS inference assumes spherical errors and is not appropriate when heteroscedasticity or autocorrelation is present.
  • Setting Ω = I recovers the unweighted NLS objective, so NGLS nests NLS within one framework.
  • The choice of Ω can accommodate heteroscedastic, autocorrelated or ARCH-type errors, provided that choice is justified for the data at hand.
  • The transformed problem is solved with the same iterative nonlinear solvers used for NLS (Gauss-Newton, Levenberg-Marquardt).

Applications

  • Fitting nonlinear growth or decay curves, such as exponential or logistic forms, to time-series data with autocorrelated errors.
  • Nonlinear regression where the error variance changes systematically with a covariate.
  • Nonlinear trend models in which the conditional variance follows an ARCH-type process.
  • Systems of equations with cross-equation nonlinear restrictions, for example reduced-form coefficients of a simultaneous-equations model whose parameters satisfy nonlinear restrictions. The system is written as a nonlinear seemingly unrelated regressions model, with the equations stacked under a joint error covariance matrix and estimated by nonlinear GLS. Restrictions can be imposed by substitution that eliminates parameters before estimation.

How it works

How it works

1

Specify the nonlinear conditional mean function f(x, β) and acknowledge that the errors ε have covariance σ²Ω rather than σ²I. The matrix Ω captures heteroscedasticity or autocorrelation in the residuals.

Formula
y_i = f(x_i,\beta) + \varepsilon_i,\quad \operatorname{E}[\varepsilon\varepsilon^{\top}]=\sigma^2\Omega
2

In the feasible (FNGLS) version, Ω is unknown. An initial nonlinear least squares (NLS) pass is used to obtain residuals, from which a parametric or nonparametric estimate of Ω is constructed — for example, a GARCH model for conditional heteroscedasticity or an AR model for serial correlation.

3

Pre-multiply the model by Ω⁻¹/² to produce a transformed system with approximately spherical errors. This converts the NGLS problem into a transformed NLS problem on the re-weighted data.

Formula
\tilde{y} = \Omega^{-1/2}y,\quad \tilde{f}(\beta)=\Omega^{-1/2}f(x,\beta)
4

Minimise the weighted sum of squared residuals [y − f(x, β)]ᵀ Ω̂⁻¹ [y − f(x, β)] with respect to β. Optimisation typically requires iterative numerical methods such as Gauss-Newton or Levenberg-Marquardt because the gradient of f with respect to β is nonlinear.

Formula
\hat{\beta}_{\mathrm{NGLS}} = \arg\min_{\beta}\,[y - f(x,\beta)]^{\top}\hat{\Omega}^{-1}[y - f(x,\beta)]
5

Iterate between updating β given Ω̂ and updating Ω̂ given β until both converge. Under regularity conditions the estimator is consistent and asymptotically normal with covariance (FᵀΩ⁻¹F)⁻¹, where F is the Jacobian of f evaluated at β̂.

Common pitfalls

  • Using an ad hoc or misspecified error model for Ω. A wrong covariance structure can make NGLS less efficient than plain NLS.
  • Poor starting values for the nonlinear optimiser, which can cause non-convergence or convergence to a local rather than global minimum.
  • Failing to test the nonlinear functional form. If f(x, β) is misspecified, the weighting does not correct the bias and can make inference misleading.
  • Treating the first-stage estimate Ω̂ as known. Its estimation error is ignored by naive standard errors, and the asymptotic normality that supports the reported standard errors may require a large n before it is a useful approximation.
  • Assuming the weighting removes endogeneity. If regressors are correlated with the errors, NGLS does not fix this, and instrumental methods such as GMM (listed in related) are needed.
  • Applying NGLS to autoregressive-error models with lagged dependent variables or other predetermined (not strictly exogenous) regressors. The Ω^(-1/2) transformation then correlates the transformed regressors with the transformed errors, so the estimator can be inconsistent even when the error model is correct. Check exogeneity before applying the transformation.

Frequently asked questions

How does NGLS differ from NLS?

NLS minimises the unweighted sum of squared residuals and is consistent but not efficient when errors are non-spherical. NGLS additionally weights the objective by Ω⁻¹, exploiting the error covariance structure to achieve asymptotic efficiency — the same gain that GLS has over OLS in the linear case.

What happens if I mis-specify the covariance structure Ω?

A misspecified Ω can make NGLS inconsistent or less efficient than NLS. If you are uncertain about the form of Ω, consider using robust (sandwich) standard errors after NLS, or GMM with a flexible weighting matrix, rather than committing to a potentially wrong parametric Ω.

How do I choose starting values for the nonlinear optimiser?

Grid search, profile likelihood plots, or theoretical guidance from economic or physical models are common strategies. Running NLS first from several starting points and using the best NLS estimates as the NGLS starting point is a practical approach.

Is NGLS the same as Feasible GLS for nonlinear models?

Yes — Feasible NGLS (FNGLS) is the operational version where Ω is estimated in a first stage. True NGLS with known Ω is a theoretical benchmark; in practice one always uses FNGLS.

When should I use GMM instead of NGLS?

When regressors are endogenous, error moments beyond the second are informative, or the covariance structure is difficult to parametrise, GMM is more general. NGLS is preferable when the model is fully specified (exogenous regressors, known error family) and computational simplicity matters.

Related methods

Sources

  1. Gallant, A. R. (1987). Nonlinear Statistical Models. Wiley.

    ISBN: 978-0471802600
  2. Davidson, R., & MacKinnon, J. G. (2004). Econometric Theory and Methods. Oxford University Press.

    Open publication reference
  3. Econometric Analysis (5th Edition) Solutions Manual, pp. 76–77