'The deviance residuals
Parameters
endog : array
The endogenous response variable
mu : array
The inverse of the link function at the linear predicted values.
scale : float, optional
An optional argument to divide the residuals by sqrt(scale).
The default is 1.
Returns
Deviance residuals.
Notes
The deviance residuals are defined by the contribution D_i of
observation i to the deviance as
.. math::
resid\_dev_i = sign(y_i-\mu_i) \sqrt{D_i}'

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

    raise NotImplementedError
