0% found this document useful (0 votes)
81 views38 pages

08 Nested 19 PDF

This document discusses nested logit models and uses them to solve the "red bus/blue bus paradox". It introduces the nested logit model, which accounts for correlation between unobserved attributes of similar alternatives. The model is applied to a case study of residential telephone service choice. A multinomial logit model is also estimated for the case study with parameters for each alternative's utility.

Uploaded by

Eduardo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views38 pages

08 Nested 19 PDF

This document discusses nested logit models and uses them to solve the "red bus/blue bus paradox". It introduces the nested logit model, which accounts for correlation between unobserved attributes of similar alternatives. The model is applied to a case study of residential telephone service choice. A multinomial logit model is also estimated for the case study with parameters for each alternative's utility.

Uploaded by

Eduardo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Nested logit models

Michel Bierlaire
[email protected]

Transport and Mobility Laboratory

Nested logit models – p.1/38


Red bus/Blue bus paradox

• Mode choice example


• Two alternatives: car and bus
• There are red buses and blue buses
• Car and bus travel times are equal: T

Nested logit models – p.2/38


Red bus/Blue bus paradox

Model 1
Ucar = βT + εcar
Ubus = βT + εbus

Therefore,

eβT 1
P (car|{car, bus}) = P (bus|{car, bus}) = βT =
e + eβT 2

Nested logit models – p.3/38


Red bus/Blue bus paradox

Model 2
Ucar = βT + εcar
Ublue bus = βT + εblue bus
Ured bus = βT + εred bus

eβT 1
P (car|{car, blue bus, red bus}) = βT =
e + eβT + eβT 3

P (car|{car, blue bus, red bus}) 
 1
P (blue bus|{car, blue bus, red bus}) = .
 3
P (red bus|{car, blue bus, red bus}) 

Nested logit models – p.4/38


Red bus/Blue bus paradox

• Assumption of MNL: ε i.i.d


• εblue bus and εred bus contain common unobserved attributes:
◮ fare
◮ headway
◮ comfort
◮ convenience
◮ etc.

Nested logit models – p.5/38


Capturing the correlation

~
A
 A
 A
 A
 A
 A
 A

~ A~
A Bus Car
 A
 A
 A
 A
 A
 A

~ A~
Blue Red

Nested logit models – p.6/38


Capturing the correlation

If bus is chosen then

Ublue bus = Vblue bus + εblue bus


Ured bus = Vred bus + εred bus

where Vblue bus = Vred bus = βT

eβT 1
P (blue bus|{blue bus, red bus}) = βT =
e + eβT 2

Nested logit models – p.7/38


Capturing the correlation

~
A
 A
 A
 A
 A
 A
 A

~ A~
A Bus Car
 A
 A
 A
 A
 A
 A

~ A~
Blue Red

Nested logit models – p.8/38


Capturing the correlation

What about the choice between bus and car?

Ucar = βT + εcar
Ubus = Vbus + εbus

with
Vbus = Vbus (Vblue bus , Vred bus )
εbus = ?

Define Vbus as the expected maximum utility of red bus and blue bus

Nested logit models – p.9/38


Expected maximum utility

For a set of alternative C , define

UC = max Ui = max(Vi + εi )
i∈C i∈C

and
VC = E[UC ]
For MNL
1 X µVi γ
E[max Ui ] = ln e +
i∈C µ µ
i∈C

Nested logit models – p.10/38


Expected maximum utility

Vbus = µ1b ln(eµb Vblue bus + eµb Vred bus )


= µ1b ln(eµb βT + eµb βT )
= βT + µ1b ln 2

where µb is the scale parameter for the MNL associated with the
choice between red bus and blue bus

Nested logit models – p.11/38


Nested Logit Model

Probability model:

eµVcar eµβT 1
P (car) = µVcar = µβT + µµ
= µ
e + eµVbus eµβT +e b
ln 2
1+2 µb

If µ = µb , then P(car) = 31 (Model 2)


If µb → ∞, then µµb → 0, and P(car) → 1
2 (Model 1)
Note for µb → ∞

µVbus 1 µVred bus 1 µVblue bus


e = e + e
2 2

Nested logit models – p.12/38


Nested Logit Model

Probability model:

µVbus µβT + µµ ln 2
e e b 1
P (bus) = = µβT + µµ ln 2
= − µµ
eµVcar + eµVbus eµβT +e b 1+2 b

If µ = µb , then P(bus) = 32 (Model 2)


If µµb → 0, then P(bus) → 21 (Model 1)

Nested logit models – p.13/38


Nested Logit Model

1
P(car)
P(bus)

0.8

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1
mu/mu_b

µ
µb

Nested logit models – p.14/38


Solving the paradox

µ
If µb → 0, we have

P (car) = 1/2
P (bus) = 1/2
P (red bus|bus) = 1/2
P (blue bus|bus) = 1/2
P (red bus) = P (red bus|bus)P (bus) = 1/4
P (blue bus) = P (blue bus|bus)P (bus) = 1/4

Nested logit models – p.15/38


