Title | Comparison of the nested logit and the constrained multinomial models | |
Author | William Gould and William Sribney, StataCorp | |
Date | April 1999 |
Consider a choice among {1,2,3} in which you imagine the choice is made
The Nested Logit and Constrained Multinomial models are somewhat related, but clearly different.
r1 = 1 r2 = exp(a2 + X*b2 + Z*c2) r3 = exp(a3 + X*b3 + Z*c3) p1 = Pr(W==1) = r1/(r1+r2+r3) = 1/(1+r2+r3) p2 = Pr(W==2) = r2/(r1+r2+r3) = r2/(1+r2+r3) p3 = Pr(W==3) = r3/(r1+r2+r3) = r3/(1+r2+r3)Here we have (arbitrarily) used group 1 as the base group for normalization. The coefficients to be estimated are a2, b2, c2, a3, b3, and c3. The Relative Risks (RR) are ratios of the probabilities:
RR(W==1 wrt W==1) = Pr(W==1) / Pr(W==1) = r1 = 1 RR(W==2 wrt W==1) = Pr(W==2) / Pr(W==1) = r2 RR(W==3 wrt W==1) = Pr(W==3) / Pr(W==1) = r3Relative Risk Ratios are ratios of the Relative Risks (ratios of ratios!). The Relative Risk Ratio (RRR) for a one-unit change in the corresponding variable, relative to the (arbitrarily chosen) base group (W==1) is simply the exponentiated value of a coefficient. For example,
Pr(W==2|age+1) / Pr(W==1|age+1) ------------------------------- = exp(b2) Pr(W==2|age) / Pr(W==1|age)or, in words, exp(b2) is the RRR of X (age of car), Ford vs. no new purchase.
Here is the verbal interpretation of all the coefficients:
exp(b2) = RRR of X (age of car), Ford vs. no new purchase exp(c2) = RRR of Z (wealth), Ford vs. no new purchase exp(b3) = RRR of X (age of car), Mercedes vs. no new purchase exp(c3) = RRR of Z (wealth), Mercedes vs. no new purchaseThe real trick is learning to think in the Relative Risk metric (meaning r1, r2, and r3).
We want to constrain variable X — age of current car — so that it's effect is to leave p2/p3 unchanged. X affects the overall risk of buying a car (1-p1) but not which car is purchased. Thus, we want to constrain the change in
p2 r2 exp(a2 + X*b2 + Z*c2) -- = -- = --------------------- p3 r3 exp(a3 + X*b3 + Z*c3)to be 0 for a change in X, meaning b2=b3 (because then X*b2 and X*b3 cancel).
If this is the constraint we want, here's the Stata code to do it. Let's assume the variables are named
W carpur, 1=no car, 2=Ford, 3=Mercedes X c_c_age Z wealthThen the Stata code is
. constraint define 1 [2]c_c_age=[3]c_c_cage . mlogit carpur c_cage style wealth, base(1) constrain(1)