Mixtures of logit with Monte-Carlo 2000 antithetic MLHS draws

Estimation of a mixtures of logit models where the integral is approximated using MonteCarlo integration with antithetic MLHS draws.

author:

Michel Bierlaire, EPFL

date:

Thu Apr 13 23:40:02 2023

import biogeme.biogeme_logging as blog
from biogeme.expressions import bioDraws
from b07estimation_specification import get_biogeme
logger = blog.get_screen_logger(level=blog.INFO)
logger.info('Example b07estimation_specification_mlhs_anti_500.py')
Example b07estimation_specification_mlhs_anti_500.py
R = 500
the_draws = bioDraws('B_TIME_RND', 'NORMAL_MLHS_ANTI')
the_biogeme = get_biogeme(the_draws=the_draws, number_of_draws=R)
the_biogeme.modelName = 'b07estimation_monte_carlo_mlhs_anti_500'
File /var/folders/rp/ppksq7xd6_x7p0jb0t73x7vw0000gq/T/tmpxudid88s/d361d7af-8d8a-48d4-a67e-680ba1d2432c has been parsed.
results = the_biogeme.estimate()
*** Initial values of the parameters are obtained from the file __b07estimation_monte_carlo_mlhs_anti_500.iter
Parameter values restored from __b07estimation_monte_carlo_mlhs_anti_500.iter
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: Newton with trust region for simple bounds
Iter.         asc_car       asc_train          b_cost          b_time        b_time_s     Function    Relgrad   Radius      Rho
    0            0.14            -0.4            -1.3            -2.3             1.7      5.2e+03    5.6e-05       10        1   ++
    1            0.14            -0.4            -1.3            -2.3             1.7      5.2e+03    4.1e-08       10        1   ++
print(results.shortSummary())
The syntax "shortSummary" is deprecated and is replaced by the syntax "short_summary".
Results for model b07estimation_monte_carlo_mlhs_anti_500
Nbr of parameters:              5
Sample size:                    6768
Excluded data:                  3960
Final log likelihood:           -5213.408
Akaike Information Criterion:   10436.82
Bayesian Information Criterion: 10470.92
pandas_results = results.getEstimatedParameters()
pandas_results
Value Rob. Std err Rob. t-test Rob. p-value
asc_car 0.139664 0.051825 2.694908 7.040797e-03
asc_train -0.400226 0.065756 -6.086513 1.153960e-09
b_cost -1.285214 0.086556 -14.848263 0.000000e+00
b_time -2.273260 0.117186 -19.398813 0.000000e+00
b_time_s 1.679598 0.126821 13.243863 0.000000e+00


Total running time of the script: (0 minutes 28.407 seconds)

Gallery generated by Sphinx-Gallery