Nonlinear Weighted Least Squares (NWLS)
Nonlinear Weighted Least Squares · Also known as: NWLS, nonlinear weighted least squares, weighted nonlinear regression, heteroscedasticity-corrected nonlinear regression
Nonlinear Weighted Least Squares combines the flexibility of nonlinear regression with the variance-stabilizing power of observation-level weights. It minimises a weighted sum of squared residuals around a user-specified nonlinear mean function, making it the method of choice when the relationship is inherently nonlinear and error variance differs across observations.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use NWLS when the mean function is genuinely nonlinear (e.g. exponential growth, Michaelis-Menten kinetics, logistic dose-response) and you have good reason to believe error variance is not constant — for instance, variance proportional to the mean or to a covariate. It is especially useful in pharmacokinetics, agricultural dose-response, and economic production functions. Do not use NWLS when the relationship is linear (OLS or WLS suffices), when weights are entirely unknown and cannot be plausibly estimated (use robust sandwich errors instead), or when the sample is very small (< 20) because iterative convergence and weight estimation both require adequate data.
Strengths & limitations
- Handles nonlinear mean structures that WLS or OLS cannot accommodate without data transformation.
- Corrects for heteroscedasticity, producing efficient estimates and valid standard errors under the assumed weight structure.
- Allows the analyst to incorporate prior knowledge about the variance function (e.g. proportional error in assay data).
- Yields consistent estimates even when the weight model is only approximately correct, as long as the mean function is correctly specified.
- Widely implemented in R (nls with weights), Stata (nl), and SAS (PROC NLIN).
- Requires the analyst to specify both a nonlinear mean function and a plausible weight (variance) function — two modelling choices instead of one.
- Iterative optimisation can converge to local minima; starting values and convergence diagnostics matter.
- Efficiency gains over unweighted NLS depend on how accurately the weights capture the true variance structure.
- Large-sample (asymptotic) standard errors may be unreliable in small samples.
Frequently asked
How is NWLS different from nonlinear GLS?
NWLS is a special case of nonlinear GLS in which the error covariance matrix is diagonal — errors are uncorrelated but have unequal variances captured by the weights. Full nonlinear GLS also models off-diagonal covariance (e.g. autocorrelated errors in time series), which requires additional structure on the covariance matrix.
What if I do not know the true weights?
A common practice is a two-step feasible approach: fit an unweighted NLS first, regress the squared residuals on candidate variance predictors to estimate the variance function, then re-fit using the reciprocal of the fitted variances as weights. The estimated weights introduce additional uncertainty, but the procedure is consistent under mild conditions.
How do I choose starting values?
Good starting values are critical. Use domain knowledge (e.g. rough estimates of the plateau and half-saturation constant for a Michaelis-Menten model), grid search over plausible parameter ranges, or a linearising transformation to get OLS-based initial guesses before passing them to the NWLS routine.
Can NWLS be used with panel data?
Yes, provided the nonlinear mean function applies within each cross-sectional unit and you can specify unit-level or observation-level weights capturing the error variance. For panels with both heteroscedasticity and serial correlation, a nonlinear feasible GLS approach accounting for both features is more appropriate.
Is NWLS the same as iteratively reweighted least squares (IRLS)?
Not exactly. IRLS is an algorithmic strategy used to fit various models (including GLMs) by repeatedly updating weights and refitting. NWLS can be implemented via IRLS, but the term specifically describes a regression model where fixed or estimated variance-stabilising weights correct for heteroscedasticity around a nonlinear mean function.
Sources
- Greene, W. H. (2018). Econometric Analysis (8th ed.). Pearson Education. ISBN: 978-0134461366
- Bates, D. M., & Watts, D. G. (1988). Nonlinear Regression Analysis and Its Applications. John Wiley & Sons. ISBN: 978-0471816430
How to cite this page
ScholarGate. (2026, June 3). Nonlinear Weighted Least Squares. ScholarGate. https://scholargate.app/en/econometrics/nonlinear-wls
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Generalized Least SquaresStatistics↔ compare
- OLS RegressionEconometrics↔ compare
- Weighted Least SquaresStatistics↔ compare