Comments

• A group of similar alternatives is called a nest


• Each alternative belongs to exactly one nest
• The model is named Nested Logit
• The ratio µ/µb must be estimated from the data
• 0 < µ/µb ≤ 1 (between models 1 and 2)

Nested logit models – p.16/38


A case study

• Choice of a residential telephone service


• Household survey conducted in Pennsylvania, USA, 1984
• Revealed preferences
• 434 observations

Nested logit models – p.17/38


A case study

Availability of telephone service by residential area:

Adjacent to Other
Metro metro non-metro
area area areas
Budget Measured yes yes yes
Standard Measured yes yes yes
Local Flat yes yes yes
Extended Area Flat no yes no
Metro Area Flat yes yes no

Nested logit models – p.18/38


Multinomial Logit Model

C = {BM, SM, LF, EF, MF}

VBM = βBM + βc ln(costBM )


VSM = βSM + βc ln(costSM )
VLF = βLF + βc ln(costLF )
VEF = βEF + βc ln(costEF )
VMF = βc ln(costMF )

eVi
P (i|C) = P Vj
j∈C e

Nested logit models – p.19/38


Multinomial Logit Model

Parameter MNL
Value (t-stat)
βBM -2.46 (-7.84)
βSM -1.74 (-6.28)
βLF -0.54 (-2.57)
βEF -0.74 (-1.02)
βc -2.03 (-9.47)
L0 -560.25
L -477.56
# Obs 434

Nested logit models – p.20/38


Nested Logit Model

~
@
@
@
@
@
@
@
~Measured @~Flat
@ @
@ @
@ @
~ @~ ~ ~ @~
BM SM LF EF MF

Nested logit models – p.21/38


Nested Logit Model

Model of the choice among “measured” alternatives

eVi
P (i|M ) = V i = BM, SM
e BM + eVSM
We estimate the model with the 196 observations choosing either
BM or SM, and calculate the inclusive value

IM = ln(eVBM + eVSM )

for all observations (scale normalized to 1)

Nested logit models – p.22/38


Nested Logit Model

Parameter MNL Measured


Value (t-stat) Value (t-stat)
βBM -2.46 (-7.84)
βSM -1.74 (-6.28) 0.76 (4.53)
βLF -0.54 (-2.57)
βEF -0.74 (-1.02)
βc -2.03 (-9.47) -3.12 (-4.76)
L0 -560.3 -135.9
L -477.6 -116.8
# Obs 434 196

Nested logit models – p.23/38


Nested Logit Model

Model of the choice among “flat” alternatives

eVi
P (i|M ) = i = LF, EF, MF
eVLF + eVEF + eVMF
We estimate the model with the 238 observations choosing LF, EF
or MF and calculate the inclusive value

IF = ln(eVLF + eVEF + eVMF )

for all observations (scale normalized to 1)

Nested logit models – p.24/38


Nested Logit Model

Parameter MNL Measured Flat


Value (t-stat) Value (t-stat) Value (t-stat)
βBM -2.46 (-7.84)
βSM -1.74 (-6.28) 0.76 (4.53)
βLF -0.54 (-2.57) -1.21 (-3.17)
βEF -0.74 (-1.02) -1.42 (-1.55)
βc -2.03 (-9.47) -3.12 (-4.76) -3.73 (-6.22)
L0 -560.3 -135.9 -129.5
L -477.6 -116.8 -79.4
# Obs 434 196 238

Nested logit models – p.25/38


Nested Logit Model

Model of the choice of type of service

eµ(β̃M +IM ) eβM +µIM


P (M ) = = βM +µIM
eµ(β̃M +IM ) + eµIF e + eµIF

eµIF eµIF
P (F ) = = βM +µIM
eµ(β̃M +IM ) + eµIF e + eµIF
• IM and IF are attributes of measured and flat, resp.
• βM = µβ̃M and µ are unknown parameters, to be estimated.
• 0<µ≤1

Nested logit models – p.26/38


Nested Logit Model

Parameter MNL Measured Flat Nested Logit


Value (t-stat) Value (t-stat) Value (t-stat) Value (t-stat)
βBM -2.46 (-7.84)
βSM -1.74 (-6.28) 0.76 (4.53)
βLF -0.54 (-2.57) -1.21 (-3.17)
βEF -0.74 (-1.02) -1.42 (-1.55)
βc -2.03 (-9.47) -3.12 (-4.76) -3.73 (-6.22)
βM -2.32 (-5.67)
µ 0.43 (5.49)
L0 -560.3 -135.9 -129.5 -300.8
L -477.6 -116.8 -79.4 -280.4
# Obs 434 196 238 434

Nested logit models – p.27/38


Nested Logit Model

How to interpret the log-likelihood?


Assume that individual n has chosen alt. i in nest M .

Pn (i) = Pn (i|M )Pn (M )

Consider now all individuals choosing an alt. i in nest M


X X X X
ln Pn (i) = ln Pn (i|M )+ ln Pn (M ) = LM + ln Pn (M )
n n n n

For individuals choosing an alternative j in nest F , we have


