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
card.svg |card.png
mlogit/json (API)
NEWS

# 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.5k scripts 21k downloads 40 mentions 26 exports 15 dependencies

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

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING169
source / vignettesOK340
linux-release-x86_64WARNING192
macos-release-arm64WARNING123
macos-oldrel-arm64WARNING150
windows-develWARNING252
windows-releaseWARNING155
windows-oldrelWARNING200
wasm-releaseOK118

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

Dependencies:CompQuadFormdfidxFormulagenericslatticelmtestMatrixmicsrnumDerivrbibutilsRcppRdpacksandwichsurvivalzoo

Data management, model description and testing

Rendered fromc2.formula.data.qmdusingquarto::htmlon Jun 02 2026.

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

Random utility model and the multinomial logit model

Rendered fromc3.rum.qmdusingquarto::htmlon Jun 02 2026.

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

Logit models relaxing the iid hypothesis

Rendered fromc4.relaxiid.qmdusingquarto::htmlon Jun 02 2026.

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

The random parameters (or mixed) logit model

Rendered fromc5.mxl.qmdusingquarto::htmlon Jun 02 2026.

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

The multinomial probit model

Rendered fromc6.mprobit.qmdusingquarto::htmlon Jun 02 2026.

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

Miscellaneous models

Rendered fromc7.miscmodels.qmdusingquarto::htmlon Jun 02 2026.

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

Exercise 1: Multinomial logit model

Rendered frome1.mlogit.qmdusingquarto::htmlon Jun 02 2026.

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

Exercise 2: Nested logit model

Rendered frome2.nlogit.qmdusingquarto::htmlon Jun 02 2026.

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

Exercise 3: Mixed logit model

Rendered frome3.mxlogit.qmdusingquarto::htmlon Jun 02 2026.

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

Exercise 4: Multinomial probit

Rendered frome4.mprobit.qmdusingquarto::htmlon Jun 02 2026.

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

mlogit

Rendered fromc1.mlogit.qmdusingquarto::htmlon Jun 02 2026.

Last update: 2026-06-02
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