Skip to content

Discrete Choice Tutorials

Learning Path

Prerequisites: Static Models tutorials, basic MLE concepts Time: 3--7 hours Level: Beginner -- Advanced

Overview

Discrete choice models apply when the dependent variable is categorical: a binary outcome (yes/no), an ordered outcome (rating scales), or a multinomial choice (selecting from multiple alternatives). Standard linear estimators are inappropriate for these data types because they can produce predictions outside the valid range and violate distributional assumptions.

These tutorials cover the full spectrum of panel discrete choice models: binary logit and probit (pooled, fixed effects, random effects), ordered models, conditional and multinomial logit, and dynamic discrete choice. You will learn to estimate marginal effects, assess model fit, and test for the IIA assumption in multinomial models.

The Multinomial Logit notebook provides a self-contained introduction to multinomial choice modeling.

Notebooks

# Tutorial Level Time Colab
1 Binary Choice Introduction Beginner 45 min Open In Colab
2 Fixed Effects Logit Intermediate 45 min Open In Colab
3 Random Effects Probit Intermediate 45 min Open In Colab
4 Marginal Effects Intermediate 45 min Open In Colab
5 Conditional Logit (McFadden) Advanced 45 min Open In Colab
6 Multinomial Logit Advanced 45 min Open In Colab
7 Ordered Models Advanced 45 min Open In Colab
8 Dynamic Discrete Choice Advanced 60 min Open In Colab
9 Complete Case Study Advanced 60 min Open In Colab

Learning Paths

Binary Models (3 hours)

Essential binary choice methods:

Notebooks: 1, 2, 3, 4

Covers logit/probit, FE logit, RE probit, and marginal effects. Sufficient for most binary outcome analyses.

Full (7 hours)

Complete discrete choice coverage:

Notebooks: 1--9

Adds conditional logit, multinomial logit, ordered models, dynamic discrete choice, and a case study.

Key Concepts Covered

  • Logit vs Probit: Link functions and interpretation
  • FE Logit (Conditional): Chamberlain's conditional logit for panel data
  • RE Probit: Random effects with Gauss-Hermite quadrature
  • Marginal effects: AME, MEM, and MER for nonlinear models
  • Conditional Logit (McFadden): Choice-specific attributes
  • Multinomial Logit: Unordered multi-category outcomes
  • IIA assumption: Independence of Irrelevant Alternatives
  • Ordered Logit/Probit: Ordered categorical outcomes with thresholds
  • Dynamic models: State dependence vs unobserved heterogeneity

Quick Example

from panelbox.models.discrete import FixedEffectsLogit

# Conditional FE Logit
fe_logit = FixedEffectsLogit(
    data=data,
    formula="outcome ~ x1 + x2 + x3",
    entity_col="id",
    time_col="year"
).fit()

print(fe_logit.summary())

# Marginal effects
me = fe_logit.marginal_effects()
print(me.summary())

Solutions

Tutorial Solution
01. Binary Choice Solution
02. Fixed Effects Logit Solution
03. Random Effects Solution
04. Marginal Effects Solution
05. Conditional Logit Solution
06. Multinomial Logit Solution
07. Ordered Models Solution
08. Dynamic Discrete Solution
09. Case Study Solution