Multinomial logistic regression
Regression · Method and input reference
Outcome first: 3–10 integer-coded unordered categories, then numeric predictors. Smallest observed outcome code is the reference. Independence of irrelevant alternatives is assumed, not tested. Explicit dummy coding required for categorical predictors. Synthetic example: 240 simulated three-category outcomes and two predictors.
Open calculator · Compare methods in the decision matrix
When to consider it
- Unordered categorical outcome with three or more levels.
Assumptions and scope
- Observations must be independent between subjects; repeated rows from one subject are not independent samples.
- Smallest outcome code is the reference. Inspect sparse categories, separation and independence of irrelevant alternatives.
Required inputs
- Unordered outcome, predictors — Numeric observations; preserve the row and column structure described above.
Review missing values and data coding before running. Sample inputs are synthetic teaching examples.
Implementation
Outcome first: 3–10 integer-coded unordered categories, then numeric predictors. Smallest observed outcome code is the reference. Independence of irrelevant alternatives is assumed, not tested. Explicit dummy coding required for categorical predictors. Synthetic example: 240 simulated three-category outcomes and two predictors.
- statsmodels 0.14.4: statsmodels.api.MNLogit
These are pinned library versions; saved results record the versions actually used at runtime.