statsmodels.genmod.families.family.Gamma.resid_anscombe¶
- Gamma.resid_anscombe(endog, mu, var_weights=1.0, scale=1.0)[source]¶
The Anscombe residuals
- Parameters:
endog (ndarray) – The endogenous response variable
mu (ndarray) – The inverse of the link function at the linear predicted values.
var_weights (array_like) – 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 – The Anscombe residuals for the Gamma family defined below
- Return type:
ndarray
Notes
\[resid\_anscombe_i = 3 * (endog_i^{1/3} - \mu_i^{1/3}) / \mu_i^{1/3} / \sqrt{scale} * \sqrt(var\_weights)\]