statsmodels.genmod.families.family.Family.resid_anscombe

method

Family.resid_anscombe(endog, mu, var_weights=1.0, scale=1.0)[source]

The Anscombe residuals

Parameters
endogarray

The endogenous response variable

muarray

The inverse of the link function at the linear predicted values.

var_weightsarray-like

1d array of variance (analytic) weights. The default is 1.

scalefloat, optional

An optional argument to divide the residuals by sqrt(scale). The default is 1.

See also

statsmodels.genmod.families.family.Family

resid_anscombe for the individual families for more information

Notes

Anscombe residuals are defined by

\[resid\_anscombe_i = \frac{A(y)-A(\mu)}{A'(\mu)\sqrt{Var[\mu]}} * \sqrt(var\_weights)\]

where \(A'(y)=v(y)^{-\frac{1}{3}}\) and \(v(\mu)\) is the variance function \(Var[y]=\frac{\phi}{w}v(mu)\). The transformation \(A(y)\) makes the residuals more normal distributed.