statsmodels.genmod.families.family.Gaussian.resid_anscombe#
- Gaussian.resid_anscombe(endog, mu, var_weights=1.0, scale=1.0)[source]#
The Anscombe residuals
- Parameters:
- endogarray_like
The endogenous response variable
- muarray_like
The inverse of the link function at the linear predicted values.
- var_weightsarray_like,
optional 1d array of variance (analytic) weights. The default is 1.
- scale
float,optional An optional argument to divide the residuals by sqrt(scale). The default is 1.
- Returns:
- resid_anscombe
ndarray The Anscombe residuals for the Gaussian family defined below
- resid_anscombe
Notes
For the Gaussian distribution, Anscombe residuals are the same as deviance residuals.
\[resid\_anscombe_i = (Y_i - \mu_i) / \sqrt{scale} * \sqrt(var\_weights)\]