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:
- formula
strorgenericFormulaobject 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}
- args
extraarguments These are passed to the model
- kwargs
extrakeywordarguments These are passed to the model with two exceptions. dep_data is processed as described below. The
eval_envkeyword is passed to patsy. It can be either apatsy:patsy.EvalEnvironmentobject or an integer indicating the depth of the namespace to use. For example, the defaulteval_env=0uses the calling namespace. If you wish to use a “clean” environment seteval_env=-1.
- formula
- Returns:
- model
GEEmodelinstance
- model
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.