statsmodels.formula.api.ordinal_gee#

statsmodels.formula.api.ordinal_gee(formula, groups, data, subset=None, time=None, offset=None, exposure=None, *args, **kwargs)#

Create a GEE model instance from a formula and dataframe.

Parameters:
formulastr or generic Formula object

The formula specifying the model

groupsarray_like or str

Array of grouping labels. If a string, this is the name of a variable in data that contains the grouping labels.

dataarray_like

The data for the model.

subsetarray_like

An array-like object of booleans, integers, or index values that indicate the subset of the data to used when fitting the model.

timearray_like or str

The time values, used for dependence structures involving distances between observations. If a string, this is the name of a variable in data that contains the time values.

offsetarray_like or str

The offset values, added to the linear predictor. If a string, this is the name of a variable in data that contains the offset values.

exposurearray_like or str

The exposure values, only used if the link function is the logarithm function, in which case the log of exposure is added to the offset (if any). If a string, this is the name of a variable in data that contains the offset values.

{missing_param_doc}
argsextra arguments

These are passed to the model

kwargsextra keyword arguments

These are passed to the model with two exceptions. dep_data is processed as described below. The eval_env keyword is passed to patsy. It can be either a patsy:patsy.EvalEnvironment object or an integer indicating the depth of the namespace to use. For example, the default eval_env=0 uses the calling namespace. If you wish to use a “clean” environment set eval_env=-1.

Returns:
modelGEE model instance

Notes

data must define __getitem__ with the keys in the formula terms args and kwargs are passed on to the model instantiation. E.g., a numpy structured or rec array, a dictionary, or a pandas DataFrame.