Multinomial Logistic Regression Tool

Design prototype

Explore multinomial logistic regression for marketing outcomes with more than two categories (for example, multi-level brand choice or multi-step funnel stage). Upload raw data, select the outcome and predictors, and compare predicted class probabilities with diagnostics.

👨‍🏫 Professor Mode: Guided Learning Experience

New to multinomial logistic regression? Enable Professor Mode for step-by-step guidance through multi-category classification!

OVERVIEW & WHAT THIS TOOL SOLVES

Customers rarely face a simple two-way choice—they choose among competing brands (Brand A, Brand B, Store Brand), subscription tiers (Basic, Pro, Enterprise), or acquisition channels. Running separate binary regressions for each pair gives inconsistent probabilities that don't add up to 100%. Multinomial Logistic Regression simultaneously models how customer traits and marketing levers shift the probability of choosing every outcome category relative to a baseline reference option, ensuring predicted shares always sum to 100%.

🎯 Questions It Answers

  • Which customer demographics or marketing exposures make shoppers choose Brand B or Brand C over our baseline reference brand?
  • How do the predicted market shares across all outcome categories shift as we change price, promotion, or customer tenure?
  • How accurately does our multi-class model classify customers into their actual chosen segment?

📂 What Data You Need

  • Case-Level CSV: One row per customer, respondent, or transaction.
  • 1 Multi-Category Outcome: An unordered categorical column with 3 or more distinct classes (e.g., chosen brand, plan tier, or persona).
  • Predictor Columns: Continuous metrics (e.g., income, price sensitivity) and/or categorical predictors (e.g., region, campaign exposure).

💡 What You'll Discover

  • Class-Specific Log-Odds & Odds Ratios: Separate coefficient tables comparing each non-reference outcome class against the chosen baseline class.
  • Softmax Probability Simulator: Interactive probability curves showing how all class probabilities trade off and sum to 100%.
  • Multi-Class Confusion Matrix & Fit: Overall and per-class accuracy, McFadden's Pseudo-R², AIC, and likelihood-ratio tests.
🔍 Key Nuances & Common Traps to Watch For
  • Every Coefficient Is Relative to the Reference Outcome: If you set Brand A as the reference category, a positive coefficient for Income in the Brand B equation means higher income increases the odds of choosing Brand B over Brand A. Changing the reference category re-expresses the coefficients from a new baseline without changing the underlying predicted probabilities.
  • Direction of Probability vs. Log-Odds: Because all class probabilities must sum to 100%, a predictor can have a slightly positive log-odds coefficient for Class B relative to Reference Class A and still see Class B's absolute probability dip if Class C grows even faster. Always inspect the predicted probability plots!
  • Independence of Irrelevant Alternatives (IIA): Multinomial logit assumes the relative odds ratio between any two outcomes is independent of which other alternatives are in the choice set. Avoid splitting a single outcome into near-identical duplicates.
📐 Under the Hood: Model Equations & Variable Definitions
1. Class-Specific Log-Odds Relative to Reference Outcome
\[ \log \frac{P(Y_i = j)}{P(Y_i = \text{ref})} = \eta_{ij} = \beta_{0j} + \beta_{1j} x_{1i} + \cdots + \beta_{pj} x_{pi}, \qquad j = 1, \ldots, K - 1 \]
💬 Read it in plain English: For each non-reference outcome category j, the model estimates its own linear equation showing how predictors shift the log-odds of landing in category j rather than the baseline reference category.
Yi, j, ref, K
Multi-Class Outcome & Reference Category YOUR DATA ⓘ
Observed outcome class Yi across K total categories, comparing focal class j against baseline ref.
x1i … xpi
Customer / Marketing Predictors YOUR DATA ⓘ
Values of the p explanatory variables for observation i.
β0j, βkj
Class-j Intercept & Relative Log-Odds Slopes ESTIMATED ⓘ
Baseline log-odds (β0j) and change in log-odds of choosing class j over ref per 1-unit increase in predictor xk; eβkj is the Relative Risk Ratio.
ηij
Linear Log-Odds Score for Class j OUTPUT ⓘ
Combined linear predictor for row i in outcome category j (with ηi,ref = 0 by definition).
2. Multinomial Softmax Link (Predicted Class Probabilities)
\[ P(Y_i = j) = \frac{\exp(\eta_{ij})}{1 + \sum_{h \neq \text{ref}} \exp(\eta_{ih})}, \qquad P(Y_i = \text{ref}) = \frac{1}{1 + \sum_{h \neq \text{ref}} \exp(\eta_{ih})} \]
💬 Read it in plain English: The softmax formula exponentiates each category's linear score and divides by the total across all categories so every customer's predicted probabilities are positive and add up to exactly 100%.
P(Yi = j)
Predicted Probability of Outcome j OUTPUT ⓘ
Model-predicted probability that observation i falls into category j.
P(Yi = ref)
Predicted Probability of Reference Outcome OUTPUT ⓘ
Model-predicted probability that observation i falls into the baseline reference category.

