resid_dev(endog, mu, scale=1.0)¶
Binomial deviance residuals
endog : array-like
Endogenous response variable
mu : array-like
Fitted mean response variable
scale : float, optional
An optional argument to divide the residuals by scale. The default is 1.
resid_dev : array
Deviance residuals as defined below
If the endogenous variable is binary:
where is an indicator function that evalueates to 1 if . and is an indicator function that evaluates to 1 if .
If the endogenous variable is binomial:
where and are as defined in Binomial.initialize.