statsmodels.genmod.qif.QIF.from_formula

classmethod QIF.from_formula(formula, groups, data, subset=None, *args, **kwargs)[source]

Create a QIF model instance from a formula and dataframe.

Parameters:
formulastr or generic Formula object

The formula specifying the model

groupsnumpy:array_like or str

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

datanumpy:array_like

The data for the model.

subsetnumpy:array_like

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

Returns:
modelQIF model instance