Family.deviance()

statsmodels.genmod.families.family.Family.deviance

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

The deviance function evaluated at (endog,mu,freq_weights,mu).

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.

freq_weights : array-like

1d array of frequency weights. The default is 1.

scale : float, optional

An optional scale argument. The default is 1.

Returns:

Deviance : array

The value of deviance function defined below.

Notes

Deviance is defined

D = \sum_i (2 * freq\_weights_i * llf(Y_i, Y_i) - 2 *
    llf(Y_i, \mu_i)) / scale

where y is the endogenous variable. The deviance functions are analytically defined for each family.

© 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.Family.deviance.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部