statsmodels.genmod.families.varfuncs.Binomial

class statsmodels.genmod.families.varfuncs.Binomial(n=1)[source]

Binomial variance function

Parameters
nint, optional

The number of trials for a binomial variable. The default is 1 for p in (0,1)

Notes

Formulas :

V(mu) = p * (1 - p) * n

where p = mu / n

Alias for Binomial: binary = Binomial()

A private method _clean trims the data by machine epsilon so that p is in (0,1)

Methods

call

Returns the binomial variance

Methods

deriv(mu)

Derivative of the variance function v’(mu)