statsmodels.othermod.betareg.BetaModel.from_formula#

classmethod BetaModel.from_formula(formula, data, exog_precision_formula=None, *args, **kwargs)[source]#

Create a BetaModel from a formula and dataframe.

Parameters:
formulastr or generic Formula object

The formula specifying the model for the mean.

dataarray_like

The data for the model. See Notes.

exog_precision_formulastr, optional

The formula specifying the model for the precision. If None, then the precision model only has a constant term (see the exog_precision parameter of BetaModel).

*args

Additional positional arguments passed to the model.

**kwargs

Additional keyword arguments passed to the model.

Returns:
modelBetaModel instance