Binomial.resid_anscombe(endog, mu, var_weights=1.0, scale=1.0)
[source]
The Anscombe residuals
Parameters: |
|
---|---|
Returns: |
resid_anscombe – The Anscombe residuals as defined below. |
Return type: |
array |
where cox_snell is defined as cox_snell(x) = betainc(2/3., 2/3., x)*betainc(2/3.,2/3.) where betainc is the incomplete beta function as defined in scipy, which uses a regularized version (with the unregularized version, one would just have \(cox_snell(x) = Betainc(2/3., 2/3., x)\)).
The name ‘cox_snell’ is idiosyncratic and is simply used for convenience following the approach suggested in Cox and Snell (1968). Further note that \(cox\_snell(x) = \frac{3}{2}*x^{2/3} * hyp2f1(2/3.,1/3.,5/3.,x)\) where hyp2f1 is the hypergeometric 2f1 function. The Anscombe residuals are sometimes defined in the literature using the hyp2f1 formulation. Both betainc and hyp2f1 can be found in scipy.
© 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.Binomial.resid_anscombe.html