Binomial.resid_dev()
statsmodels.genmod.families.family.Binomial.resid_dev
-
Binomial.resid_dev(endog, mu, scale=1.0)
[source] -
Binomial deviance residuals
Parameters: 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.
Returns: resid_dev : array
Deviance residuals as defined below
Notes
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.
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.genmod.families.family.Binomial.resid_dev.html