DATA SOURCE

📚

Use a Case Study

Use presets to auto-load realistic marketing inputs, text, and any CSV/TSV data required for uploads. The download button exposes the exact dataset used so editors can tweak it in Excel or Numbers before re-uploading.

📂

Upload Your Data

Upload a CSV file with an outcome column and predictor columns. Include a header row.

Drag & Drop raw data file (.csv, .tsv, .txt, .xls, .xlsx)

Include headers with an outcome column and predictor columns.

No raw file uploaded.

INPUTS & SETTINGS

Outcome & Reference Category

Choose the multinomial outcome (with 2 or more categories) and which outcome level should serve as the reference (baseline) category in the model. Coefficients and probability plots will be interpreted relative to this reference outcome.

Select predictors

Check the box for each predictor you want to include in the model. For categorical predictors, the app will create one coefficient per non-reference category. For continuous predictors, the app will estimate a single slope per outcome contrast.

Standardization affects model fitting and effect plots only. Summary statistics always report predictors on their original scale.

Analysis Settings

Advanced settings

VISUAL OUTPUT

Predicted probabilities vs. focal predictor

Focal range (continuous):

Hold other predictors constant

Choose levels/values for the non-focal predictors used when plotting the focal curve.

After you upload data, choose an outcome, select at least one predictor (with at least one continuous predictor to see the line view), and run the model, this chart will show how the predicted probability of each outcome changes with the focal predictor while holding others constant.

Interpretation Aid

The line (or bars for categorical focals) shows the predicted probability of each outcome category while holding other predictors constant at chosen values. Steeper slopes or larger gaps between bars imply stronger effects. Confidence bands/bars reflect the statistical uncertainty for those probabilities; wider bands mean less certainty. If bands for different categories overlap heavily, the model may not distinguish them well at those settings.

Observed vs predicted outcome distribution

This bar chart compares how often each outcome category appears in the modeled data (observed) with the predicted class counts (hard classification by highest predicted probability). Use the controls below to switch between counts and percentages or to hide the predicted bars.

Interpretation Aid

Observed bars show the actual distribution. Predicted bars come from assigning each row to the outcome with the highest predicted probability, so counts are integer (or proportions if you toggle percentage view). Large gaps suggest misfit or missing predictors; close alignment means the model’s classifications mirror the observed mix.

Visual Output Settings

SUMMARY STATISTICS

Summary Statistics

Continuous Predictors

Variable Mean Median Std. Dev. Min Max
Provide data to see summary statistics.

Categorical Predictors (% by level)

Predictor Level Percent
Provide data to see level percentages.

TEST RESULTS

Regression Equation

Show regression equations

Run the model to view the fitted log-odds equations for each outcome contrast.

Model log-likelihood: –
Null log-likelihood: –
LLR Chi² (vs null): –
LLR p-value: –
Degrees of freedom: –
Pseudo-R² (McFadden): –
AIC: –
BIC: –
Condition number: –
Interpretation Aid

Log-likelihood: Higher (less negative) is better fit; values are comparable only across models on the same data.

LLR Chi² test: Tests whether the full model is significantly better than an intercept-only model. A small p-value indicates predictors improve fit.

Pseudo-R²: McFadden's measure of improvement over a null model; use for relative comparison, not literal percent variance explained.

AIC/BIC: Information criteria for model comparison. Lower is better. BIC penalizes complexity more heavily.

Condition number: Measures multicollinearity. Values > 30 suggest problematic collinearity; > 100 is severe.

APA-Style Report

Placeholder APA narrative will appear here.

Managerial Interpretation

Business-focused copy referencing scenario inputs appears here.

Coefficient Table (log-odds relative to reference outcome)

Outcome contrast Predictor term Coefficient (log-odds) Std. Error p-value 95% CI
Run the model to view coefficients for each outcome category relative to the reference.
Interpretation Aid
Coefficients are log-odds relative to the reference outcome. Exponentiating a coefficient gives an odds ratio for that contrast. Large standard errors or very wide CIs indicate unstable estimates (often due to sparse categories or collinearity).

This download exports the original uploaded data plus one column for the most likely outcome category and one column per outcome with its predicted probability from the fitted multinomial model.

DIAGNOSTICS & ASSUMPTIONS

Diagnostics & Assumption Tests

Explain assumption checks (sample size, variance, normality, expected counts, leverage points). Populate via JS.