statsmodels.genmod.families.family.NegativeBinomial.resid_anscombe¶
-
NegativeBinomial.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_weightsarray_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.
- endog
- Returns:¶
- resid_anscombe
ndarray
The Anscombe residuals as defined below.
- resid_anscombe
Notes
Anscombe residuals for Negative Binomial are the same as for Binomial upon setting
. Due to the negative value of the representation with the hypergeometric function is advantageousNote that for the (unregularized) Beta function, one has