Returns the value of the deviance function.
Parameters: | endog : array-like
mu : array-like
scale : float, optional
|
---|---|
Returns: | deviance : float
|
Notes
deviance = sum(piecewise)
where piecewise is defined as
If Y_{i} == 0:
piecewise_i = 2\log(1+\alpha*\mu)/\alpha
If Y_{i} > 0:
piecewise_i = math2 Y \log(Y/\mu)-2/\alpha(1+\alpha Y) * \log((1+\alpha Y)/(1+\alpha\mu))