Module Expr Str Import alias identifier ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad UnaryOpUSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If Call NameLoad NameLoad Str body Assign NameStore CompareIn NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListComp Call NameLoad NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Str Raise Call NameLoad BinOpMod NameLoad TupleLoad Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad NameLoad NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpDiv BinOpAdd NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpDiv Num BinOpMult BinOpPow Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Raise NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Num AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Return BinOpDiv BinOpMult Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpMult Num BinOpSub BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpSub NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Return BinOpDiv BinOpMult Num Call AttributeLoad NameLoad attr BinOpMult BinOpMult NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMult NameLoad BinOpSub BinOpSub BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Return BinOpMult NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpDiv BinOpMult BinOpDiv Num Num BinOpSub BinOpPow NameLoad BinOpDiv Num Num BinOpPow NameLoad BinOpDiv Num Num BinOpPow NameLoad BinOpDiv Num Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Return BinOpDiv BinOpDiv BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Return BinOpDiv Call AttributeLoad NameLoad attr BinOpMult NameLoad BinOpPow BinOpSub NameLoad NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str If BoolOpAnd Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr NameLoad keyword Num Num Assign NameStore Call AttributeLoad NameLoad attr BinOpPow BinOpSub NameLoad Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore BinOpMult UnaryOpUSub Call AttributeLoad NameLoad attr NameLoad NameLoad AugAssignSub NameStore BinOpMult BinOpAdd Num Call AttributeLoad NameLoad attr BinOpDiv AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad orelse Return Call AttributeLoad NameLoad attr BinOpMult NameLoad BinOpSub BinOpSub BinOpDiv BinOpSub BinOpMult NameLoad NameLoad BinOpDiv BinOpPow NameLoad Num Num NameLoad BinOpDiv BinOpPow NameLoad Num BinOpMult Num NameLoad BinOpMult Num Call AttributeLoad NameLoad attr BinOpMult BinOpMult Num AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpSub NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Return BinOpMult Num Call AttributeLoad NameLoad attr BinOpMult NameLoad BinOpSub BinOpDiv BinOpSub NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Return BinOpMult Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpMult Num BinOpAdd BinOpDiv UnaryOpUSub BinOpSub NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Return BinOpMult BinOpDiv Num NameLoad Call AttributeLoad NameLoad attr BinOpMult BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpDiv NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpMult BinOpSub NameLoad Num Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv Num NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpDiv BinOpMult Num BinOpSub BinOpPow NameLoad BinOpDiv Num Num BinOpPow NameLoad BinOpDiv Num Num BinOpPow NameLoad BinOpDiv Num Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpDiv BinOpAdd NameLoad Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd CompareGt AttributeLoad NameLoad attr Num CompareGt SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Index Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Num Return TupleLoad BinOpDiv BinOpMult NameLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return TupleLoad NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str If BoolOpAnd CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Return BinOpMult Num Call AttributeLoad NameLoad attr BinOpMult BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num BinOpMult BinOpSub Num NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpSub Num NameLoad Num NameLoad orelse Return BinOpMult Num Call AttributeLoad NameLoad attr BinOpMult BinOpMult AttributeLoad NameLoad attr NameLoad BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpDiv NameLoad NameLoad Num BinOpMult BinOpSub Num NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpDiv BinOpSub Num NameLoad BinOpSub Num NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If BoolOpAnd CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Return BinOpDiv BinOpMult Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpMult Num Call AttributeLoad NameLoad attr BinOpAdd BinOpMult NameLoad NameLoad BinOpMult BinOpSub Num NameLoad BinOpSub Num NameLoad NameLoad orelse Return BinOpDiv BinOpMult Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpMult BinOpMult Num AttributeLoad NameLoad attr BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpDiv NameLoad NameLoad Num BinOpMult BinOpSub Num NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpDiv BinOpSub Num NameLoad BinOpSub Num NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str If BoolOpAnd CompareEq Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad CompareEq AttributeLoad NameLoad attr Num body Return BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpMult BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpAdd BinOpDiv NameLoad BinOpSub Num NameLoad Num Call AttributeLoad NameLoad attr BinOpSub Num NameLoad NameLoad orelse Assign NameStore BinOpMult NameLoad AttributeLoad NameLoad attr Return BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpMult BinOpAdd BinOpAdd BinOpSub BinOpSub Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Call AttributeLoad NameLoad attr BinOpAdd BinOpSub AttributeLoad NameLoad attr NameLoad Num BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad BinOpSub Num NameLoad BinOpMult AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpSub Num NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Lambda arguments args NameParam defaults BinOpMult Call AttributeLoad NameLoad attr BinOpDiv Num Num BinOpDiv Num Num NameLoad Call AttributeLoad NameLoad attr BinOpDiv Num Num BinOpDiv Num Num Return BinOpMult Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpDiv BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad BinOpMult BinOpPow NameLoad BinOpDiv Num Num BinOpPow BinOpSub Num NameLoad BinOpDiv Num Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Return BinOpDiv BinOpMult Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpDiv BinOpPow BinOpSub NameLoad NameLoad Num BinOpMult NameLoad BinOpPow NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Return BinOpDiv Call AttributeLoad NameLoad attr BinOpDiv BinOpMult NameLoad BinOpPow BinOpSub NameLoad NameLoad Num BinOpMult NameLoad BinOpPow NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Return BinOpMult Num Call AttributeLoad NameLoad attr BinOpMult BinOpAdd BinOpAdd BinOpDiv BinOpPow BinOpSub NameLoad NameLoad Num BinOpMult BinOpMult NameLoad BinOpPow NameLoad Num NameLoad Call AttributeLoad NameLoad attr BinOpMult NameLoad BinOpPow NameLoad Num Call AttributeLoad NameLoad attr BinOpMult Num AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpDiv Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr BinOpMult Num NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore BinOpSub Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Assign NameStore BinOpDiv BinOpMult BinOpMult NameLoad Num Call AttributeLoad NameLoad attr BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AugAssignAdd NameStore BinOpMult NameLoad BinOpSub BinOpMult BinOpMult Num NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpMult BinOpMult BinOpDiv Num AttributeLoad NameLoad attr BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr BinOpDiv BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad Return BinOpDiv Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore BinOpSub Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Assign NameStore BinOpDiv BinOpMult BinOpMult NameLoad Num Call AttributeLoad NameLoad attr BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AugAssignAdd NameStore BinOpMult NameLoad BinOpSub BinOpMult BinOpMult Num NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpMult BinOpMult BinOpDiv Num AttributeLoad NameLoad attr BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr BinOpDiv BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad Return BinOpDiv BinOpMult Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub BinOpSub Call AttributeLoad NameLoad attr BinOpAdd NameLoad BinOpDiv Num AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Call AttributeLoad NameLoad attr BinOpDiv Num AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr BinOpMult BinOpAdd BinOpSub BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv BinOpMult AttributeLoad NameLoad attr NameLoad BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad BinOpDiv Call AttributeLoad NameLoad attr BinOpAdd Num BinOpMult AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr BinOpDiv Num Num BinOpDiv Num Num BinOpDiv Num Num NameLoad Return BinOpDiv BinOpAdd BinOpSub Call NameLoad BinOpMult UnaryOpUSub AttributeLoad NameLoad attr NameLoad Call NameLoad BinOpMult UnaryOpUSub AttributeLoad NameLoad attr NameLoad BinOpMult Num BinOpSub BinOpPow NameLoad BinOpDiv Num Num BinOpPow NameLoad BinOpDiv Num Num BinOpPow BinOpAdd NameLoad BinOpMult AttributeLoad NameLoad attr BinOpPow NameLoad Num BinOpDiv Num Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword BinOpMult NameLoad Num If BoolOpAnd CompareNotEq NameLoad Num UnaryOpNot BoolOpOr CompareIs NameLoad AttributeLoad NameLoad attr CompareIs NameLoad NameLoad body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad NameLoad If BoolOpAnd CompareEq NameLoad Num BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr orelse If CompareNotEq NameLoad Num body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword BinOpMult NameLoad Num orelse Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr CompareEq NameLoad Num NameLoad BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad BinOpSub NameLoad NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub BinOpDiv BinOpSub NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad orelse Assign NameStore BinOpAdd BinOpSub BinOpDiv BinOpPow NameLoad BinOpSub Num NameLoad BinOpMult BinOpSub Num NameLoad BinOpSub Num NameLoad BinOpDiv BinOpMult NameLoad BinOpPow NameLoad BinOpSub Num NameLoad BinOpSub Num NameLoad BinOpDiv BinOpPow NameLoad BinOpSub Num NameLoad BinOpSub Num NameLoad Return Call AttributeLoad NameLoad attr BinOpMult BinOpMult Num NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr CompareEq NameLoad Num NameLoad BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad BinOpSub NameLoad NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub BinOpDiv BinOpSub NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad orelse Assign NameStore BinOpAdd BinOpSub BinOpDiv BinOpPow NameLoad BinOpSub Num NameLoad BinOpMult BinOpSub Num NameLoad BinOpSub Num NameLoad BinOpDiv BinOpMult NameLoad BinOpPow NameLoad BinOpSub Num NameLoad BinOpSub Num NameLoad BinOpDiv BinOpPow NameLoad BinOpSub Num NameLoad BinOpSub Num NameLoad Return BinOpMult Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpMult Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Num body Return BinOpDiv BinOpSub Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore BinOpDiv BinOpSub Num AttributeLoad NameLoad attr Num Return BinOpDiv BinOpMult BinOpDiv Num NameLoad BinOpSub BinOpPow NameLoad NameLoad BinOpPow NameLoad NameLoad BinOpPow NameLoad BinOpDiv AttributeLoad NameLoad attr Num decorator_list decorator_list
N/A N/A 
The one parameter exponential family distributions used by GLM.
 N/A numpy np scipy special N/A links L N/A varfuncs V N/A FLOAT_EPS N/A N/A N/A np finfo float eps Family N/A object N/A N/A 
    The parent class for one-parameter exponential families.

    Parameters
    ----------
    link : a link function instance
        Link is the linear transformation function.
        See the individual families for available links.
    variance : a variance function
        Measures the variance as a function of the mean probabilities.
        See the individual families for the default variance function.

    See Also
    --------
    :ref:`links`

     N/A valid N/A N/A N/A np inf N/A np inf N/A links N/A _setlink N/A N/A self link N/A N/A N/A 
        Helper method to set the link for a family.

        Raises a ValueError exception if the link is not available.  Note that
        the error message might not be that informative because it tells you
        that the link should be in the base class for the link function.

        See glm.GLM for a list of appropriate links for each family but note
        that not all of these are currently available.
         N/A N/A self _link link N/A N/A N/A isinstance link N/A L Link N/A N/A N/A TypeError The input should be a valid Link object. N/A N/A hasattr self links N/A N/A validlink N/A link N/A self links N/A validlink N/A max N/A N/A isinstance link _ N/A _ N/A self links N/A N/A validlink N/A N/A errmsg Invalid link for family, should be in %s. (got %s) N/A N/A ValueError N/A errmsg N/A N/A repr N/A self links link N/A _getlink N/A N/A self N/A N/A N/A 
        Helper method to get the link for a family.
         N/A N/A self _link N/A N/A link N/A property _getlink _setlink doc Link function for family __init__ N/A N/A self link variance N/A N/A N/A N/A self link N/A link N/A N/A self variance variance N/A starting_mu N/A N/A self y N/A N/A N/A 
        Starting value for mu in the IRLS algorithm.

        Parameters
        ----------
        y : array
            The untransformed response variable.

        Returns
        -------
        mu_0 : array
            The first guess on the transformed response variable.

        Notes
        -----
        .. math::

           \mu_0 = (Y + \overline{Y})/2

        Notes
        -----
        Only the Binomial family takes a different initial value.
         N/A N/A N/A y N/A N/A y mean 2.0 N/A weights N/A N/A self mu N/A N/A N/A 
        Weights for IRLS steps

        Parameters
        ----------
        mu : array-like
            The transformed mean response variable in the exponential family

        Returns
        -------
        w : array
            The weights for the IRLS steps

        Notes
        -----
        .. math::

           w = 1 / (g'(\mu)^2  * Var(\mu))
         N/A N/A 1.0 N/A N/A N/A N/A N/A self link deriv mu 2 N/A N/A self variance mu N/A deviance N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The deviance function evaluated at (endog,mu,freq_weights,mu).

        Deviance is usually defined as twice the loglikelihood ratio.

        Parameters
        ----------
        endog : array-like
            The endogenous response variable
        mu : array-like
            The inverse of the link function at the linear predicted values.
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        -------
        Deviance : array
            The value of deviance function defined below.

        Notes
        -----
        Deviance is defined

        .. math::

           D = \sum_i (2 * freq\_weights_i * llf(Y_i, Y_i) - 2 *
               llf(Y_i, \mu_i)) / scale

        where y is the endogenous variable. The deviance functions are
        analytically defined for each family.
         N/A NotImplementedError N/A resid_dev N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The deviance residuals

        Parameters
        ----------
        endog : array
            The endogenous response variable
        mu : array
            The inverse of the link function at the linear predicted values.
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        -------
        Deviance residuals.

        Notes
        -----
        The deviance residuals are defined for each family.
         N/A NotImplementedError N/A fitted N/A N/A self lin_pred N/A N/A N/A 
        Fitted values based on linear predictors lin_pred.

        Parameters
        -----------
        lin_pred : array
            Values of the linear predictor of the model.
            dot(X,beta) in a classical linear model.

        Returns
        --------
        mu : array
            The mean response variables given by the inverse of the link
            function.
         N/A fits N/A N/A N/A self link inverse lin_pred N/A fits N/A predict N/A N/A self mu N/A N/A N/A 
        Linear predictors based on given mu values.

        Parameters
        ----------
        mu : array
            The mean response variables

        Returns
        -------
        lin_pred : array
            Linear predictors based on the mean response variables.  The value
            of the link function at the given mu.
         N/A N/A N/A self link mu N/A loglike N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The log-likelihood function in terms of the fitted mean response.

        Parameters
        ----------
        `endog` : array
            Usually the endogenous response variable.
        `mu` : array
            Usually but not always the fitted mean response variable.
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float
            The scale parameter. The default is 1.

        Returns
        -------
        llf : float
            The value of the loglikelihood evaluated at
            (endog,mu,freq_weights,scale) as defined below.
        Notes
        -----
        This is defined for each family.  endog and mu are not restricted to
        `endog` and `mu` respectively.  For instance, the deviance function
        calls both loglike(endog,endog) and loglike(endog,mu) to get the
        likelihood ratio.
         N/A NotImplementedError N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        The Anscome residuals.

        See also
        --------
        statsmodels.families.family.Family docstring and the `resid_anscombe`
        for the individual families for more information.
         N/A NotImplementedError N/A N/A Poisson N/A Family N/A N/A 
    Poisson exponential family.

    Parameters
    ----------
    link : a link instance, optional
        The default link for the Poisson family is the log link. Available
        links are log, identity, and sqrt. See statsmodels.family.links for
        more information.

    Attributes
    ----------
    Poisson.link : a link instance
        The link function of the Poisson instance.
    Poisson.variance : varfuncs instance
        `variance` is an instance of
        statsmodels.genmod.families.family.varfuncs.mu

    See also
    --------
    statsmodels.genmod.families.family.Family
    :ref:`links`

     N/A links N/A N/A L log N/A L identity N/A L sqrt N/A variance N/A V mu N/A valid N/A 0 N/A np inf N/A safe_links N/A N/A L Log __init__ N/A N/A self link N/A N/A L log N/A N/A N/A self variance N/A Poisson variance N/A N/A self link N/A link N/A _clean N/A N/A self x N/A N/A N/A 
        Helper function to trim the data so that is in (0,inf)

        Notes
        -----
        The need for this function was discovered through usage and its
        possible that other families might need a check for validity of the
        domain.
         N/A N/A N/A np clip x FLOAT_EPS N/A np inf N/A resid_dev N/A N/A self endog mu scale N/A 1.0 N/A N/A Poisson deviance residual

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        -------
        resid_dev : array
            Deviance residuals as defined below

        Notes
        -----
        .. math::

           resid\_dev_i = sign(Y_i - \mu_i) * \sqrt{2 *
                          (Y_i * \log(Y_i / \mu_i) - (Y_i - \mu_i))} / scale
         N/A endog_mu N/A N/A self _clean N/A endog mu N/A N/A N/A N/A N/A np sign N/A endog mu N/A N/A np sqrt N/A 2 N/A N/A endog N/A N/A np log endog_mu N/A endog mu scale N/A deviance N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        Poisson deviance function

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        -------
        deviance : float
            The deviance function at (endog,mu,freq_weights,scale) as defined
            below.

        Notes
        -----
        If a constant term is included it is defined as

        .. math::

           D = 2 * \sum_i (freq\_weights_i * Y_i * \log(Y_i / \mu_i))/ scale
         N/A endog_mu N/A N/A self _clean N/A endog mu N/A N/A N/A 2 N/A N/A np sum N/A N/A endog freq_weights N/A N/A np log endog_mu scale N/A loglike N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The log-likelihood function in terms of the fitted mean response.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            The scale parameter, defaults to 1.

        Returns
        -------
        llf : float
            The value of the loglikelihood function evaluated at
            (endog,mu,freq_weights,scale) as defined below.

        Notes
        -----
        .. math::

           llf = scale * \sum_i freq\_weights_i * (Y_i * \log(\mu_i) - \mu_i -
                 \ln \Gamma(Y_i + 1))
         N/A loglike N/A N/A np sum N/A freq_weights N/A N/A N/A endog N/A N/A np log mu mu N/A N/A special gammaln N/A endog 1 N/A N/A scale loglike N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        Anscombe residuals for the Poisson exponential family distribution

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable

        Returns
        -------
        resid_anscombe : array
            The Anscome residuals for the Poisson family defined below

        Notes
        -----
        .. math::

           resid\_anscombe_i = (3/2) * (Y_i^{2/3} - \mu_i^{2/3}) / \mu_i^{1/6}
         N/A N/A N/A N/A 3 2.0 N/A N/A endog N/A 2 3.0 N/A mu N/A 2 3.0 N/A mu N/A 1 6.0 N/A N/A Gaussian N/A Family N/A N/A 
    Gaussian exponential family distribution.

    Parameters
    ----------
    link : a link instance, optional
        The default link for the Gaussian family is the identity link.
        Available links are log, identity, and inverse.
        See statsmodels.family.links for more information.

    Attributes
    ----------
    Gaussian.link : a link instance
        The link function of the Gaussian instance
    Gaussian.variance : varfunc instance
        `variance` is an instance of statsmodels.family.varfuncs.constant

    See also
    --------
    statsmodels.genmod.families.family.Family
    :ref:`links`

     N/A links N/A N/A L log N/A L identity N/A L inverse_power N/A variance N/A V constant N/A safe_links links __init__ N/A N/A self link N/A N/A L identity N/A N/A N/A self variance N/A Gaussian variance N/A N/A self link N/A link N/A resid_dev N/A N/A self endog mu scale N/A 1.0 N/A N/A 
        Gaussian deviance residuals

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        -------
        resid_dev : array
            Deviance residuals as defined below

        Notes
        --------
        .. math::

           resid\_dev_i = (Y_i - \mu_i) / \sqrt{Var(\mu_i)} / scale
         N/A N/A N/A N/A endog mu N/A N/A np sqrt N/A N/A self variance mu scale N/A deviance N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        Gaussian deviance function

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        -------
        deviance : float
            The deviance function at (endog,mu,freq_weights,scale)
            as defined below.

        Notes
        --------
        .. math::

           D = \sum_i freq\_weights_i * (Y_i - \mu_i)^2 / scale
         N/A N/A N/A N/A np sum N/A freq_weights N/A N/A endog mu 2 scale N/A loglike N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The log-likelihood in terms of the fitted mean response.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            Scales the loglikelihood function. The default is 1.

        Returns
        -------
        llf : float
            The value of the loglikelihood function evaluated at
            (endog,mu,freq_weights,scale) as defined below.

        Notes
        -----
        If the link is the identity link function then the
        loglikelihood function is the same as the classical OLS model.

        .. math::

           llf = -nobs / 2 * (\log(SSR) + (1 + \log(2 \pi / nobs)))

        where

        .. math::
           SSR = \sum_i (Y_i - g^{-1}(\mu_i))^2

        If the links is not the identity link then the loglikelihood
        function is defined as

        .. math::

           llf = \sum_i freq\_weights_i * ((Y_i * \mu_i - \mu_i^2 / 2) / scale-
                 Y^2 / (2 * scale) - (1/2) * \log(2 * \pi * scale))
         N/A N/A N/A isinstance N/A self link N/A L Power N/A N/A N/A self link power 1 N/A N/A nobs2 N/A N/A N/A np sum freq_weights axis 0 2.0 N/A SSR N/A N/A np sum N/A N/A endog N/A N/A self fitted mu 2 axis 0 N/A llf N/A N/A N/A N/A np log SSR nobs2 N/A llf N/A N/A 1 N/A N/A np log N/A N/A np pi nobs2 nobs2 N/A llf N/A N/A N/A N/A np sum N/A freq_weights N/A N/A N/A N/A N/A endog mu N/A N/A mu 2 2 scale N/A N/A endog 2 N/A 2 scale N/A 0.5 N/A N/A np log N/A N/A 2 N/A np pi scale N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        The Anscombe residuals for the Gaussian exponential family distribution

        Parameters
        ----------
        endog : array
            Endogenous response variable
        mu : array
            Fitted mean response variable

        Returns
        -------
        resid_anscombe : array
            The Anscombe residuals for the Gaussian family defined below

        Notes
        --------
        .. math::

           resid\_anscombe_i = Y_i - \mu_i
         N/A N/A endog mu N/A N/A Gamma N/A Family N/A N/A 
    Gamma exponential family distribution.

    Parameters
    ----------
    link : a link instance, optional
        The default link for the Gamma family is the inverse link.
        Available links are log, identity, and inverse.
        See statsmodels.family.links for more information.

    Attributes
    ----------
    Gamma.link : a link instance
        The link function of the Gamma instance
    Gamma.variance : varfunc instance
        `variance` is an instance of statsmodels.family.varfuncs.mu_squared

    See also
    --------
    statsmodels.genmod.families.family.Family
    :ref:`links`

     N/A links N/A N/A L log N/A L identity N/A L inverse_power N/A variance N/A V mu_squared N/A safe_links N/A N/A L Log __init__ N/A N/A self link N/A N/A L inverse_power N/A N/A N/A self variance N/A Gamma variance N/A N/A self link N/A link N/A _clean N/A N/A self x N/A N/A N/A 
        Helper function to trim the data so that is in (0,inf)

        Notes
        -----
        The need for this function was discovered through usage and its
        possible that other families might need a check for validity of the
        domain.
         N/A N/A N/A np clip x FLOAT_EPS N/A np inf N/A deviance N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        Gamma deviance function

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        -------
        deviance : float
            Deviance function as defined below

        Notes
        -----
        .. math::

           D = 2 * \sum_i freq\_weights_i * ((Y_i - \mu_i)/\mu_i - \log(Y_i /
               \mu_i))
         N/A endog_mu N/A N/A self _clean N/A endog mu N/A N/A 2 N/A N/A np sum N/A freq_weights N/A N/A N/A endog mu mu N/A N/A np log endog_mu N/A resid_dev N/A N/A self endog mu scale N/A 1.0 N/A N/A 
        Gamma deviance residuals

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        -------
        resid_dev : array
            Deviance residuals as defined below

        Notes
        -----
        .. math::

           resid\_dev_i = sign(Y_i - \mu_i) \sqrt{-2 *
                          (-(Y_i - \mu_i) / \mu_i + \log(Y_i / \mu_i))}
         N/A endog_mu N/A N/A self _clean N/A endog mu N/A N/A N/A N/A np sign N/A endog mu N/A N/A np sqrt N/A -2 N/A N/A N/A N/A endog mu mu N/A N/A np log endog_mu N/A loglike N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The log-likelihood function in terms of the fitted mean response.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            The default is 1.

        Returns
        -------
        llf : float
            The value of the loglikelihood function evaluated at
            (endog,mu,freq_weights,scale) as defined below.

        Notes
        --------
        .. math::

           llf = -1 / scale * \sum_i *(Y_i / \mu_i+ \log(\mu_i)+
                 (scale -1) * \log(Y) + \log(scale) + scale *
                 \ln \Gamma(1 / scale))
         N/A N/A N/A -1.0 scale N/A N/A np sum N/A N/A N/A N/A N/A N/A endog mu N/A N/A np log mu N/A N/A scale 1 N/A N/A np log endog N/A N/A np log scale N/A scale N/A N/A special gammaln N/A 1.0 scale freq_weights N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        The Anscombe residuals for Gamma exponential family distribution

        Parameters
        ----------
        endog : array
            Endogenous response variable
        mu : array
            Fitted mean response variable

        Returns
        -------
        resid_anscombe : array
            The Anscombe residuals for the Gamma family defined below

        Notes
        -----
        .. math::

           resid\_anscombe_i = 3 * (Y_i^{1/3} - \mu_i^{1/3}) / \mu_i^{1/3}
         N/A N/A N/A 3 N/A N/A endog N/A 1 3.0 N/A mu N/A 1 3.0 N/A mu N/A 1 3.0 N/A N/A Binomial N/A Family N/A N/A 
    Binomial exponential family distribution.

    Parameters
    ----------
    link : a link instance, optional
        The default link for the Binomial family is the logit link.
        Available links are logit, probit, cauchy, log, and cloglog.
        See statsmodels.family.links for more information.

    Attributes
    ----------
    Binomial.link : a link instance
        The link function of the Binomial instance
    Binomial.variance : varfunc instance
        `variance` is an instance of statsmodels.family.varfuncs.binary

    See also
    --------
    statsmodels.genmod.families.family.Family
    :ref:`links`

    Notes
    -----
    endog for Binomial can be specified in one of three ways.

     N/A links N/A N/A L logit N/A L probit N/A L cauchy N/A L log N/A L cloglog N/A L identity N/A variance N/A V binary N/A safe_links N/A N/A L Logit N/A L CDFLink __init__ N/A N/A self link N/A N/A L logit N/A N/A N/A self n 1 N/A N/A self variance N/A N/A V Binomial n N/A self n N/A N/A self link N/A link N/A starting_mu N/A N/A self y N/A N/A N/A 
        The starting values for the IRLS algorithm for the Binomial family.
        A good choice for the binomial family is :math:`\mu_0 = (Y_i + 0.5)/2`
         N/A N/A N/A y 0.5 2 N/A initialize N/A N/A self endog freq_weights N/A N/A N/A 
        Initialize the response variable.

        Parameters
        ----------
        endog : array
            Endogenous response variable

        Returns
        --------
        If `endog` is binary, returns `endog`

        If `endog` is a 2d array, then the input is assumed to be in the format
        (successes, failures) and
        successes/(success + failures) is returned.  And n is set to
        successes + failures.
         N/A N/A N/A N/A endog ndim 1 N/A N/A N/A endog shape N/A 1 1 N/A N/A y N/A endog N/A N/A N/A 0 N/A N/A self n N/A N/A endog sum 1 N/A N/A N/A N/A y 1.0 N/A self n N/A self n N/A N/A N/A endog N/A N/A np ones N/A N/A endog shape N/A 0 N/A deviance N/A N/A self endog mu freq_weights scale N/A 1 1.0 N/A N/A 
        Deviance function for either Bernoulli or Binomial data.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable (already transformed to a probability
            if appropriate).
        mu : array
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        --------
        deviance : float
            The deviance function as defined below

        Notes
        -----
        If the endogenous variable is binary:

        .. math::

           D = -2 * \sum_i freq\_weights * (I_{1,i} * \log(\mu_i) + I_{0,i} *
               \log(1 - \mu_i))

        where :math:`I_{1,i}` is an indicator function that evalueates to 1 if
        :math:`Y_i = 1`. and :math:`I_{0,i}` is an indicator function that
        evaluates to 1 if :math:`Y_i = 0`.

        If the model is ninomial:

        .. math::

           D = 2 * \sum_i freq\_weights * (\log(Y_i / \mu_i) + (n_i - Y_i) *
               \log((n_i - Y_i) / n_i - \mu_i))

        where :math:`Y_i` and :math:`n` are as defined in Binomial.initialize.
         N/A N/A N/A N/A N/A np shape N/A self n N/A N/A N/A self n 1 N/A N/A one N/A N/A np equal endog 1 N/A N/A -2 N/A N/A np sum N/A N/A N/A one N/A N/A np log N/A mu 1e-200 N/A N/A 1 one N/A N/A np log N/A N/A 1 mu 1e-200 freq_weights N/A N/A N/A 2 N/A N/A np sum N/A N/A N/A self n freq_weights N/A N/A endog N/A N/A np log N/A N/A endog mu 1e-200 N/A N/A 1 endog N/A N/A np log N/A N/A N/A 1 endog N/A 1 mu 1e-200 N/A resid_dev N/A N/A self endog mu scale N/A 1.0 N/A N/A 
        Binomial deviance residuals

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        -------
        resid_dev : array
            Deviance residuals as defined below

        Notes
        -----
        If the endogenous variable is binary:

        .. math::

           resid\_dev_i = sign(Y_i - \mu_i) * \sqrt{-2 *
                          \log(I_{1,i} * \mu_i + I_{0,i} * (1 - \mu_i))}

        where :math:`I_{1,i}` is an indicator function that evalueates to 1 if
        :math:`Y_i = 1`. and :math:`I_{0,i}` is an indicator function that
        evaluates to 1 if :math:`Y_i = 0`.

        If the endogenous variable is binomial:

        .. math::

           resid\_dev_i = sign(Y_i - \mu_i) \sqrt{2 * n_i *
                          (Y_i * \log(Y_i / \mu_i) + (1 - Y_i) *
                          \log(1 - Y_i)/(1 - \mu_i))}

        where :math:`Y_i` and :math:`n` are as defined in Binomial.initialize.
         N/A mu N/A N/A N/A self link _clean mu N/A N/A N/A N/A N/A np shape N/A self n N/A N/A N/A self n 1 N/A N/A one N/A N/A np equal endog 1 N/A N/A N/A N/A N/A np sign N/A endog mu N/A N/A np sqrt N/A -2 N/A N/A np log N/A N/A one mu N/A N/A 1 one N/A 1 mu scale N/A N/A N/A N/A N/A N/A np sign N/A endog mu N/A N/A np sqrt N/A N/A 2 N/A self n N/A N/A endog N/A N/A np log N/A N/A endog mu 1e-200 N/A N/A 1 endog N/A N/A np log N/A N/A N/A 1 endog N/A 1 mu 1e-200 scale N/A loglike N/A N/A self endog mu freq_weights scale N/A 1 1.0 N/A N/A 
        The log-likelihood function in terms of the fitted mean response.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            Not used for the Binomial GLM.

        Returns
        -------
        llf : float
            The value of the loglikelihood function evaluated at
            (endog,mu,freq_weights,scale) as defined below.

        Notes
        --------
        If the endogenous variable is binary:

        .. math::

         llf = scale * \sum_i (y_i * \log(\mu_i/(1-\mu_i)) + \log(1-\mu_i)) *
               freq\_weights_i

        If the endogenous variable is binomial:

        .. math::

           llf = scale * \sum_i freq\_weights_i * (\ln \Gamma(n+1) -
                 \ln \Gamma(y_i + 1) - \ln \Gamma(n_i - y_i +1) + y_i *
                 \log(\mu_i / (1 - \mu_i)) + n * \log(1 - \mu_i))

        where :math:`y_i = Y_i * n_i` with :math:`Y_i` and :math:`n_i` as
        defined in Binomial initialize.  This simply makes :math:`y_i` the
        original number of successes.
         N/A N/A N/A N/A N/A np shape N/A self n N/A N/A N/A self n 1 N/A N/A N/A scale N/A N/A np sum N/A N/A N/A endog N/A N/A np log N/A N/A mu N/A 1 mu 1e-200 N/A N/A np log N/A 1 mu freq_weights N/A N/A y N/A endog N/A self n N/A N/A scale N/A N/A np sum N/A N/A N/A N/A N/A N/A N/A special gammaln N/A N/A self n 1 N/A N/A special gammaln N/A y 1 N/A N/A special gammaln N/A N/A N/A self n y 1 N/A y N/A N/A np log N/A mu N/A 1 mu N/A N/A self n N/A N/A np log N/A 1 mu freq_weights N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        The Anscombe residuals

        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
        -----
        sqrt(n)*(cox_snell(endog)-cox_snell(mu))/(mu**(1/6.)*(1-mu)**(1/6.))

        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

        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) = x**(2/3.)/(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.

        References
        ----------
        Anscombe, FJ. (1953) "Contribution to the discussion of H. Hotelling's
            paper." Journal of the Royal Statistical Society B. 15, 229-30.

        Cox, DR and Snell, EJ. (1968) "A General Definition of Residuals."
            Journal of the Royal Statistical Society B. 30, 248-75.

         N/A cox_snell N/A N/A N/A x N/A N/A N/A N/A special betainc N/A 2 3.0 N/A 2 3.0 x N/A N/A special beta N/A 2 3.0 N/A 2 3.0 N/A N/A N/A N/A np sqrt N/A self n N/A N/A N/A cox_snell endog N/A cox_snell mu N/A N/A mu N/A 1 6.0 N/A N/A 1 mu N/A 1 6.0 N/A N/A InverseGaussian N/A Family N/A N/A 
    InverseGaussian exponential family.

    Parameters
    ----------
    link : a link instance, optional
        The default link for the inverse Gaussian family is the
        inverse squared link.
        Available links are inverse_squared, inverse, log, and identity.
        See statsmodels.family.links for more information.

    Attributes
    ----------
    InverseGaussian.link : a link instance
        The link function of the inverse Gaussian instance
    InverseGaussian.variance : varfunc instance
        `variance` is an instance of statsmodels.family.varfuncs.mu_cubed

    See also
    --------
    statsmodels.genmod.families.family.Family
    :ref:`links`

    Notes
    -----
    The inverse Guassian distribution is sometimes referred to in the
    literature as the Wald distribution.

     N/A links N/A N/A L inverse_squared N/A L inverse_power N/A L identity N/A L log N/A variance N/A V mu_cubed N/A safe_links N/A N/A L inverse_squared N/A L Log __init__ N/A N/A self link N/A N/A L inverse_squared N/A N/A N/A self variance N/A InverseGaussian variance N/A N/A self link N/A link N/A resid_dev N/A N/A self endog mu scale N/A 1.0 N/A N/A 
        Returns the deviance residuals for the inverse Gaussian family.

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        -------
        resid_dev : array
            Deviance residuals as defined below

        Notes
        -----
        .. math::

           resid\_dev_i = sign(Y_i - \mu_i) * 
                          \sqrt {(Y_i - \mu_i)^2 / (Y_i * \mu_i^2)} / scale
         N/A N/A N/A N/A N/A np sign N/A endog mu N/A N/A np sqrt N/A N/A N/A endog mu 2 N/A endog N/A mu 2 scale N/A deviance N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        Inverse Gaussian deviance function

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        -------
        deviance : float
            Deviance function as defined below

        Notes
        -----
        .. math::

           D = \sum_i freq\_weights_i * ((Y_i - \mu_i)^2 / (Y_i *\mu_i^2)) /
               scale
         N/A N/A N/A N/A np sum N/A N/A freq_weights N/A N/A endog mu 2 N/A endog N/A mu 2 scale N/A loglike N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The log-likelihood function in terms of the fitted mean response.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            The default is 1.

        Returns
        -------
        llf : float
            The value of the loglikelihood function evaluated at
            (endog,mu,freq_weights,scale) as defined below.

        Notes
        -----
        .. math::

           llf = -1/2 * \sum_i freq\_weights_i * ((Y_i - \mu_i)^2 / (Y_i *
                 \mu_i * scale) + \log(scale * Y_i^3) + \log(2 * \pi))
         N/A N/A -0.5 N/A N/A np sum N/A N/A N/A N/A N/A N/A endog mu 2 N/A N/A endog N/A mu 2 scale N/A N/A np log N/A scale N/A endog 3 N/A N/A np log N/A 2 N/A np pi freq_weights N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        The Anscombe residuals for the inverse Gaussian distribution

        Parameters
        ----------
        endog : array
            Endogenous response variable
        mu : array
            Fitted mean response variable

        Returns
        -------
        resid_anscombe : array
            The Anscombe residuals for the inverse Gaussian distribution  as
            defined below

        Notes
        -----
        .. math::

           resid\_anscombe_i = \log(Y_i / \mu_i) / \sqrt{\mu_i}
         N/A N/A N/A N/A np log N/A endog mu N/A N/A np sqrt mu N/A N/A NegativeBinomial N/A Family N/A N/A 
    Negative Binomial exponential family.

    Parameters
    ----------
    link : a link instance, optional
        The default link for the negative binomial family is the log link.
        Available links are log, cloglog, identity, nbinom and power.
        See statsmodels.family.links for more information.
    alpha : float, optional
        The ancillary parameter for the negative binomial distribution.
        For now `alpha` is assumed to be nonstochastic.  The default value
        is 1.  Permissible values are usually assumed to be between .01 and 2.


    Attributes
    ----------
    NegativeBinomial.link : a link instance
        The link function of the negative binomial instance
    NegativeBinomial.variance : varfunc instance
        `variance` is an instance of statsmodels.family.varfuncs.nbinom

    See also
    --------
    statsmodels.genmod.families.family.Family
    :ref:`links`

    Notes
    -----
    Power link functions are not yet supported.

     N/A links N/A N/A L log N/A L cloglog N/A L identity N/A L nbinom N/A L Power N/A variance N/A V nbinom N/A safe_links N/A N/A L Log __init__ N/A N/A self link alpha N/A N/A L log 1.0 N/A N/A N/A self alpha N/A 1.0 alpha N/A N/A self variance N/A N/A V NegativeBinomial alpha N/A self alpha N/A N/A isinstance link N/A L NegativeBinomial N/A N/A N/A self link N/A link alpha N/A self alpha N/A N/A N/A self link N/A link N/A _clean N/A N/A self x N/A N/A N/A 
        Helper function to trim the data so that is in (0,inf)

        Notes
        -----
        The need for this function was discovered through usage and its
        possible that other families might need a check for validity of the
        domain.
         N/A N/A N/A np clip x FLOAT_EPS N/A np inf N/A deviance N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        Returns the value of the deviance function.

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        -------
        deviance : float
            Deviance function as defined below

        Notes
        -----
        :math:`D = \sum_i piecewise_i` where :math:`piecewise_i` is defined as:

        If :math:`Y_{i} = 0`:

        :math:`piecewise_i = 2* \log(1 + \alpha * \mu_i) / \alpha`

        If :math:`Y_{i} > 0`:

        :math:`piecewise_i = 2 * Y_i * \log(Y_i / \mu_i) - (2 / \alpha) *
            (1 + \alpha * Y_i) * \ln(1 + \alpha * Y_i) / (1 + \alpha * \mu_i)`
         N/A iszero N/A N/A np equal endog 0 N/A notzero N/A 1 iszero N/A endog_mu N/A N/A self _clean N/A endog mu N/A tmp N/A N/A N/A iszero 2 N/A N/A np log N/A 1 N/A N/A self alpha mu N/A self alpha N/A tmp N/A notzero N/A N/A N/A 2 endog N/A N/A np log endog_mu N/A N/A N/A 2 N/A self alpha N/A 1 N/A N/A self alpha endog N/A N/A np log N/A N/A 1 N/A N/A self alpha endog N/A 1 N/A N/A self alpha mu N/A N/A N/A N/A np sum N/A freq_weights tmp scale N/A resid_dev N/A N/A self endog mu scale N/A 1.0 N/A N/A 
        Negative Binomial Deviance Residual

        Parameters
        ----------
        endog : array-like
            `endog` is the response variable
        mu : array-like
            `mu` is the fitted value of the model
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        --------
        resid_dev : array
            The array of deviance residuals

        Notes
        -----
        :math:`resid\_dev_i = sign(Y_i-\mu_i) * \sqrt{piecewise_i}`

        where :math:`piecewise_i` is defined as

        If :math:`Y_i = 0`:

        :math:`piecewise_i = 2 * \log(1 + \alpha * \mu_i)/ \alpha`

        If :math:`Y_i > 0`:

        :math:`piecewise_i = 2 * Y_i * \log(Y_i / \mu_i) - (2 / \alpha) *
        (1 + \alpha * Y_i) * \log((1 + \alpha * Y_i) / (1 + \alpha * \mu_i))`
         N/A iszero N/A N/A np equal endog 0 N/A notzero N/A 1 iszero N/A endog_mu N/A N/A self _clean N/A endog mu N/A tmp N/A N/A N/A iszero 2 N/A N/A np log N/A 1 N/A N/A self alpha mu N/A self alpha N/A tmp N/A notzero N/A N/A N/A 2 endog N/A N/A np log endog_mu N/A N/A N/A 2 N/A self alpha N/A 1 N/A N/A self alpha endog N/A N/A np log N/A N/A 1 N/A N/A self alpha endog N/A 1 N/A N/A self alpha mu N/A N/A N/A N/A N/A np sign N/A endog mu N/A N/A np sqrt tmp scale N/A loglike N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The log-likelihood function in terms of the fitted mean response.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            The fitted mean response values
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float
            The scale parameter. The default is 1.

        Returns
        -------
        llf : float
            The value of the loglikelihood function evaluated at
            (endog,mu,freq_weights,scale) as defined below.

        Notes
        -----
        Defined as:

        .. math::

           llf = \sum_i freq\_weights_i * (Y_i * \log{(\alpha * e^{\eta_i} /
                 (1 + \alpha * e^{\eta_i}))} - \log{(1 + \alpha * e^{\eta_i})}/
                 \alpha + Constant)

        where :math:`Constant` is defined as:

        .. math::

           Constant = \ln \Gamma{(Y_i + 1/ \alpha )} - \ln \Gamma(Y_i + 1) -
                      \ln \Gamma{(1/ \alpha )}
         N/A lin_pred N/A N/A self _link mu N/A constant N/A N/A N/A N/A special gammaln N/A endog N/A 1 N/A self alpha N/A N/A special gammaln N/A endog 1 N/A N/A special gammaln N/A 1 N/A self alpha N/A exp_lin_pred N/A N/A np exp lin_pred N/A N/A N/A np sum N/A N/A N/A N/A endog N/A N/A np log N/A N/A N/A self alpha exp_lin_pred N/A 1 N/A N/A self alpha exp_lin_pred N/A N/A N/A np log N/A 1 N/A N/A self alpha exp_lin_pred N/A self alpha constant freq_weights N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        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)
         N/A hyp2f1 N/A N/A N/A x N/A N/A N/A special hyp2f1 N/A 2 3.0 N/A 1 3.0 N/A 5 3.0 x N/A N/A N/A N/A N/A hyp2f1 N/A N/A N/A self alpha endog N/A hyp2f1 N/A N/A N/A self alpha mu N/A 1.5 N/A N/A endog N/A 2 3.0 N/A mu N/A 2 3.0 N/A N/A mu N/A N/A self alpha N/A mu 2 N/A 1 6.0 N/A N/A Tweedie N/A Family N/A N/A 
    Tweedie family.

    Parameters
    ----------
    link : a link instance, optional
        The default link for the Tweedie family is the log link when the
        link_power is 0. Otherwise, the power link is default.
        Available links are log and Power.
    var_power : float, optional
        The variance power.
    link_power : float, optional
        The link power.

    Attributes
    ----------
    Tweedie.link : a link instance
        The link function of the Tweedie instance
    Tweedie.variance : varfunc instance
        `variance` is an instance of statsmodels.family.varfuncs.Power
    Tweedie.link_power : float
        The power of the link function, or 0 if its a log link.
    Tweedie.var_power : float
        The power of the variance function.

    See also
    --------
    statsmodels.genmod.families.family.Family
    :ref:`links`

    Notes
    -----
    Logliklihood function not implemented because of the complexity of
    calculating an infinite series of summations. The variance power can be
    estimated using the `estimate_tweedie_power` function that is part of the
    `GLM` class.
     N/A links N/A N/A L log N/A L Power N/A variance N/A V Power N/A safe_links N/A N/A L log N/A L Power __init__ N/A N/A self link var_power link_power N/A None 1.0 0 N/A N/A N/A self var_power var_power N/A N/A self link_power link_power N/A N/A self variance N/A N/A V Power power N/A var_power 1.0 N/A N/A N/A link_power 0 N/A N/A N/A link N/A L Power N/A link None N/A N/A msg link_power of {} not supported specified link N/A msg N/A N/A msg format link_power N/A N/A ValueError msg N/A N/A N/A link_power 0 N/A N/A link None N/A link N/A L Log N/A N/A N/A self link N/A N/A L log N/A N/A N/A link_power 0 N/A N/A N/A self link N/A N/A L Power power N/A link_power 1.0 N/A N/A N/A self link N/A link N/A _clean N/A N/A self x N/A N/A N/A 
        Helper function to trim the data so that is in (0,inf)

        Notes
        -----
        The need for this function was discovered through usage and its
        possible that other families might need a check for validity of the
        domain.
         N/A N/A N/A np clip x 0 N/A np inf N/A deviance N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        Returns the value of the deviance function.

        Parameters
        -----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            Fitted mean response variable
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float, optional
            An optional scale argument. The default is 1.

        Returns
        -------
        deviance : float
            Deviance function as defined below

        Notes
        -----
        When :math:`p = 1`,

        .. math::

            resid\_dev_i = \mu

        when :math:`endog = 0` and

        .. math::

            resid\_dev_i = endog * \log(endog / \mu) + (\mu - endog)

        otherwise.

        When :math:`p = 2`,

        .. math::

            resid\_dev_i =  (endog - \mu) / \mu - \log(endog / \mu)

        For all other p,

        .. math::

            resid\_dev_i = endog ^{2 - p} / ((1 - p) * (2 - p)) -
                           endog * \mu ^{1 - p} / (1 - p) + \mu ^{2 - p} /
                           (2 - p)

        Once :math:`resid\_dev_i` is calculated, then calculate deviance as

        .. math::

            D = \sum{2 * freq\_weights * resid\_dev_i}
         N/A p N/A self var_power N/A N/A p 1 N/A N/A dev N/A N/A np where N/A endog 0 mu N/A N/A endog N/A N/A np log N/A endog mu N/A mu endog N/A N/A N/A p 2 N/A N/A endog1 N/A N/A np clip endog FLOAT_EPS N/A np inf N/A dev N/A N/A N/A endog mu mu N/A N/A np log N/A endog1 mu N/A N/A dev N/A N/A N/A N/A endog N/A 2 p N/A N/A 1 p N/A 2 p N/A N/A endog N/A mu N/A 1 p N/A 1 p N/A N/A mu N/A 2 p N/A 2 p N/A N/A N/A np sum N/A N/A 2 freq_weights dev N/A resid_dev N/A N/A self endog mu scale N/A 1.0 N/A N/A 
        Tweedie Deviance Residual

        Parameters
        ----------
        endog : array-like
            `endog` is the response variable
        mu : array-like
            `mu` is the fitted value of the model
        scale : float, optional
            An optional argument to divide the residuals by scale. The default
            is 1.

        Returns
        --------
        resid_dev : array
            The array of deviance residuals

        Notes
        -----
        When :math:`p = 1`,

        .. math::

            resid\_dev_i = \mu

        when :math:`endog = 0` and

        .. math::

            resid\_dev_i = endog * \log(endog / \mu) + (\mu - endog)

        otherwise.

        When :math:`p = 2`,

        .. math::

            resid\_dev_i =  (endog - \mu) / \mu - \log(endog / \mu)

        For all other p,

        .. math::

            resid\_dev_i = endog ^{2 - p} / ((1 - p) * (2 - p)) -
                           endog * \mu ^{1 - p} / (1 - p) + \mu ^{2 - p} /
                           (2 - p)
         N/A p N/A self var_power N/A N/A p 1 N/A N/A dev N/A N/A np where N/A endog 0 mu N/A N/A endog N/A N/A np log N/A endog mu N/A mu endog N/A N/A N/A p 2 N/A N/A endog1 N/A N/A np clip endog FLOAT_EPS N/A np inf N/A dev N/A N/A N/A endog mu mu N/A N/A np log N/A endog1 mu N/A N/A dev N/A N/A N/A N/A endog N/A 2 p N/A N/A 1 p N/A 2 p N/A N/A endog N/A mu N/A 1 p N/A 1 p N/A N/A mu N/A 2 p N/A 2 p N/A N/A N/A N/A np sign N/A endog mu N/A N/A np sqrt N/A 2 dev N/A loglike N/A N/A self endog mu freq_weights scale N/A 1.0 1.0 N/A N/A 
        The log-likelihood function in terms of the fitted mean response.

        Parameters
        ----------
        endog : array-like
            Endogenous response variable
        mu : array-like
            The fitted mean response values
        freq_weights : array-like
            1d array of frequency weights. The default is 1.
        scale : float
            The scale parameter. The default is 1.

        Returns
        -------
        llf : float
            The value of the loglikelihood function evaluated at
            (endog,mu,freq_weights,scale) as defined below.

        Notes
        -----
        This is not implemented because of the complexity of calculating an
        infinite series of sums.
         N/A N/A np nan N/A resid_anscombe N/A N/A self endog mu N/A N/A N/A 
        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 :math:`p = 3`, then

        .. math::

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

        Otherwise,

        .. math::

            c = (3 - p) / 3

        .. math::

            resid\_anscombe_i = (1 / c) * (endog ^ c - \mu ^ c) / \mu ^{p / 6}
         N/A N/A N/A self var_power 3 N/A N/A N/A N/A N/A N/A np log endog N/A N/A np log mu N/A N/A np sqrt mu N/A N/A c N/A N/A 3.0 N/A self var_power 3.0 N/A N/A N/A N/A 1.0 c N/A N/A endog c N/A mu c N/A mu N/A N/A self var_power 6.0 N/A N/A