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

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.

Returns
modelQIF model instance