3.5.5.2.1.2.1.2. statsmodels.genmod.families.family.Family.deviance¶
-
Family.
deviance
(endog, mu, scale=1.0)[source]¶ Deviance of (endog,mu) pair.
Deviance is usually defined as twice the loglikelihood ratio.
Parameters: endog : array-like
The endogenous response variable
mu : array-like
The inverse of the link function at the linear predicted values.
scale : float, optional
An optional scale argument
Returns: Deviance : array
The value of deviance function defined below.
Notes
Deviance is defined
\[\sum_i(2 loglike(y_i, y_i) - 2 * loglike(y_i, mu_i)) / scale\]where y is the endogenous variable. The deviance functions are analytically defined for each family.