Package: mlogit 2.0-0

mlogit: Multinomial Logit Models

Maximum likelihood estimation of random utility discrete choice models. The software is described in Croissant (2020) <doi:10.18637/jss.v095.i11> and the underlying methods in Train (2009) <doi:10.1017/CBO9780511805271>.

Authors:Yves Croissant [aut, cre]

mlogit_2.0-0.tar.gz
mlogit_2.0-0.zip(r-4.7)mlogit_2.0-0.zip(r-4.6)mlogit_2.0-0.zip(r-4.5)
mlogit_2.0-0.tgz(r-4.6-any)mlogit_2.0-0.tgz(r-4.5-any)
mlogit_2.0-0.tar.gz(r-4.7-any)mlogit_2.0-0.tar.gz(r-4.6-any)
mlogit_2.0-0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
mlogit/json (API)

# Install 'mlogit' in R:
install.packages('mlogit', repos = c('https://ycroissant.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ycroissant/mlogit/issues

Datasets:
  • Car - Stated Preferences for Car Choice
  • Catsup - Choice of Brand for Catsup
  • Cracker - Choice of Brand for Crakers
  • Electricity - Stated preference data for the choice of electricity suppliers
  • Fishing - Choice of Fishing Mode
  • Game - Ranked data for gaming platforms
  • Game2 - Ranked data for gaming platforms
  • HC - Heating and Cooling System Choice in Newly Built Houses in California
  • Heating - Heating System Choice in California Houses
  • JapaneseFDI - Japanese Foreign Direct Investment in European Regions
  • Mode - Mode Choice
  • ModeCanada - Mode Choice for the Montreal-Toronto Corridor
  • NOx - Technologies to reduce NOx emissions
  • RiskyTransport - Risky Transportation Choices
  • Train - Stated Preferences for Train Traveling

On CRAN:

Conda:

quarto

11.70 score 10 stars 12 packages 1.7k scripts 25k downloads 40 mentions 26 exports 15 dependencies

Last updated from:319d2db8c3. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING180
source / vignettesOK376
linux-release-x86_64WARNING164
macos-release-arm64WARNING195
macos-oldrel-arm64WARNING169
windows-develWARNING151
windows-releaseWARNING132
windows-oldrelWARNING134
wasm-releaseOK161

Exports:cor.mlogitcov.mlogitdfidxdrpargazehas.intercepthmftestidxidx_nameis.mFormulalogsumlrtestmedmFormulamlogitmlogit.datamlogit.optimpredsprparqrparrgrparscoretestslpsstdevwaldtest

Dependencies:CompQuadFormdfidxFormulagenericslatticelmtestMatrixmicsrnumDerivrbibutilsRcppRdpacksandwichsurvivalzoo

Data management, model description and testing
Data management | Wide format | Long format | Model description | Testing | Bibliography

Last update: 2026-06-02
Started: 2024-09-01

Random utility model and the multinomial logit model
Random utility model | The distribution of the error terms | IIA property | Interpretation | Marginal effects | Marginal rates of substitution | Consumer's surplus | Application | ModeCanada | NOx | Predictions and marginal effects | Bibliography

Last update: 2026-06-02
Started: 2024-09-01

Logit models relaxing the iid hypothesis
The heteroskedastic logit model | The nested logit model | Applications | ModeCanada | JapaneseFDI | Bibliography

Last update: 2026-06-02
Started: 2024-09-01

The random parameters (or mixed) logit model
Derivation of the model | The probabilities | Individual parameters | Panel data | Application | Train | $$CC^{\top}=\left(\begin{array}{ccc}c_{11}^2 & c_{11} c_{12} & c_{11}c_{13} \c_{11}c_{12} & c_{12}^2 + c_{22}^2 & c_{12}c_{23}+c_{22}c_{23} \c_{11}c_{13} & c_{12}c_{3} + c_{22}c_{23} & c_{13}^2 + c_{23}^2 c_{33}^2\end{array}\right) | RiskyTransport | Bibliography

Last update: 2026-06-02
Started: 2024-09-01

mlogit
Bibliography

Last update: 2026-06-02
Started: 2024-09-01

The multinomial probit model
The model | $$\mbox{V}\left(\epsilon^l\right)=\mbox{V}\left(M^l\epsilon\right) | M^l\mbox | Identification | Simulations | $$\left(\begin{array}{c}\epsilon^l_1 \ \epsilon^l_2 \ \epsilon^l_3 \ \vdots \ \epsilon^l_J\end{array}\right) | Applications | Bibliography

Last update: 2026-01-26
Started: 2024-09-01

Miscellaneous models
Paired combinatorial logit model | The rank-ordered logit model | Bibliography

Last update: 2026-01-26
Started: 2024-09-01

Exercise 1: Multinomial logit model

Last update: 2026-01-26
Started: 2024-09-01

Exercise 2: Nested logit model

Last update: 2026-01-26
Started: 2024-09-01

Exercise 3: Mixed logit model

Last update: 2026-01-26
Started: 2024-09-01

Exercise 4: Multinomial probit
Bibliography

Last update: 2026-01-26
Started: 2024-09-01

Readme and manuals

Help Manual

Help pageTopics
Stated Preferences for Car ChoiceCar
Choice of Brand for CatsupCatsup
Correlation structure of the random parameterscor.mlogit cov.mlogit
Choice of Brand for CrakersCracker
Functions used to describe the characteristics of estimated random parametersdistribution drpar drpar.mlogit drpar.rpar mean.mlogit mean.rpar med med.mlogit med.rpar prpar prpar.mlogit prpar.rpar qrpar qrpar.mlogit qrpar.rpar rg rg.mlogit rg.rpar stdev stdev.mlogit stdev.rpar
Marginal effects of the covariateseffects.mlogit
Stated preference data for the choice of electricity suppliersElectricity
Choice of Fishing ModeFishing
Ranked data for gaming platformsGame Game2
Indicates whether the formula contains an intercepthas.intercept has.intercept.default has.intercept.Formula has.intercept.formula has.intercept.mlogit
Heating and Cooling System Choice in Newly Built Houses in CaliforniaHC
Heating System Choice in California HousesHeating
Hausman-McFadden Testhmftest hmftest.formula hmftest.mlogit
Japanese Foreign Direct Investment in European RegionsJapaneseFDI
Compute the log-sum or inclusive value/utilitylogsum
Multinomial logit modelmlogit
Some deprecated functions, especially 'mlogit.data', 'index' and 'mFormula'is.mFormula mFormula mFormula.default mFormula.formula mlogit-deprecated mlogit.data model.matrix.mFormula
Non-linear minimization routinemlogit.optim print.est.stat
Mode ChoiceMode
Mode Choice for the Montreal-Toronto CorridorModeCanada
Compute the model matrix for RUMmodel.matrix.dfidx_mlogit
Technologies to reduce NOx emissionsNOx
Plot of the distribution of estimated random parametersplot.mlogit plot.rpar
Methods for mlogit objectscoef.mlogit coef.summary.mlogit df.residual.mlogit fitted.mlogit idx.mlogit idx_name.mlogit miscmethods.mlogit model.matrix.mlogit predict.mlogit print.mlogit print.summary.mlogit residuals.mlogit summary.mlogit terms.mlogit update.mlogit
Risky Transportation ChoicesRiskyTransport
random parameter objectsprint.rpar rpar summary.rpar
The three tests for mlogit modelslrtest.mlogit scoretest scoretest.default scoretest.mlogit waldtest.mlogit
Stated Preferences for Train TravelingTrain
vcov method for mlogit objectsformula.mlogit print.summary.vcov.mlogit print.vcov.mlogit summary.vcov.mlogit vcov.mlogit