# Multiple Logistic Regression

**Multiple Logistic Regression** models the probability of a **binary outcome** (yes/no, event/no event) from multiple predictor variables.

---

## 📌 When to Use
- Binary outcome variable (exactly 2 categories)
- Multiple predictors (numeric, binary, or categorical)
- Estimating odds ratios and identifying significant predictors of the event

---

## 📐 Model

$$
\log\left(\frac{p}{1-p}\right) = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \ldots + \beta_k X_k
$$

Where $p$ is the probability of the event occurring.

---

## 🔬 What StatInsight Reports
- Odds Ratio (OR) for each predictor with 95% CI
- p-value per predictor
- Overall model significance (likelihood ratio test)
- Pseudo-R² (Nagelkerke)
- Classification accuracy

---

## 🧪 Assumptions
- Binary outcome variable
- Sufficient events per variable (≥ 10 events per predictor recommended)
- No perfect multicollinearity
- Linearity of continuous predictors with log-odds (can be verified with Box-Tidwell)
- Independent observations

> ✅ No normality assumption for predictors.

---

## 🧠 Interpretation
- **OR > 1**: predictor increases odds of the event
- **OR < 1**: predictor decreases odds of the event
- **95% CI excludes 1**: statistically significant
- **OR = 1**: no association

---

## 🐍 Python Implementation

```python
import statsmodels.api as sm

model = sm.Logit(y, sm.add_constant(X)).fit()
print(model.summary())
print("Odds Ratios:", np.exp(model.params))
```

---

## 📎 Related Tests

[Multinomial Logistic Regression](multinomial-logistic.md) — for outcomes with 3+ categories

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

[Automatic Predictor Selection](/statistics/predictors/auto-predictor-selection.md)
