mixture models — simulation-based estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268...
TRANSCRIPT
![Page 1: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/1.jpg)
Mixture Models — Simulation-basedEstimation
Michel Bierlaire
Transport and Mobility Laboratory
Mixture Models — Simulation-based Estimation – p. 1/72
![Page 2: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/2.jpg)
Outline
• Mixtures
• Capturing correlation
• Alternative specific variance
• Taste heterogeneity
• Latent classes
• Simulation-based estimation
Mixture Models — Simulation-based Estimation – p. 2/72
![Page 3: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/3.jpg)
Mixtures
In statistics, a mixture probability distribution function is a convexcombination of other probability distribution functions.If f(ε, θ) is a distribution function, and if w(θ) is a non negativefunction such that
∫
θ
w(θ)dθ = 1
then
g(ε) =
∫
θ
w(θ)f(ε, θ)dθ
is also a distribution function. We say that g is a w-mixture of f .If f is a logit model, g is a continuous w-mixture of logitIf f is a MEV model, g is a continuous w-mixture of MEV
Mixture Models — Simulation-based Estimation – p. 3/72
![Page 4: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/4.jpg)
Mixtures
Discrete mixtures are also possible. If wi, i = 1, . . . , n are nonnegative weights such that
n∑
i=1
wi = 1
then
g(ε) =
n∑
i=1
wif(ε, θi)
is also a distribution function where θi, i = 1, . . . , n are parameters.We say that g is a discrete w-mixture of f .
Mixture Models — Simulation-based Estimation – p. 4/72
![Page 5: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/5.jpg)
Example: discrete mixture of normal distributions
0
0.5
1
1.5
2
2.5
4 5 6 7 8 9 10 11
N(5,0.16)N(8,1)
0.6 N(5,0.16) + 0.4 N(8,1)
Mixture Models — Simulation-based Estimation – p. 5/72
![Page 6: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/6.jpg)
Example: discrete mixture of binary logit models
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
-4 -2 0 2 4
P(1|s=1,x)P(1|s=2,x)
0. 4 P(1|s=1,x) + 0.6 P(1|s=2,x)
Mixture Models — Simulation-based Estimation – p. 6/72
![Page 7: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/7.jpg)
Mixtures
• General motivation: generate flexible distributional forms
• For discrete choice:• correlation across alternatives• alternative specific variances• taste heterogeneity• . . .
Mixture Models — Simulation-based Estimation – p. 7/72
![Page 8: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/8.jpg)
Back to the telephone example
Budget measured: UBM = αBM + βXBM + εBM
Standard measured: USM = αSM + βXSM + εSM
Local flat: ULF = αLF + βXLF + εLF
Extended area flat: UEF = αEF + βXEF + εEF
Metro area flat: UMF = βXMF + εMF
Distributions for ε: logit, probit, nested logit
Mixture Models — Simulation-based Estimation – p. 8/72
![Page 9: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/9.jpg)
Back to the telephone example
Covariance of U
Logit Probit
σ20 0 0 0
0 σ20 0 0
0 0 σ20 0
0 0 0 σ20
0 0 0 0 σ2
σ2
BM σBM,SM σBM,LF σBM,EF σBM,MF
σBM,SM σ2
SM σSM,LF σSM,EF σSM,MF
σBM,LF σSM,LF σ2
LF σLF,EF σLF,MF
σBM,EF σSM,EF σLF,EF σ2
EF σEF,MF
σBM,MF σSM,MF σLF,MF σEF,MF σ2
MF
Nested logit
π2
6µ2
1 ρM 0 0 0
ρM 1 0 0 0
0 0 1 ρF ρF
0 0 ρF 1 ρF
0 0 ρF ρF 1
, ρi = 1−
µ2
µ2
i
Mixture Models — Simulation-based Estimation – p. 9/72
![Page 10: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/10.jpg)
Continuous Mixtures of logit
• Combining probit and logit
• Error decomposed into two parts
Uin = Vin + ξ + ν
i.i.d EV (logit): tractabilityNormal distribution (probit): flexibility
Mixture Models — Simulation-based Estimation – p. 10/72
![Page 11: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/11.jpg)
Logit
• Utility:
Uauto = βXauto + νauto
Ubus = βXbus + νbus
Usubway = βXsubway + νsubway
• ν i.i.d. extreme value
• Probability:
Pr(auto|X) =eβXauto
eβXauto + eβXbus + eβXsubway
Mixture Models — Simulation-based Estimation – p. 11/72
![Page 12: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/12.jpg)
Normal mixture of logit
• Utility:
Uauto = βXauto + ξauto + νauto
Ubus = βXbus + ξbus + νbus
Usubway = βXsubway + ξsubway + νsubway
• ν i.i.d. extreme value, ξ ∼ N(0,Σ)
• Probability:
Pr(auto|X, ξ) =eβXauto+ξauto
eβXauto+ξauto + eβXbus+ξbus + eβXsubway+ξsubway
P (auto|X) =
∫
ξ
Pr(auto|X, ξ)f(ξ)dξ
Mixture Models — Simulation-based Estimation – p. 12/72
![Page 13: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/13.jpg)
Simulation
P (auto|X) =
∫
ξ
Pr(auto|X, ξ)f(ξ)dξ
• Integral has no closed form.
• Monte Carlo simulation must be used.
Mixture Models — Simulation-based Estimation – p. 13/72
![Page 14: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/14.jpg)
Simulation
• In order to approximate
P (i|X) =
∫
ξ
Pr(i|X, ξ)f(ξ)dξ
• Draw from f(ξ) to obtain r1, . . . , rR
• Compute
P (i|X) ≈ P (i|X) =1
R
R∑
k=1
P (i|X, rk)
=1
R
R∑
k=1
eV1n+rk
eV1n+rk + eV2n+rk + eV3n
Mixture Models — Simulation-based Estimation – p. 14/72
![Page 15: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/15.jpg)
Capturing correlations: nesting
• Utility:
Uauto = βXauto + νauto
Ubus = βXbus + σtransitηtransit + νbus
Usubway = βXsubway + σtransitηtransit + νsubway
• ν i.i.d. extreme value, ηtransit ∼ N(0, 1), σ2transit =cov(bus,subway)
• Probability:
Pr(auto|X, ηtransit) =eβXauto
eβXauto + eβXbus+σtransitηtransit + eβXsubway+σtransitηtransit
P (auto|X) =
∫
η
Pr(auto|X, η)f(η)dη
Mixture Models — Simulation-based Estimation – p. 15/72
![Page 16: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/16.jpg)
Nesting structure
Example: residential telephoneASC_BM ASC_SM ASC_LF ASC_EF BETA_C σM σF
BM 1 0 0 0 ln(cost(BM)) ηM 0
SM 0 1 0 0 ln(cost(SM)) ηM 0
LF 0 0 1 0 ln(cost(LF)) 0 ηF
EF 0 0 0 1 ln(cost(EF)) 0 ηF
MF 0 0 0 0 ln(cost(MF)) 0 ηF
Mixture Models — Simulation-based Estimation – p. 16/72
![Page 17: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/17.jpg)
Nesting structure
Identification issues:
• If there are two nests, only one σ is identified
• If there are more than two nests, all σ’s are identified
Walker (2001)Results with 5000 draws..
Mixture Models — Simulation-based Estimation – p. 17/72
![Page 18: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/18.jpg)
NL NML NML NML NMLσF = 0 σM = 0 σF = σM
L -473.219 -472.768 -473.146 -472.779 -472.846
Value Scaled Value Scaled Value Scaled Value Scaled Value Scaled
ASC BM -1.784 1.000 -3.81247 1.000 -3.79131 1.000 -3.80999 1.000 -3.81327 1.000ASC EF -0.558 0.313 -1.19899 0.314 -1.18549 0.313 -1.19711 0.314 -1.19672 0.314ASC LF -0.512 0.287 -1.09535 0.287 -1.08704 0.287 -1.0942 0.287 -1.0948 0.287
ASC SM -1.405 0.788 -3.01659 0.791 -2.9963 0.790 -3.01426 0.791 -3.0171 0.791B LOGCOST -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854
FLAT 2.292MEAS 2.063
σF 3.02027 0 3.06144 2.17138σM 0.52875 3.024833 0 2.17138
σ2
F + σ2
M 9.402 9.150 9.372 9.430
![Page 19: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/19.jpg)
Comments
• The scale of the parameters is different between NL and themixture model
• Normalization can be performed in several ways• σF = 0
• σM = 0
• σF = σM
• Final log likelihood should be the same
• But... estimation relies on simulation
• Only an approximation of the log likelihood is available
• Final log likelihood with 50000 draws:Unnormalized: -472.872 σM = σF : -472.875σF = 0: -472.884 σM = 0: -472.901
Mixture Models — Simulation-based Estimation – p. 18/72
![Page 20: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/20.jpg)
Cross nesting
⑤ ⑤ ⑤ ⑤ ⑤
⑤ ⑤
⑤
Bus Train Car Ped. Bike
Nest 1 Nest 2
PPPPPPP
Ubus = Vbus +ξ1 +εbus
Utrain = Vtrain +ξ1 +εtrain
Ucar = Vcar +ξ1 +ξ2 +εcar
Uped = Vped +ξ2 +εped
Ubike = Vbike +ξ2 +εbike
P (car) =∫
ξ1
∫
ξ2
P (car|ξ1, ξ2)f(ξ1)f(ξ2)dξ2dξ1
Mixture Models — Simulation-based Estimation – p. 19/72
![Page 21: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/21.jpg)
Identification issue
• Not all parameters can be identified
• For logit, one ASC has to be constrained to zero
• Identification of NML is important and tricky
• See Walker, Ben-Akiva & Bolduc (2007) for a detailed analysis
Mixture Models — Simulation-based Estimation – p. 20/72
![Page 22: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/22.jpg)
Alternative specific variance
• Error terms in logit are i.i.d. and, in particular, have the samevariance
Uin = βTxin + ASCi + εin
• εin i.i.d. extreme value ⇒ Var(εin) = π2/6µ2
• In order allow for different variances, we use mixtures
Uin = βTxin + ASCi + σiξi + εin
where ξi ∼ N(0, 1)
• Variance:
Var(σiξi + εin) = σ2i +
π2
6µ2
Mixture Models — Simulation-based Estimation – p. 21/72
![Page 23: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/23.jpg)
Alternative specific variance
Identification issue:
• Not all σs are identified
• One of them must be constrained to zero
• Not necessarily the one associated with the ASC constrained tozero
• In theory, the smallest σ must be constrained to zero
• In practice, we don’t know a priori which one it is
• Solution:1. Estimate a model with a full set of σs2. Identify the smallest one and constrain it to zero.
Mixture Models — Simulation-based Estimation – p. 22/72
![Page 24: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/24.jpg)
Alternative specific variance
Example with Swissmetro
ASC_CAR ASC_SBB ASC_SM B_COST B_FR B_TIME
Car 1 0 0 cost 0 time
Train 0 0 0 cost freq. time
Swissmetro 0 0 1 cost freq. time
+ alternative specific variance
Mixture Models — Simulation-based Estimation – p. 23/72
![Page 25: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/25.jpg)
Logit ASV ASV norm.
L -5315.39 -5241.01 -5242.10
Value Scaled Value Scaled Value Scaled
ASC CAR 0.189 1.000 0.248 1.000 0.241 1.000ASC SM 0.451 2.384 0.903 3.637 0.882 3.657B COST -0.011 -0.057 -0.018 -0.072 -0.018 -0.073
B FR -0.005 -0.028 -0.008 -0.031 -0.008 -0.032B TIME -0.013 -0.067 -0.017 -0.069 -0.017 -0.071
SIGMA CAR 0.020SIGMA TRAIN 0.039 0.061
SIGMA SM 3.224 3.180
![Page 26: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/26.jpg)
Identification issue: process
Examine the variance-covariance matrix
1. Specify the model of interest
2. Take the differences in utilities
3. Apply the order condition: necessary condition
4. Apply the rank condition: sufficient condition
5. Apply the equality condition: verify equivalence
Mixture Models — Simulation-based Estimation – p. 24/72
![Page 27: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/27.jpg)
Heteroscedastic: specification
U1 = βx1 +σ1ξ1 +ε1
U2 = βx2 +σ2ξ2 +ε2
U3 = βx3 +σ3ξ3 +ε3
U4 = βx4 +σ4ξ4 +ε4
where ξi ∼ N(0, 1), εi ∼ EV (0, µ)
Cov(U) =
σ21 + γ/µ2 0 0 0
0 σ22 + γ/µ2 0 0
0 0 σ23 + γ/µ2 0
0 0 0 σ24 + γ/µ2
Mixture Models — Simulation-based Estimation – p. 25/72
![Page 28: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/28.jpg)
Heteroscedastic: differences
U1 − U4 = β(x1 − x4) + (σ1ξ1 − σ4ξ4) + (ε1 − ε4)
U2 − U4 = β(x2 − x4) + (σ2ξ2 − σ4ξ4) + (ε2 − ε4)
U3 − U4 = β(x3 − x4) + (σ3ξ3 − σ4ξ4) + (ε3 − ε4)
Cov(∆U) =
σ21 + σ2
4 + 2γ/µ2 σ24 + γ/µ2 σ2
4 + γ/µ2
σ24 + γ/µ2 σ2
2 + σ24 + 2γ/µ2 σ2
4 + γ/µ2
σ24 + γ/µ2 σ2
4 + γ/µ2 σ23 + σ2
4 + 2γ/µ2
Mixture Models — Simulation-based Estimation – p. 26/72
![Page 29: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/29.jpg)
Heteroscedastic: order condition
• S is the number of estimable parameters
• J is the number of alternatives
S ≤ J(J − 1)
2− 1
• It represents the number of entries in the lower part of the(symmetric) var-cov matrix
• minus 1 for the scale
• J = 4 implies S ≤ 5
Mixture Models — Simulation-based Estimation – p. 27/72
![Page 30: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/30.jpg)
Heteroscedastic: rank condition
Idea
• Number of estimable parameters =
• number of linearly independent equations
• -1 for the scale
Cov(∆U) =
σ21 + σ2
4 + 2γ/µ2
σ24 + γ/µ2 σ2
2 + σ24 + 2γ/µ2
σ24 + γ/µ2 σ2
4 + γ/µ2 σ23 + σ2
4 + 2γ/µ2
dependent scale
Mixture Models — Simulation-based Estimation – p. 28/72
![Page 31: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/31.jpg)
Heteroscedastic: rank condition
Three parameters out of five can be estimatedFormally...
1. Identify unique elements of Cov(∆U )
2. Compute the Jacobian wrt σ21, σ2
2, σ23, σ2
4, γ/µ2
3. Compute the rank
σ21 + σ2
4 + 2γ/µ2
σ22 + σ2
4 + 2γ/µ2
σ23 + σ2
4 + 2γ/µ2
σ24 + γ/µ2
1 0 0 1 2
0 1 0 1 2
0 0 1 1 2
0 0 0 1 1
S = Rank - 1 = 3
Mixture Models — Simulation-based Estimation – p. 29/72
![Page 32: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/32.jpg)
Heteroscedastic: equality condition
1. We know how many parameters can be identified
2. There are infinitely many normalizations
3. The normalized model is equivalent to the original one
4. Obvious normalizations, like constraining extra-parameters to 0or another constant, may not be valid
Mixture Models — Simulation-based Estimation – p. 30/72
![Page 33: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/33.jpg)
Heteroscedastic: equality condition
Un = βTxn + Lnξn + εn
Cov(Un) = LnLTn + (γ/µ2)I
Cov(∆jUn) = ∆jLnLTn∆
Tj + (γ/µ2)∆j∆
Tj
Notations:
∆2 =
(
1 −1 0
0 −1 1
)
Cov(∆jUn) = Ωn = Σn + Γn
Ωnormn = Σnorm
n + Γnormn
Mixture Models — Simulation-based Estimation – p. 31/72
![Page 34: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/34.jpg)
Heteroscedastic: equality condition
The following conditions must hold:
• Covariance matrices must be equal
Ωn = Ωnormn
• Σnormn must be positive semi-definite
Mixture Models — Simulation-based Estimation – p. 32/72
![Page 35: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/35.jpg)
Heteroscedastic: equality condition
Example with 3 alternatives:
U1 = βx1 +σ1ξ1 +ε1
U2 = βx2 +σ2ξ2 +ε2
U3 = βx3 +σ3ξ3 +ε3
Cov(∆3U) = Ω =
(
σ21 + σ2
3 + 2γ/µ2
σ23 + γ/µ2 σ2
2 + σ23 + 2γ/µ2
)
• Parameters: σ1, σ2, σ3, µ• Rank condition: S = 2
• µ is used for the scale
Mixture Models — Simulation-based Estimation – p. 33/72
![Page 36: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/36.jpg)
Heteroscedastic: equality condition
• Denote νi = σ2i µ
2 (scaled parameters)
• Normalization condition: ν3 = K
Ω =
(
(ν1 + ν3 + 2γ)/µ2
(ν3 + γ)/µ2 (ν2 + ν3 + 2γ)/µ2
)
Ωnorm =
(
(νN1 +K + 2γ)/µ2N
(K + γ)/µ2N (νN2 +K + 2γ)/µ2
N
)
where index N stands for “normalized”
Mixture Models — Simulation-based Estimation – p. 34/72
![Page 37: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/37.jpg)
Heteroscedastic: equality condition
First equality condition: Ω = Ωnorm
(ν3 + γ)/µ2 = (K + γ)/µ2N
(ν1 + ν3 + 2γ)/µ2 = (νN1 +K + 2γ)/µ2N
(ν2 + ν3 + 2γ)/µ2 = (νN2 +K + 2γ)/µ2N
that is, writing the normalized parameters as functions of others,
µ2N = µ2(K + γ)/(ν3 + γ)
νN1 = (K + γ)(ν1 + ν3 + 2γ)/(ν3 + γ)−K − 2γ
νN2 = (K + γ)(ν2 + ν3 + 2γ)/(ν3 + γ)−K − 2γ
Mixture Models — Simulation-based Estimation – p. 35/72
![Page 38: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/38.jpg)
Heteroscedastic: equality condition
Second equality condition:
Σnorm =1
µ2N
νN1 0 0
0 νN2 0
0 0 K
must be positive semi-definite, that is
µN > 0, νN1 ≥ 0, νN2 ≥ 0, K ≥ 0.
Putting everything together, we obtain
K ≥ (ν3 − νi)γ
νi + γ, i = 1, 2
Mixture Models — Simulation-based Estimation – p. 36/72
![Page 39: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/39.jpg)
Heteroscedastic: equality condition
K ≥ (ν3 − νi)γ
νi + γ, i = 1, 2
• If ν3 ≤ νi, i = 1, 2, then the rhs is negative, and any K ≥ 0 woulddo. Typically, K = 0.
• If not, K must be chosen large enough
• In practice, always select the alternative with minimumvariance.
Mixture Models — Simulation-based Estimation – p. 37/72
![Page 40: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/40.jpg)
Taste heterogeneity
• Population is heterogeneous
• Taste heterogeneity is captured by segmentation
• Deterministic segmentation is desirable but not always possible
• Distribution of a parameter in the population
Mixture Models — Simulation-based Estimation – p. 38/72
![Page 41: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/41.jpg)
Random parametersUi = βtTi + βcCi + εi
Uj = βtTj + βcCj + εj
Let βt ∼ N(βt, σ2t ), or, equivalently,
βt = βt + σtξ, with ξ ∼ N(0, 1).
Ui = βtTi + σtξTi + βcCi + εi
Uj = βtTj + σtξTj + βcCj + εj
If εi and εj are i.i.d. EV and ξ is given, we have
P (i|ξ) = eβtTi+σtξTi+βcCi
eβtTi+σtξTi+βcCi + eβtTj+σtξTj+βcCj
, and
P (i) =
∫
ξ
P (i|ξ)f(ξ)dξ.
Mixture Models — Simulation-based Estimation – p. 39/72
![Page 42: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/42.jpg)
Random parameters
Example with Swissmetro
ASC_CAR ASC_SBB ASC_SM B_COST B_FR B_TIME
Car 1 0 0 cost 0 time
Train 0 0 0 cost freq. time
Swissmetro 0 0 1 cost freq. time
B_TIME randomly distributed across the population, normaldistribution
Mixture Models — Simulation-based Estimation – p. 40/72
![Page 43: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/43.jpg)
Random parameters
Logit RCL -5315.4 -5198.0
ASC_CAR_SP 0.189 0.118ASC_SM_SP 0.451 0.107
B_COST -0.011 -0.013B_FR -0.005 -0.006
B_TIME -0.013 -0.023S_TIME 0.017
Prob(B_TIME ≥ 0) 8.8%χ2 234.84
Mixture Models — Simulation-based Estimation – p. 41/72
![Page 44: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/44.jpg)
Random parameters
0
5
10
15
20
25
-0.08 -0.06 -0.04 -0.02 0 0.02 0.04
Distribution of B_TIME
Mixture Models — Simulation-based Estimation – p. 42/72
![Page 45: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/45.jpg)
Random parameters
Example with Swissmetro
ASC_CAR ASC_SBB ASC_SM B_COST B_FR B_TIME
Car 1 0 0 cost 0 time
Train 0 0 0 cost freq. time
Swissmetro 0 0 1 cost freq. time
B_TIME randomly distributed across the population, log normaldistribution
Mixture Models — Simulation-based Estimation – p. 43/72
![Page 46: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/46.jpg)
Random parameters
[Utilities]
11 SBB_SP TRAIN_AV_SP ASC_SBB_SP * one +
B_COST * TRAIN_COST +
B_FR * TRAIN_FR
21 SM_SP SM_AV ASC_SM_SP * one +
B_COST * SM_COST +
B_FR * SM_FR
31 Car_SP CAR_AV_SP ASC_CAR_SP * one +
B_COST * CAR_CO
[GeneralizedUtilities]
11 - exp( B_TIME [ S_TIME ] ) * TRAIN_TT
21 - exp( B_TIME [ S_TIME ] ) * SM_TT
31 - exp( B_TIME [ S_TIME ] ) * CAR_TT
Mixture Models — Simulation-based Estimation – p. 44/72
![Page 47: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/47.jpg)
Random parameters
Logit RC-norm. RC-logn.
-5315.4 -5198.0 -5215.81
ASC_CAR_SP 0.189 0.118 0.122
ASC_SM_SP 0.451 0.107 0.069
B_COST -0.011 -0.013 -0.014
B_FR -0.005 -0.006 -0.006
B_TIME -0.013 -0.023 -4.033 -0.038
S_TIME 0.017 1.242 0.073
Prob(β > 0) 8.8% 0.0%
χ2 234.84 199.16
Mixture Models — Simulation-based Estimation – p. 45/72
![Page 48: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/48.jpg)
Random parameters
0
5
10
15
20
25
30
35
40
-0.07 -0.06 -0.05 -0.04 -0.03 -0.02 -0.01 0
MNL
Normal mean
Lognormal mean
Lognormal Distribution of B_TIMENormal Distribution of B_TIME
Mixture Models — Simulation-based Estimation – p. 46/72
![Page 49: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/49.jpg)
Random parameters
Example with Swissmetro
ASC_CAR ASC_SBB ASC_SM B_COST B_FR B_TIME
Car 1 0 0 cost 0 time
Train 0 0 0 cost freq. time
Swissmetro 0 0 1 cost freq. time
B_TIME randomly distributed across the population, discretedistribution
P (βtime = β) = ω1 P (βtime = 0) = ω2 = 1− ω1
Mixture Models — Simulation-based Estimation – p. 47/72
![Page 50: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/50.jpg)
Random parameters
[DiscreteDistributions]B_TIME < B_TIME_1 ( W1 ) B_TIME_2 ( W2 ) >
[LinearConstraints]W1 + W2 = 1.0
Mixture Models — Simulation-based Estimation – p. 48/72
![Page 51: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/51.jpg)
Random parameters
Logit RC-norm. RC-logn. RC-disc.
-5315.4 -5198.0 -5215.8 -5191.1
ASC_CAR_SP 0.189 0.118 0.122 0.111
ASC_SM_SP 0.451 0.107 0.069 0.108
B_COST -0.011 -0.013 -0.014 -0.013
B_FR -0.005 -0.006 -0.006 -0.006
B_TIME -0.013 -0.023 -4.033 -0.038 -0.028
0.000
S_TIME 0.017 1.242 0.073
W1 0.749
W2 0.251
Prob(β > 0) 8.8% 0.0% 0.0%
χ2 234.84 199.16 248.6
Mixture Models — Simulation-based Estimation – p. 49/72
![Page 52: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/52.jpg)
Latent classes
• Latent classes capture unobserved heterogeneity
• They can represent different:• Choice sets• Decision protocols• Tastes• Model structures• etc.
Mixture Models — Simulation-based Estimation – p. 50/72
![Page 53: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/53.jpg)
Latent classes
P (i) =
S∑
s=1
Pr(i|s)Q(s)
• Pr(i|s) is the class-specific choice model• probability of choosing i given that the individual belongs to
class s
• Q(s) is the class membership model• probability of belonging to class s
Mixture Models — Simulation-based Estimation – p. 51/72
![Page 54: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/54.jpg)
Summary
• Logit mixtures models• Computationally more complex than MEV• Allow for more flexibility than MEV
• Continuous mixtures: alternative specific variance, nestingstructures, random parameters
P (i) =
∫
ξ
Pr(i|ξ)f(ξ)dξ
• Discrete mixtures: well-defined latent classes of decisionmakers
P (i) =
S∑
s=1
Pr(i|s)Q(s).
Mixture Models — Simulation-based Estimation – p. 52/72
![Page 55: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/55.jpg)
Tips for applications
• Be careful: simulation can mask specification and identificationissues
• Do not forget about the systematic portion
Mixture Models — Simulation-based Estimation – p. 53/72
![Page 56: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/56.jpg)
Simulation
P (i) =
∫
ξ
Pr(i|ξ)f(ξ)dξ
No closed form formula
• Randomly draw numbers such that their frequency matches thedensity f(ξ)
• Let ξ1,. . . ,ξR be these numbers
• The choice model can be approximated by
P (i) ≈ 1
R
R∑
r=1
Pr(i|r), as
limR→∞
1
R
R∑
r=1
Pr(i|r) =∫
ξ
Pr(i|ξ)f(ξ)dξ
Mixture Models — Simulation-based Estimation – p. 54/72
![Page 57: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/57.jpg)
Simulation
P (i) ≈ 1
R
R∑
r=1
Pr(i|r).
The kernel is a logit model, easy to compute.
Pr(i|r) = eV1n+r
eV1n+r + eV2n+r + eV3n
Therefore, it amounts to generating the appropriate draws.
Mixture Models — Simulation-based Estimation – p. 55/72
![Page 58: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/58.jpg)
Appendix: Simulation
Pseudo-random numbers generatorsAlthough deterministically generated, numbers exhibit the propertiesof random draws
• Uniform distribution
• Standard normal distribution
• Transformation of standard normal
• Inverse CDF
• Multivariate normal
Mixture Models — Simulation-based Estimation – p. 56/72
![Page 59: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/59.jpg)
Appendix: Simulation: uniform distribution
• Almost all programming languages provide generators for auniform U(0, 1)
• If r is a draw from a U(0, 1), then
s = (b− a)r + a
is a draw from a U(a, b)
Mixture Models — Simulation-based Estimation – p. 57/72
![Page 60: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/60.jpg)
Appendix: Simulation: standard normal
• If r1 and r2 are independent draws from U(0, 1), then
s1 =√−2 ln r1 sin(2πr2)
s2 =√−2 ln r1 cos(2πr2)
are independent draws from N(0, 1)
Mixture Models — Simulation-based Estimation – p. 58/72
![Page 61: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/61.jpg)
Appendix: Simulation: standard normal
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-3 -2 -1 0 1 2 3
Histogram of 100 random samples from a univariateGaussian PDF with unit variance and zero mean
scaled bin frequencyGaussian p.d.f.
Mixture Models — Simulation-based Estimation – p. 59/72
![Page 62: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/62.jpg)
Appendix: Simulation: standard normal
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-3 -2 -1 0 1 2 3
Histogram of 500 random samples from a univariateGaussian PDF with unit variance and zero mean
scaled bin frequencyGaussian p.d.f.
Mixture Models — Simulation-based Estimation – p. 60/72
![Page 63: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/63.jpg)
Appendix: Simulation: standard normal
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-3 -2 -1 0 1 2 3
Histogram of 1000 random samples from a univariateGaussian PDF with unit variance and zero mean
scaled bin frequencyGaussian p.d.f.
Mixture Models — Simulation-based Estimation – p. 61/72
![Page 64: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/64.jpg)
Appendix: Simulation: standard normal
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-3 -2 -1 0 1 2 3
Histogram of 5000 random samples from a univariateGaussian PDF with unit variance and zero mean
scaled bin frequencyGaussian p.d.f.
Mixture Models — Simulation-based Estimation – p. 62/72
![Page 65: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/65.jpg)
Appendix: Simulation: standard normal
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
-3 -2 -1 0 1 2 3
Histogram of 10000 random samples from a univariateGaussian PDF with unit variance and zero mean
scaled bin frequencyGaussian p.d.f.
Mixture Models — Simulation-based Estimation – p. 63/72
![Page 66: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/66.jpg)
Appendix: Simulation: transformations of standard normal
• If r is a draw from N(0, 1), then
s = br + a
is a draw from N(a, b2)
• If r is a draw from N(a, b2), then
er
is a draw from a log normal LN(a, b2) with mean
ea+(b2/2)
and variancee2a+b2(eb
2 − 1)
Mixture Models — Simulation-based Estimation – p. 64/72
![Page 67: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/67.jpg)
Appendix: Simulation: inverse CDF
• Consider a univariate r.v. with CDF F (ε)
• If F is invertible and if r is a draw from U(0, 1), then
s = F−1(r)
is a draw from the given r.v.
• Example: EV with
F (ε) = e−e−ε
F−1(r) = − ln(− ln r)
Mixture Models — Simulation-based Estimation – p. 65/72
![Page 68: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/68.jpg)
Appendix: Simulation: inverse CDF
0
0.2
0.4
0.6
0.8
1
-4 -2 0 2 4
CDF of the Extreme Value distribution
Mixture Models — Simulation-based Estimation – p. 66/72
![Page 69: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/69.jpg)
Appendix: Simulation: multivariate normal
• If r1,. . . ,rn are independent draws from N(0, 1), and
r =
r1...rn
• thens = a+ Lr
is a vector of draws from the n-variate normal N(a, LLT ), where• L is lower triangular, and
• LLT is the Cholesky factorization of thevariance-covariance matrix
Mixture Models — Simulation-based Estimation – p. 67/72
![Page 70: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/70.jpg)
Appendix: Simulation: multivariate normal
Example:
L =
ℓ11 0 0
ℓ21 ℓ22 0
ℓ31 ℓ32 ℓ33
s1 = ℓ11r1
s2 = ℓ21r1 + ℓ22r2
s3 = ℓ31r1 + ℓ32r2 + ℓ33r3
Mixture Models — Simulation-based Estimation – p. 68/72
![Page 71: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/71.jpg)
Appendix: Simulation for mixtures of logit
• In order to approximate
P (i) =
∫
ξ
Pr(i|ξ)f(ξ)dξ
• Draw from f(ξ) to obtain r1, . . . , rR
• Compute
P (i) ≈ P (i) =1
R
R∑
k=1
Pr(i|rk)
=1
R
R∑
k=1
eV1n+rk
eV1n+rk + eV2n+rk + eV3n
Mixture Models — Simulation-based Estimation – p. 69/72
![Page 72: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/72.jpg)
Appendix: Maximum simulated likelihood
maxθ
L(θ) =N∑
n=1
(
J∑
j=1
yjn ln P (j; θ)
)
where yjn = 1 if ind. n has chosen alt. j, 0 otherwise.Vector of parameters θ contains:
• usual (fixed) parameters of the choice model
• parameters of the density of the random parameters
• For instance, if βj ∼ N(µj , σ2j ), µj and σj are parameters to be
estimated
Mixture Models — Simulation-based Estimation – p. 70/72
![Page 73: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/73.jpg)
Appendix: Maximum simulated likelihood
Warning:
• P (j; θ) is an unbiased estimator of P (j; θ)
E[Pn(j; θ)] = P (j; θ)
• ln P (j; θ) is not an unbiased estimator of lnP (j; θ)
lnE[P (j; θ] 6= E[ln P (j; θ)]
• Under some conditions, it is a consistent (asymptoticallyunbiased) estimator, so that many draws are necessary.
Mixture Models — Simulation-based Estimation – p. 71/72
![Page 74: Mixture Models — Simulation-based Estimation · b logcost -1.490 0.835 -3.25782 0.855 -3.24268 0.855 -3.2558 0.855 -3.25805 0.854 flat 2.292 meas 2.063 σf 3.02027 0 3.06144 2.17138](https://reader033.vdocuments.us/reader033/viewer/2022053004/5f081c8f7e708231d420650c/html5/thumbnails/74.jpg)
Appendix: Maximum simulated likelihood
Properties of MSL:
• If R is fixed, MSL is inconsistent
• If R rises at any rate with N , MSL is consistent
• If R rises faster than√N , MSL is asymptotically equivalent to
ML.
Mixture Models — Simulation-based Estimation – p. 72/72