# Multinomial Logistic Regression

**Multinomial Logistic Regression** extends logistic regression to outcomes with **three or more unordered categories**.

---

## 📌 When to Use
- Categorical outcome with 3+ unordered levels (e.g. treatment group A / B / C)
- Multiple predictor variables
- Estimating relative probability of each category vs. a reference group

---

## 📐 Model

For each category $k$ relative to a reference category $r$:

$$
\log\left(\frac{P(Y=k)}{P(Y=r)}\right) = \beta_{k0} + \beta_{k1} X_1 + \ldots + \beta_{km} X_m
$$

---

## 🔬 What StatInsight Reports
- Coefficients for each category vs. reference with p-values
- Odds ratios per predictor per category
- Overall model fit (log-likelihood)

---

## 🧪 Assumptions
- Categorical (unordered) outcome with 3+ levels
- Independence of irrelevant alternatives (IIA)
- No perfect multicollinearity
- Sufficient observations per category
- Independent observations

> ✅ No normality assumption for predictors.

---

## 🧠 Interpretation
- Each set of coefficients compares one category to the reference
- **OR > 1** for a predictor: that predictor increases relative odds of being in that category vs. reference
- Choose the most frequent or meaningful category as the reference

---

## 🐍 Python Implementation

```python
from statsmodels.discrete.discrete_model import MNLogit

model = MNLogit(y, sm.add_constant(X)).fit()
print(model.summary())
```

---

## 📎 Related Tests

[Multiple Logistic Regression](logistic.md) — for binary outcomes

[Multiple Linear Regression](multiple-linear.md) — for continuous outcomes
