Multinomial logistic regression

Analytika TeamLast reviewed 6 min read

When the outcome is a choice among unordered options (transport mode, political party, diagnosis type), neither linear nor ordinal regression fits. Multinomial logistic regression generalises binary logistic regression to any number of unordered categories.

How it works

Pick a reference category. For each other category, the model estimates the log-odds of being in that category rather than the reference, as a function of the predictors. With k categories you get k − 1 sets of coefficients.

Worked example

In R’s chickwts experiment, 71 chicks were randomly given one of six feeds and weighed after six weeks. To illustrate the method, we turn the question around: given a chick’s weight, how do the odds of each feed (relative to casein) change? (In the experiment, feed affected weight. Here we just use the data to show how multinomial coefficients work.)

The model is significant overall, χ²(5) = 54.15, p < .001, McFadden’s R² = .21. Per 10 g of extra weight, the odds of each feed relative to casein were:

Feed vs caseinOR per 10 gp
Horsebean0.54< .001
Linseed0.72< .001
Soybean0.79.004
Meatmeal0.86.064
Sunflower1.02.803

Heavier chicks were much less likely to have been on horsebean, linseed or soybean rather than casein. Those feeds produced lighter chicks. Sunflower and casein chicks weighed about the same. The coefficients match R’s nnet::multinom in Analytika’s test suite.

Choosing the reference category

Results are always relative to the reference, so choose a meaningful one: a control condition, the most common category, or a natural baseline. Changing the reference doesn’t change the model’s fit, only which comparisons are printed.

Assumptions and cautions

  • Independence of irrelevant alternatives (IIA): the odds between two categories shouldn’t depend on which other categories exist.
  • Enough cases per category: sparse categories give huge standard errors. Consider combining rare categories.
  • If the categories are ordered, use ordinal regression instead. It’s more parsimonious and more powerful.

How to run it

  • SPSS: Analyze → Regression → Multinomial Logistic.
  • R: nnet::multinom(outcome ~ x1 + x2, data = df)
  • Analytika: fits this model automatically when the outcome is an unordered category with three or more levels.

More in Regression

Run this on your own data

Upload a dataset and ask your question in plain English. Analytika checks the assumptions, picks the test, runs it, and writes the results up in APA format.

Try it free