NegativeBinomial.resid_anscombe()

statsmodels.genmod.families.family.NegativeBinomial.resid_anscombe

NegativeBinomial.resid_anscombe(endog, mu) [source]

The Anscombe residuals for the negative binomial family

Parameters:

endog : array-like

Endogenous response variable

mu : array-like

Fitted mean response variable

Returns:

resid_anscombe : array

The Anscombe residuals as defined below.

Notes

resid_anscombe = (hyp2f1(-alpha*endog)-hyp2f1(-alpha*mu)+ 1.5*(endog**(2/3.)-mu**(2/3.)))/(mu+alpha*mu**2)**(1/6.)

where hyp2f1 is the hypergeometric 2f1 function parameterized as hyp2f1(x) = hyp2f1(2/3.,1/3.,5/3.,x)

© 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.NegativeBinomial.resid_anscombe.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部