statsmodels.genmod.families.family.Tweedie.resid_anscombe

Tweedie.resid_anscombe(endog, mu)[source]

The Anscombe residuals for the Tweedie 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

When p = 3, then

resid\_anscombe_i = (\log(endog) - \log(\mu)) / \sqrt{mu}

Otherwise,

c = (3 - p) / 3

resid\_anscombe_i = (1 / c) * (endog ^ c - \mu ^ c) / \mu ^{p / 6}