statsmodels.genmod.qif.QIF.from_formula

method

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 string

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