Family.deviance()

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.

doc_statsmodels
2017-01-18 16:08:45
Comments
Leave a Comment

Please login to continue.