Multinomial Logistic Regression

Statistics
Introduced by
Cox (1966); Theil (1969); formalized by McFadden (1974)
Year
1966–1974
Type
Generalized linear model
Family
Regression / GLM

What does it do?

Multinomial logistic regression extends binary logistic regression to outcomes with three or more unordered categories.

It models the log-odds of each category relative to a chosen reference category as a linear function of the predictors, and estimates all parameters simultaneously by maximum likelihood. It is a common choice when the dependent variable is nominal with multiple levels.

The intuition behind the method

Think of a dependent variable that records which of three or more unordered groups an observation belongs to — for example, which transport mode a commuter chooses (car, bus, or train). Multinomial logistic regression fits one equation per non-reference category, each asking: how do the predictors shift the odds of choosing this group over the reference group? The softmax function then converts those log-odds into proper probabilities that sum to one across all categories, giving a complete probability distribution over the outcome classes for every combination of predictor values.

History

Multinomial logistic regression is the multi-way generalisation of binary logistic regression to outcomes with three or more unordered categories. In machine learning the same model is known as the softmax classifier, where it is described as the multi-way generalisation of logistic regression with a probabilistic interpretation in terms of the posterior probability of each class. Agresti's Categorical Data Analysis (2002), listed in the citations, gives a standard presentation of the method for categorical outcomes. It is now widely used for nominal polytomous outcomes across the social, biomedical, and behavioural sciences.

When to use it

Use multinomial logistic regression when the outcome is nominal with three or more unordered categories and the predictors are continuous, categorical, or mixed. It fits when no meaningful ordering exists among the outcome levels; if the levels are ordered, an ordinal model such as proportional-odds is usually more parsimonious. A commonly used rule of thumb is about 10 or more events per predictor per category contrast. It is not a formal threshold, so where feasible use simulation or a power calculation to judge whether the sample is adequate. If the sample falls short, reduce the number of predictors or use regularisation. Before relying on the estimates, check that observations are independent, that no predictor perfectly or quasi-completely separates the outcome categories, that the log-odds of each contrast are approximately linear in each continuous predictor (for example, by using splines or categorisation), and that the IIA assumption is plausible (see limitations and the FAQ). Do not use it for a binary outcome, where standard logistic regression applies. Do not use it for a very large set of sparse categories, where regularised or alternative classifiers may be more practical.

Limitations and considerations

  • Requires substantially larger samples than binary logistic regression because K-1 parameter sets are estimated simultaneously; sparse cells severely inflate standard errors.
  • The independence of irrelevant alternatives (IIA) assumption is implicit: adding or removing one outcome category should not change the relative odds of the remaining categories, which may not hold in practice.
  • Interpretation becomes complex when K is large: there are (K-1) × p coefficients to report and summarise.
  • No closed-form solution; convergence can fail with perfect separation or very small category frequencies.
  • Ignores natural ordering in the outcome; if an ordering exists, ordinal models are more parsimonious and powerful.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Handles nominal outcomes with any number of unordered categories in a single, unified model.
  • The softmax function yields class probabilities that sum to one across all categories, allowing direct probabilistic prediction for each outcome level.
  • Relative risk ratios are intuitively interpretable: each exp(β) is a multiplicative effect on the odds of one category versus the reference.
  • Accommodates continuous, binary, and categorical predictors and their interactions without requiring the predictors to be normally distributed.
  • The maximum-likelihood framework provides likelihood-ratio tests and standard errors for hypothesis testing and confidence intervals.
  • Available in common statistical packages, including R, Python statsmodels, Stata, SAS and SPSS.

Applications

  • Transportation demand modelling: predicting choice of travel mode (car, bus, train, cycling) from traveller characteristics.
  • Marketing research: explaining brand or product choice among several competing options.
  • Clinical medicine: classifying patients into diagnostic categories (e.g., three cancer subtypes) from clinical predictors.
  • Political science: modelling vote choice among three or more parties or candidates.
  • Ecology: predicting habitat or vegetation class membership from environmental covariates.
  • Education research: predicting post-secondary pathway choice (university, vocational training, employment) from student background factors.

How it works

How it works

1

One outcome category is designated the reference (baseline). All comparisons are expressed relative to this category. The choice of reference does not change model fit, but it changes the sign and interpretation of the coefficients, so it must always be reported.

2

For each non-reference category k, the model specifies a linear predictor: the log-odds of being in category k versus the reference equals an intercept plus a linear combination of the predictors. Each predictor therefore has a separate slope for each category contrast.

