Home

gnls

Generalized nonlinear least squares (GNLS) is a statistical modeling framework used to fit nonlinear relationships when the observed errors exhibit non-constant variance or correlation. It extends traditional nonlinear least squares by allowing a specified variance–covariance structure for the residuals, rather than assuming independent, homoscedastic errors. This makes GNLS well suited for data where variance changes with the level of the fitted values or with other covariates, and for data where observations are correlated, such as repeated measures or time series.

In a GNLS model, the mean response is modeled by a nonlinear function of parameters, often written

GNLS is commonly used in fields with complex error patterns, including ecology, pharmacokinetics, and environmental science,

as
f(x,
beta),
where
beta
denotes
the
parameter
vector.
The
residuals
are
assumed
to
have
a
variance-covariance
matrix
that
is
specified
through
a
variance
function
and
a
correlation
structure.
The
estimation
proceeds
by
generalized
least
squares,
typically
via
iterative
reweighting
or
maximum
likelihood
approaches,
updating
both
the
mean
parameters
and,
when
desired,
the
variance
and
correlation
components.
Software
implementations
usually
provide
options
to
select
different
variance
functions
(to
capture
heteroscedasticity)
and
correlation
structures
(to
capture
autocorrelation),
along
with
choices
for
estimation
methods
such
as
ML
or
REML.
as
well
as
in
longitudinal
or
repeated-measures
studies
where
simple
nonlinear
regression
would
be
inappropriate
due
to
heteroscedasticity
or
correlation
among
observations.
It
is
implemented
in
several
statistical
environments,
with
R’s
nlme
package
providing
the
gnls
function
as
a
prominent
example.
See
also
nonlinear
least
squares,
generalized
least
squares,
and
variance
function
modeling.