Statistics Glossary → Conditional Logit (Choice Model)
Conditional Logit (Choice Model)analysis
A model for situations in which a person chooses one of several alternatives, estimating how the alternatives' features (price, time, quality) affect the probability of being chosen by comparing within each choice set.
Concept
Many decisions are 'which one do I pick?' questions: do I commute by car, bus or metro; which occupation or product do I choose? The outcome is not a single number but a choice among a set of alternatives, and the probability of choosing one depends on how attractive it is relative to the others. Conditional logit looks at each choice set on its own and estimates how features such as price or travel time shift the choice. The same model is used as conditional logistic regression in matched case-control studies, where each case is matched with its own controls.
Each alternative receives a utility score built from its features (V = β₁·cost + β₂·time + …), and the probability of choosing an alternative is the exponential of its utility divided by the sum of the exponentials over all alternatives in the set: P(j) = exp(V_j) / Σ exp(V_k). The exponential of a coefficient is an odds ratio: it shows by what factor the odds of choosing that alternative change when the feature rises by one unit. Characteristics of the person that are the same across the set (age, income) cancel out in the comparison, so they can enter the model only as interactions with the alternatives.
The key assumption is the independence of irrelevant alternatives (IIA): the ratio of the probabilities of two alternatives is unaffected by adding or removing another alternative. When some alternatives are very similar (e.g. two different bus lines), this may be unrealistic. Fit is summarised by McFadden's R², which is usually much lower than the R² of linear regression and should not be read on the same scale.
When to use it
- When each observation is a single choice made from a set of alternatives and the features vary from alternative to alternative (travel mode, product or brand choice, choice experiments).
- In matched case-control studies, where each case is matched with one or more controls, to estimate odds ratios for risk factors while respecting the matching.
- If there are only characteristics of the person, multinomial logistic regression is enough; if IIA fails because some alternatives are similar, nested logit or mixed logit models are preferred.
An everyday example
A city council studies how 300 employees choose between car, bus, metro and bicycle for their commute. For each person the travel time and cost of all four options are known, and the person chose one of them. Conditional logit compares each person's four options against one another and might find that every extra 10 minutes of travel time cuts the odds of an option being chosen by about 20%. With this, the council can predict how much running the metro more often would change metro use.
Parameters in MerQur
Alternative features
Concept: Alternative features are attributes that vary across the options in a choice set; the model's coefficients show how they affect the probability of being chosen.
Everyday example: In the commuting example, travel time and cost differ for each option: the car is fast but expensive, the bicycle cheap but slow. These two features are the model's explanatory variables.
What it does: Selects the numeric attributes that influence the choice and vary from alternative to alternative.
Effect on the result: Coefficients, odds ratios and tests.
On the validation data: TravelMode (wait, gcost): wait β = -0.0130 (SE 0.0029), gcost β = -0.0106 (SE 0.0035); log-likelihood -270.108, McFadden R² = 0.0722.
Chooser column
Concept: The choice-set identifier marks which rows belong to the same decision. The model compares only alternatives within the same set; in matched case-control studies, this identifier is the matched set.
Everyday example: Each employee's four rows (car, bus, metro, bicycle) share the same person number. The model compares Ayşe's choice of the metro only with the four options open to Ayşe, not with anyone else's options.
What it does: The choice set or matched set identifier (strata). Exactly one choice is required in each set (m:n matching is not supported); since exact, Efron and Breslow give the same coefficient in a set with a single event, no ties-method option is needed.
Effect on the result: Set structure.
On the validation data: In single-choice sets the three ties methods give the same result; a validation error is given for m:n matching.
Chosen column (0/1)
Concept: The chosen indicator marks with 1 the option actually picked in each set and the others with 0. Exactly one option must be chosen in each set.
Everyday example: If Ayşe chose the metro, the metro row gets 1 and the car, bus and bicycle rows get 0.
What it does: Specifies the indicator that is 1 if the row's alternative was chosen and 0 otherwise. For data labeled "yes/no", choice01 is derived as yes = 1, no = 0.
Effect on the result: All results.
On the validation data: TravelMode choice01 = (choice == "yes").
Alternative ID (optional)
Concept: The alternative identifier states which option each row belongs to (car, bus…). It is needed for alternative-specific constants and for interactions with characteristics of the person.
Everyday example: Once the rows are labelled 'car', 'bus', 'metro' and 'bicycle', the model can also ask whether the metro has a general appeal of its own, independent of time and cost.
What it does: Specifies the alternative identifier for the per-alternative share in ASC and chooser-attribute interactions; by itself it does not change the result (reporting only).
Effect on the result: Needed only for ASC, interaction and share outputs.
On the validation data: When the alternative ID is selected alone, the output does not change (expected).
Confidence Level (%90, %95, %99, custom)
Concept: Sets the confidence level of the interval estimates for the coefficients and odds ratios; the higher the level, the wider the interval.
Everyday example: If the odds ratio for every extra 10 minutes is between 0.75 and 0.86 with 95% confidence, the interval widens somewhat at 99%. As long as the interval excludes 1, the direction of the time effect is clear.
What it does: Sets the level of the Wald confidence interval (b +- z SE) and the odds ratio interval.
Effect on the result: Intervals only.
On the validation data: Example 78.11 Gall OR 95% [0.927, 7.293].
Categorical predictors
Concept: A categorical feature enters the model as dummy (0/1) variables; each dummy coefficient shows the difference between that level and the base (first) level.
Everyday example: If the options' comfort is coded 'low, medium, high', the model estimates separate coefficients for 'medium' and 'high', both read relative to low-comfort options.
What it does: Expands an alternative-specific categorical variable into dummy variables (the first level is the baseline level). A model can also be built with a categorical predictor alone.
Effect on the result: Coefficients and OR.
On the validation data: infert induced (0/1/2) categorical: the induced[1] and induced[2] dummies are estimated against the first level (0). In logan, a model can be built with only a categorical predictor.
Chooser attributes (× alternative)
Concept: Characteristics of the person, such as age or income, are the same for all options in the set and cancel out in the comparison. They can therefore enter only when multiplied by the alternatives (interactions), answering 'which option does this characteristic make more attractive?'.
Everyday example: Income cannot enter on its own, because Ayşe's income is the same for all four options. An 'income x car' interaction instead shows whether the car is chosen more often relative to the other options as income rises.
What it does: Brings into the model the chooser attributes that are constant within a choice set (age, income, education) by multiplying them with alternative dummies (the alternative ID is required).
Effect on the result: Interaction coefficients.
On the validation data: logan education x occupation interaction: LR 665.5.
Cluster (person) column - robust SE
Concept: When the same person makes several choices, those choices are not independent. Cluster-robust (sandwich) standard errors account for this dependence and give a more realistic uncertainty for the coefficients.
Everyday example: If each employee chose separately on five different working days, someone who loves driving picks the car on all five. Person-level robust SEs correct the false sense of precision that comes from treating 1,500 choices as 1,500 independent people.
What it does: If the same person appears in more than one choice set, gives a cluster-robust sandwich SE by person ID (an additional table).
Effect on the result: SE and intervals only.
On the validation data: infert (63 clusters): spontaneous SE 0.3524, robust SE 0.3701.
Additional output: Alternative-specific constants (ASC)
Concept: Alternative-specific constants (ASCs) represent the general appeal not explained by the measured features: how much an option is preferred over the others even when time and cost are equal.
Everyday example: Even at equal time and cost, people may prefer the metro to the bus (more punctual, less crowded). A positive ASC for the metro captures this unmeasured advantage.
What it does: Adds alternative ID dummies (unmeasured alternative attractiveness) to the model; the baseline alternative can be selected. A warning is given when there is no alternative ID.
Effect on the result: ASC coefficients and model fit.
On the validation data: TravelMode, baseline alternative car: ASC[air] 5.20744, ASC[train] 3.86904, ASC[bus] 3.16319 (the Greene Table 21.11 model).
ASC reference alternative
Concept: Because the constants are meaningful only relative to each other, one option is taken as the base and its constant is set to 0; the others are read relative to it. Changing the base changes only how the coefficients are read, not the model's fit.
Everyday example: With the car as base, the reading is 'how attractive is the metro compared with the car?'; with the bicycle as base, the same information appears as 'how attractive are the car and metro compared with the bicycle?'.
What it does: Determines the baseline alternative whose coefficient is taken as 0 in ASC and chooser-attribute x alternative interactions (written with the value in the alternative ID).
Effect on the result: The expression of the ASC and interaction coefficients; model fit does not change.
On the validation data: Baseline alternative air: ASC[bus] -2.0442, ASC[car] -5.2074, ASC[train] -1.3384; the values with baseline alternative car are given above.
Additional output: Predicted choice probabilities and hit rate
Concept: The model computes, for each person, the probability of choosing each option. The hit rate is the percentage of sets in which the option given the highest probability was actually chosen; predicted and observed shares of each option are also compared.
Everyday example: If the model gives Ayşe 55% for the metro, 25% for the bus, 15% for the car and 5% for the bicycle, and she chose the metro, that is a hit. With hits for 200 of 300 employees, the hit rate is about 67%.
What it does: Gives p_ij = exp(x_ij' b) / sum exp(x_ik' b), the hit rate (the percentage of sets in which the most probable alternative is the chosen one) and the mean predicted and observed share per alternative.
Effect on the result: An additional table only.
On the validation data: TravelMode (with ASC) hit rate 69.05%; in the model with ASC the predicted shares equal the observed shares (a property of conditional logit).
Example on real data
Data: Greene TravelMode, R AER
Variables: chooser individual (210 people, 4 travel modes), chosen choice01, alternative attributes gcost (generalised cost) and wait (waiting time)
- Question: In the choice of 210 travelers among four travel modes (air, train, bus, car), how do the terminal waiting time (wait) and the generalized cost (gcost) affect the probability of being chosen?
- Model test: LR χ²(2) = 42.03, p < .001 (Wald 41.12, score 43.66); the two attributes jointly explain the choice significantly.
- Result: As waiting time (β = -0.0130, z = -4.49, p < .001) and cost (β = -0.0106, z = -3.07, p = .002) increase, the probability that an alternative is chosen decreases.
- Effect size: Each 1-minute increase in waiting time lowers the odds of being chosen by 1.3% (OR = 0.987, 95% CI [0.982, 0.993]); a 1-unit increase in cost lowers it by 1.1% (OR = 0.989 [0.983, 0.996]).
- Model fit: McFadden R² = .07 (relative to the equal-probability null model, LL0 = -291.12); AIC = 544.22, BIC = 550.91. The fit is weak; without alternative-specific constants (ASC) and individual variables such as income, explanatory power stays limited.
- APA: Conditional logit, LR χ²(2, N = 210) = 42.03, p < .001, McFadden R² = .07; waiting OR = 0.99, 95% CI [0.98, 0.99], p < .001.
Related concepts
Alternative-specific constants (ASC)Cluster-robust (clustered) standard errorsOdds ratio (OR)Interaction effectDummy (indicator) variable codingClassification table (confusion matrix)Reference category (comparison level)Robust (sandwich) standard errors (HC0-HC3)
The numbers in the examples are MerQur's output on independent, publicly available validation data; see the MerQur Technical Note for details.