statsmodels.genmod.families.family.InverseGaussian.resid_dev¶
-
InverseGaussian.
resid_dev
(endog, mu, scale=1.0)[source]¶ Returns the deviance residuals for the inverse Gaussian family.
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
Returns: resid_dev : array
Deviance residuals as defined below
Notes
dev_resid = sign(endog-mu)*sqrt((endog-mu)**2/(endog*mu**2))