Formula
\ln\frac{P(Y=k)}{P(Y=K)} = \alpha_k + \mathbf{x}^\top\boldsymbol{\beta}_k, \quad k=1,\ldots,K-1
3

The softmax transformation converts the K-1 linear predictors into K mutually exclusive probabilities. Each predicted probability is a fraction whose numerator is the exponentiated linear predictor for that category and whose denominator sums over all categories, including the reference, which contributes a term of 1.

Formula
P(Y=k\mid\mathbf{x}) = \frac{e^{\alpha_k+\mathbf{x}^\top\boldsymbol{\beta}_k}}{1+\sum_{j=1}^{K-1}e^{\alpha_j+\mathbf{x}^\top\boldsymbol{\beta}_j}}
4

Parameters are estimated by maximum likelihood using iterative numerical methods such as Newton-Raphson, because no closed-form solution exists. Stable estimates need adequate data. A commonly used rule of thumb is about 10 or more events per predictor per category contrast; it is not a formal threshold, so simulation or a power calculation is preferable where feasible. Convergence can fail when categories are sparse or when a predictor separates the outcome perfectly.

5

Exponentiated coefficients are relative risk ratios (RRR). exp(β_kj) is the relative risk ratio for category k versus the reference: the multiplicative change in the odds of category k relative to the reference for a one-unit increase in predictor j, holding other predictors fixed. It is a ratio of odds, not a ratio of probabilities. Model fit is assessed with the likelihood-ratio chi-square test, pseudo-R² measures (McFadden, Nagelkerke), and classification accuracy.

Common pitfalls

  • Choosing the reference category without reporting it. All coefficients and relative risk ratios depend on the reference, so it must be stated alongside every result.
  • Defaulting to the multinomial model without checking whether the outcome has a natural order. If it does, an ordinal model is usually more parsimonious and easier to interpret.
  • Ignoring multicollinearity. Highly correlated predictors inflate standard errors and can cause non-convergence in iterative estimation.
  • Judging the model by overall classification accuracy alone. Also examine how well the predicted probabilities match observed frequencies in each category.
  • Fitting the model with few events per predictor per category contrast, well below the rule of thumb of about 10 (which is not a formal threshold). Estimates become unreliable and confidence intervals inflate.

Frequently asked questions

How does multinomial logistic regression differ from ordinal logistic regression?

Multinomial logistic regression treats the outcome categories as unordered (nominal) and estimates a separate equation for each non-reference category. Ordinal logistic regression exploits a natural ordering among categories and models cumulative log-odds with fewer parameters. When the outcome has a meaningful order, ordinal models are more parsimonious and should be preferred.

What is the independence of irrelevant alternatives (IIA) assumption and how can I test it?

IIA states that the relative odds of choosing one category over another do not change when other categories are added or removed. Formal tests exist, such as the Hausman-McFadden and Small-Hsiao tests, but they are not reliable in every setting, and a passing result does not establish that IIA holds. The choice of alternatives is therefore best justified on substantive grounds. If IIA is doubtful, nested logit or mixed logit models relax the assumption.

How do I choose the reference category?

Any category can serve as the reference; model fit is identical regardless of the choice. A natural or meaningful reference (e.g., a control group, the most common category, or the theoretically neutral option) makes coefficients easier to interpret. Changing the reference rescales the coefficients but does not change predicted probabilities or overall fit.

What pseudo-R² should I report for multinomial logistic regression?

McFadden's pseudo-R² = 1 − (log L_model / log L_null) is the most commonly reported measure. Nagelkerke's R² is also widely used. Neither has the interpretation of OLS R², so neither should be read as the share of variance explained. Supplement either measure with the likelihood-ratio chi-square test.

Can I use regularisation with multinomial logistic regression?

Yes. L2 (ridge) and L1 (lasso) penalties can be applied to the multinomial log-likelihood. This is useful when predictors are numerous relative to observations or when multicollinearity is present. Regularised variants are available in many standard statistical and machine-learning software packages; check the documentation of the package you use.

Related methods

Sources

  1. Agresti, A. (2002). Categorical Data Analysis (2nd ed.). Wiley-Interscience.

    ISBN: 978-0471360933
  2. Hosmer, D. W., Lemeshow, S., & Sturdivant, R. X. (2013). Applied Logistic Regression (3rd ed.). Wiley.

    ISBN: 978-0470582473
  3. 2018_Book_NeuralNetworksAndDeepLearning, p. 68

  4. Statistics with STATA: Version 12, p. 270