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:

formula : str or generic Formula object

The formula specifying the model

groups : array-like or string

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

data : array-like

The data for the model.

subset : 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:

model : QIF model instance