MixedLogit.parse_formula#
- MixedLogit.parse_formula(df, formula, depvar)[source]#
Parse the three-part structure of a mixed logit formula specification.
Splits the formula into target, alternative-specific covariates, fixed covariates, and random covariates. Ensures that the target variable appears in the dependent variable column and that all specified covariates exist in the input dataframe.