X X X X
ln Pn (j) = ln Pn (i|F )+ ln Pn (F ) = LF + ln Pn (F )
n n n n

Nested logit models – p.28/38


Nested Logit Model

Therefore, we obtain that

L = LM + LF + LNL

Nested logit models – p.29/38


Nested Logit Model

Parameter MNL Measured Flat Nested Logit


Value (t-stat) Value (t-stat) Value (t-stat) Value (t-stat)
βBM -2.46 (-7.84)
βSM -1.74 (-6.28) 0.76 (4.53)
βLF -0.54 (-2.57) -1.21 (-3.17)
βEF -0.74 (-1.02) -1.42 (-1.55)
βc -2.03 (-9.47) -3.12 (-4.76) -3.73 (-6.22)
βM -2.32 (-5.67)
µ 0.43 (5.49)
L0 -560.3 -135.9 -129.5 -300.8 [-566.2]
L -477.6 -116.8 -79.4 -280.4 [-476.6]
# Obs 434 196 238 434

Nested logit models – p.30/38


Nested Logit Model

Which value of βc should we use?


Measured: -3.12 (-4.76) or Flat: -3.73 (-6.22)
Equal βc ’s:
• Jointly estimate measured and flat models and constrain βC to
be equal
• Declare “Measured” alternatives unavailable when a “Flat”
alternative is chosen, and vice versa.

Nested logit models – p.31/38


Nested Logit Model

Parameter MNL Nested Logit


Value (t-stat) Value (t-stat)
βBM -2.46 (-7.84)
βSM -1.74 (-6.28) 0.79 (4.80)
βLF -0.54 (-2.57) -1.07 (-3.49)
βEF -0.74 (-1.02) -1.28 (-1.46)
βc -2.03 (-9.47) -3.47 (-8.01)
βM -1.66 (-5.92)
µ 0.42 (5.85)
L0 -560.3 -566.2
L -477.6 -473.6
# Obs 434 434

Nested logit models – p.32/38


Nested Logit Model

Multinomial Logit:

eVBM
P (BM) = P V
e
j∈C j

Nested Logit:

P (BM) = P (BM|M )P (M )
eVBM eβM +µIM
=
eVBM + eVSM eβM +µIM + eµIF V V
eVBM eβM +µ ln(e BM +e SM )
=
eVBM + eVSM eβM +µ ln(eVBM +eVSM ) + eµ ln(eVLF +eVEF +eVMF )

Nested logit models – p.33/38


Nested Logit Model

Let µ = 1

P (BM)
V V
eVBM eβM +ln(e BM +e SM )
=
eVBM + eVSM eβM +ln(eVBM +eVSM ) + eln(eVLF +eVEF +eVMF )

eVBM eβM (eVBM + eVSM )


=
eVBM + eVSM eβM (eVBM + eVSM ) + eVLF + eVEF + eVMF

eVBM
= eVBM +eVSM +eVLF −βM +eVEF −βM +eVMF −βM

Nested logit models – p.34/38


Nested Logit Model

S
In general, if C = m=1,...M Cm ,


µm Vi µVm
e e
P (i|Cm ) = P µm Vi
and P (Cm |C) = P ′
µVk
j∈Cm e k=1,...,m e

where
1 X
Vm′ = ln (eµm Vi )
µm
i∈Cm
µ
When µm = 1, for all m, NL becomes MNL

Nested logit models – p.35/38


Simultaneous estimation

P (i|C) = P (i|Cm )P (Cm |C)


Note that each i belongs to exactly one nest m i.e. the Cm ’s do not overlap
The log-likelihood for observation n is

ln P (in |Cn ) = ln P (in |Cmn ) + ln P (Cmn |Cn )

where in is the chosen alternative.

Nested logit models – p.36/38


Simultaneous estimation

Sequential estimation:
• Estimation of NL decomposed into two estimations of MNL
• Estimator is consistent but not efficient
Simultaneous estimation:
• Log-likelihood function is generally non concave
• No guarantee of global maximum
• Estimator asymptotically efficient

Nested logit models – p.37/38


Simultaneous estimation

Parameter MNL Seq. Nested Logit Sim. Nested Logit


Value (t-stat) Value (t-stat) Value (t-stat)
βBM -2.46 (-7.84) -3.79 (-6.28)
βSM -1.74 (-6.28) 0.79 (4.80) -3.00 (-5.32)
βLF -0.54 (-2.57) -1.07 (-3.49) -1.09 (-3.57)
βEF -0.74 (-1.02) -1.28 (-1.46) -1.19 (-1.41)
βc -2.03 (-9.47) -3.47 (-8.01) -3.25 (-6.99)
βM -1.66 (-5.92)
µ 0.42 (5.85) 0.46 (4.17)
L0 -560.3 -566.2 -560.3
L -477.6 -473.6 -473.3
# Obs 434 434 434
Compare βM = −1.66 and µβBM = −1.74
Compare βSM − βBM = 0.79 for Seq. and Sim.

Nested logit models – p.38/38

You might also like