Biogeme Swissmetro examples

Various examples are available to illustrate the syntax of biogeme. They are all based on a data set collected to analyze the impact of the modal innovation in transportation: Swissmetro, a revolutionary mag-lev underground system.

Download the data file here.

Documentation:

Each model is available both as a .mod file, with the syntax of (bison) biogeme, and as a .py file, with the specification written in python, to be used with pythonbiogeme. The .html generated by biogeme is also provided, both for biogeme and pythonbiogeme. In general, the output are identical. However, when random numbers are used, the output may vary.

Description biogeme pythonbiogeme
Logit 01logit.mod 01logit.py
01logit.html 01logit.html
WESML: using weights 02weight.mod 02weight.py
02weight.html 02weight.html
Scale 03scale.mod 03scale.py
03scale.html 03scale.html
Transforming the variables 04modifVariables.mod 04modifVariables.py
04modifVariables.html 04modifVariables.html
Normal mixture of logit 05normalMixture.mod 05normalMixture.py
05normalMixture.html 05normalMixture.html
Normal mixture of logit (with numerical integration) Not implemented 05normalMixtureIntegral.py
05normalMixtureIntegral.html
Uniform mixture of logit 06unifMixture.mod 06unifMixture.py
06unifMixture.html 06unifMixture.html
Uniform mixture of logit (with numerical integration) Not implemented 06unifMixtureIntegral.py
06unifMixtureIntegral.html
Discrete mixture of logit (latent classes) 07discreteMixture.mod 07discreteMixture.py
07discreteMixture.html 07discreteMixture.html
Box-Cox transforms 08boxcox.mod 08boxcox.py
08boxcox.html 08boxcox.html
Nested logit 09nested.mod 09nested.py
09nested.html 09nested.html
Nested logit, normalized from the bottom 10nestedBottom.mod 10nestedBottom.py
10nestedBottom.html 10nestedBottom.html
Cross nested logit 11cnl.mod 11cnl.py
11cnl.html 11cnl.html
Error component with panel data (unidentified) 12panel.mod 12panel.py
12panel.html 12panel.html
Error component with panel data (normalized) 13panelNormalized.mod 13panelNormalized.py
13panelNormalized.html 13panelNormalized.html
MEV correction for choice based sampling 14selectionBias.mod 14selectionBias.py
14selectionBias.html 14selectionBias.html
Panel with latent classes 15panelDiscrete.mod 15panelDiscrete.py
15panelDiscrete.html 15panelDiscrete.html
Seminonparametric 16legendre.mod Not implemented
16legendre.html Not implemented
Lognormal mixture of logit 17lognormalMixture.mod 17lognormalMixture.py
17lognormalMixture.html 17lognormalMixture.html
Lognormal mixture of logit (with numerical integration) Not implemented 17lognormalMixtureIntegral.py
17lognormalMixtureIntegral.html
Lognormal mixture of logit, with derivatives 17lognormalMixtureWithDerivatives.mod Not relevant
17lognormalMixtureWithDerivatives.html Not relevant
Latent class model Not implemented 18latentClasses.py
Not implemented 18latentClasses.html
Latent variable model (discrete response) Not implemented 19latentVariable.py
Not implemented 19latentVariable.html
Latent variable model (continuous response) Not implemented 20latentVariable.py
Not implemented 20latentVariable.html
Model application and elasticities Not implemented 01logit_simul.py
Not implemented 01logit_simul.html
Compute statistics on the data Not implemented 01logit_stat.py
Not implemented 01logit_stat.html