Create a Model from a formula and dataframe.
Parameters: | formula : str or generic Formula object
data : array-like
subset : array-like
args : extra arguments
kwargs : extra keyword arguments
|
---|---|
Returns: | model : Model instance |
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.