Managing sophisticated substitution patterns with the Mixed Logit model
The Mixed Logit model, in contrast to all the previously presented models, allows some of the coefficients to be random following a normal distribution, that is, having a mean and standard deviation. This, in effect, eliminates the dependency on the IIA assumption and allows the flexible modeling of substitution patterns. However, this comes at the cost of computation time.
Getting ready
To execute this recipe, you need a working Python Biogeme package installed on your machine. No other prerequisites are required.
How to do it…
As we have already established that the MNL model estimated using our dataset does not violate the IIA property, we will only present the mechanics of estimating the Mixed Logit model (the MixedLogit/dcm_mixed.py
file):
C_price = Beta('C_price',0,-10,10,0,'C price' ) V_price = Beta('V_price',0,-10,10,0,'V price' ) Y_price = Beta('Y_price',0,-10,10,0,'Y price' ) Z_price = Beta('Z_price',0,-10,10,0...