'The Anscombe residuals for the inverse Gaussian distribution
Parameters
endog : array
Endogenous response variable
mu : array
Fitted mean response variable
scale : float, optional
An optional argument to divide the residuals by sqrt(scale).
The default is 1.
Returns
resid_anscombe : array
The Anscombe residuals for the inverse Gaussian distribution  as
defined below
Notes
.. math::
resid\_anscombe_i = \log(Y_i / \mu_i) / \sqrt{\mu_i * scale}'

def resid_anscombe(self, endog, mu, scale=1.0):

    return (np.log((endog / mu)) / np.sqrt((mu * scale)))
