Logo

statsmodels.genmod.families.family.Family.deviance

Family.deviance(Y, mu, scale=1.0)[source]

Deviance of (Y,mu) pair.

Deviance is usually defined as twice the loglikelihood ratio.

Parameters :

Y : 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 :

DEV : array

The value of deviance function defined below.

Notes

DEV = (sum_i(2*loglike(Y_i,Y_i) - 2*loglike(Y_i,mu_i)) / scale

The deviance functions are analytically defined for each family.

Previous topic

statsmodels.genmod.families.family.Family

Next topic

statsmodels.genmod.families.family.Family.fitted

This Page