58
Simulation Based Estimation of Discrete Choice Models William Greene Department of Economics Stern School of Business New York University Camp Econometrics. Saratoga Springs, 2006

Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Simulation Based Estimation of Discrete Choice Models

William GreeneDepartment of EconomicsStern School of Business

New York University

Camp Econometrics. Saratoga Springs, 2006

Page 2: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Simulation Based Estimation

• History:– 1981: Lerman and Manski, Multivariate normal probabilities– 1984: GHK simulator and the multinomial probit model (vastly

oversold)– 1996 Gourieroux and Monfort: Simulation Based Econometrics– 1996 – present: Trivedi, Train, Greene, et. al. applications– 2003: Train, Discrete Choice Methods with Simulation

• Wave of the future? – A census of the JAE– Outside Economics?

Camp Econometrics. Saratoga Springs, 2006

Page 3: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Journal of Applied Econometrics

Camp Econometrics. Saratoga Springs, 2006

Page 4: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Agenda

• Methodology• Maximum simulated likelihood• Contrast to Bayesian MCMC estimation• Mechanics of MSL, MCMC and ML• Applications - several

– Panel model for counts: GEE (whiz)– Health care – binary choice, counts– Random parameters multinomial logit – Logit kernels and bank distress

Camp Econometrics. Saratoga Springs, 2006

Page 5: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Simulation Based Estimation

• Range of applications– Microeconometric applications – Typically discrete choice – No limitation as such

• Typical implementation – modeling unobserved heterogeneity

Camp Econometrics. Saratoga Springs, 2006

Page 6: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

The Conditional Density

• Data Structure– Panel: yi = (yi1,…,yi,Ti)'– Multivariate: yi = (si, ri, hi)'– Both…

• Unobserved heterogeneity: wi.• Conditional density

– fi(y) = f(yi | Xi, wi,β) conditioned on wi

Camp Econometrics. Saratoga Springs, 2006

Page 7: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Log Likelihood

=

=

= =

=

∑ ∫i

N

i i i ii 1

N

i i ii 1

i

logL | {( ), i 1,...,N} log f( | , , )

logL( ) log f( | , , )p( | )d

To be maximized over and (parameters of marginal distribution of ).

i iw

Conditional

w y X w β

Unconditional

β,θ y X w β w θ w

β θw

Camp Econometrics. Saratoga Springs, 2006

Page 8: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Simulated Log Likelihood

=

=

=

⎡ ⎤⎣ ⎦

∑ ∫∑

i iw

w

β,θ y X w β w θ w

y X w βi

i

N

i i ii 1

N

i i ii 1

The unconditional log likelihood is an expected value

logL( ) log f( | , , )p( | )d

= logE f( | , , )

The expected value can be estimated by random sampling

logL= =

= ⎡ ⎤⎣ ⎦

⎯⎯→

∑ ∑β,θ y X w β

β,θ β,θ

N RSi i iri 1 r 1

pS

1( ) log f( | , , )

RBy the law of large numbers,

logL ( ) logL( )Sample of draws from the population wi.

Camp Econometrics. Saratoga Springs, 2006

Page 9: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Properties of the MSLE

• Assume– Likelihood is “regular”– MLE achieves the usual desirable properties– Smoothness with respect to the heterogeneity

• Simulation (For useful details, see M&T)– Rate of increase in draws is faster than N1/2 (to be

revisited below)• Same asymptotic properties as MLE (See

Munkin and Trivedi (1999) – cited below.)

Camp Econometrics. Saratoga Springs, 2006

Page 10: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

A Random Parameters Model

=

= +

= =

=

i

0i

y X w β y X β

β β w

w ∆z w Σ ΓΓ'w X

z x

i i i i i

i

i i i

i i

i i

Random parameters model( | , , ) p( | , )

Partially observed heterogeneityE[ ] , Var[ ]=

It is assumed that . Perhaps a Mundlak

correction in a panel,

Structural para

f

= +w ∆z Γv v 0 v Ii i i i i

meters where E[ ]= , Var[ ] =

Camp Econometrics. Saratoga Springs, 2006

Page 11: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Simulated Log Likelihood for a Panel

= =

= = =

= ∑ ∑

∑ ∑ ∏

0

0i ir

β ,∆,Γ y X w β

x β +∆z +Γv

v

i

N RSi i iri 1 r 1

TN R

it iti 1 r 1 t 1

ir

Simulated Log Likelihood1

logL ( ) log f( | , , )R1

= log f[y | ,( )]R

Simulation is over draws of . Standard Normal, or other...

logL 0β ,∆,ΓS ( ) is maximized using conventional gradient methods

Camp Econometrics. Saratoga Springs, 2006

Page 12: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

RP Binomial Logit Model

= = =

′−=

′+ −

∑ ∑ ∏ iTN RSit iti 1 r 1 t 1

it itit it

it it

1logL ( ) = log f[y | ,( )]

Rexp[(2y 1) ( )]

f[y | ,( )]1 exp[(2y 1) ( )]

0 0i ir

00 i ir

i ir 0i ir

β ,∆,Γ x β +∆z +Γv

x β +∆z +Γvx β +∆z +Γv

x β +∆z +Γv

Camp Econometrics. Saratoga Springs, 2006

Page 13: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

An ApplicationData Source: Regina T. Riphahn, Achim Wambach, and Andreas Million, "Incentive Effects in the Demand for Health Care: A Bivariate Panel Count Data Estimation", Journal of Applied Econometrics, Vol. 18, No. 4, 2003, pp. 387-405.

German Health Care Usage Data (JAE Data Archive)

N = 7,293 Individuals,

Unbalanced PanelTi : 1=1525, 2=2158, 3=825, 4=926, 5=1051, 6=1000, 7=987

There are altogether 27,326 observations

Variables in the file areHHNINC = household nominal monthly net income in German marks / 10000.

(4 observations with income=0 were dropped)HHKIDS = children under age 16 in the household = 1; otherwise = 0EDUC = years of schooling MARRIED = marital StatusDOCTOR = Number of doctor visits > 0.

Camp Econometrics. Saratoga Springs, 2006

Page 14: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Estimated Random Parameters Logit Model for DOCTOR

Camp Econometrics. Saratoga Springs, 2006

Fixed RandomMeans

RandomStd.Devs.

Constant 1.239 (.068) 1.185 (.057) 1.504 (.020)HHNINC -.191 (.075) .045 (.063) .441 (.038)HHKIDS -.429 (.027) -.369 (.022) .298 (.024)EDUC -.058 (.006) -.057 (.005) .013 (.001)MARRIED .251 (.031) .191 (.026) .045 (.017)

Log Likelihood -17804.1 -16408.7

Note: In this model, Γ = I and ∆ = 0.

Page 15: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Bayesian EstimationRandom Parameters? Not "randomly distributed across observations."What is "randomness" in this context?

The posterior mean is a conditional meanL(Data| )Prior( )

Posterior density for = p(Data)

β ββ

∫∫

L(Data| )Prior( ) =

L(Data| )Prior( )d

Bayesian estimator is the posterior mean:

L(Data| )Prior( )d =

L(Data| )Prior( )d

β

β

β

β ββ β β

β β β β

β β β

Camp Econometrics. Saratoga Springs, 2006

Page 16: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Bayesian Estimation

= =∫

Posterior density via Bayes Theoremp(Data| )Prior( ) p(Data, ) p(Data, )

p( )= p(Data) p(Data) p(Data, )d

L(Data| )Prior( ) = (Note: Fn of L and Prior)

L(Data| )Prior( )d

Posteri

β

β

β β β ββ|Dataβ β

β ββ β β

==

⎯⎯→

∫∫

∑R

r 1

P

or mean

L(Data| )Prior( )dˆ=

L(Data| )Prior( )d

MCMC (Gibbs sampling) estimator1ˆ |posterior densityR

ˆBy the law of large numbers, E[ ]

β

β

MCMC r

MCMC

β β β ββ

β β β

β β

β β|Data

Camp Econometrics. Saratoga Springs, 2006

Page 17: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

MCMC vs. MSL

=∫ ∫∫ ∫

Neglecting the interpretative difference - in purely numerical terms,

With noninformative (flat) priors, the posterior mean is

L(Data| )Prior( )d L(Data| )dˆ =

L(Data| )Prior( )d L(Data|β β

β β

β β β β β β ββ

β β β β=

∫ p( Data)d)d

The Bayesian estimator is the mean of the population of vectors whose distribution is defined by the conditional (on the data) likelihood.

The MLE is the vector which sits

ββ β| β

β

at the mode of the same likelihood.

Camp Econometrics. Saratoga Springs, 2006

Page 18: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Why do MCMC and MSL differ numerically?

• Pure sampling variability – they are different statistics• Asymmetry of the log likelihood function; mean ≠ mode• Strength of the prior: Posterior ≠ Likelihood• … only… by and large, they don’t differ.• A Theorem of Von-Mises: Under weak priors, the

“estimators converge” to the same thing, and the posterior variance converges to the inverse of the information matrix.

Camp Econometrics. Saratoga Springs, 2006

Page 19: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Application: Panel (RE) ProbitHarris, M., Rogers, M., Siouclis, A., "Modelling Firm Innovation Using PanelProbit Estimators," Melbourne Institute of Applied Economic and SocialResearch, WP 20/01, 2002.Sample = 3,757 Australian firms, 3 years:Random Effects Probit Model: Innovation reported in the survey year ML MCMCConstant -1.646 (.052) -1.646 (.052)Labor 0.075 (.017) 0.075 (.017)Lagged Profit Margin -0.063 (.056) -0.063 (.056)Business Plan 0.485 (.042) 0.485 (.042)Network 0.410 (.044) 0.409 (.043)Export 0.072 (.050) 0.071 (.051)Startup Firm 0.005 (.081) 0.001 (.082)R&D 1.613 (.061) 1.613 (.063)Correlation 0.380 (.020) 0.381 (.053)(ML obtained by Hermite quadrature - Butler and Moffitt method.)

Camp Econometrics. Saratoga Springs, 2006

Page 20: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

The Simulations

• An arms race in the MCMC literature: How many draws for the Gibbs sampler? 5,000? 50,000? There is no theory to define R.

• MSL – Considerations for good properties– R/N1/2 →∞ Many draws needed to invoke LLN– High quality random number generators with long

periods. (Unclear why these are important.)– It’s a moot point

• Randomness is not the issue. Even coverage of the range of integration is what is needed.

• Halton draws and “intelligent” draws reduce the number of draws needed by a large percent. 90 if K=1 and N is large.

Camp Econometrics. Saratoga Springs, 2006

Page 21: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Quadrature and Simulation

ii i i

K 2k=1 i,k

General Problem: How to compute

f( | , , )p( | )d

Thus far, we have considered simulation and Gibbs sampling.

If p( | ) = Exp(- w ) (Multivariate spherical normal)

then Cartesian Hermite

Σ

∫ i iw

i

y X w β w θ w

w θ

i

K K 1 1 1 K KK K 1 1

i i i

H H H

h h h i i h h 1 hh 1 h 1 h 1

K

quadrature is a third possibility.

f( | , , )p( | )d

w w ... w f( | ,z ,...z , z , )

Note: H function evaluations per observation per iteration,...−−

−= = =≈

∫∑ ∑ ∑

i iwy X w β w θ w

y X β

Camp Econometrics. Saratoga Springs, 2006

Page 22: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Discussion

Rabe-Heketh, S., Skrondal, A., Pickles, A., “Maximum Likelihood Estimation of Limited and Discrete Dependent Variable Models with Nested Random Effects,” Journal of Econometrics, 128, 2, October, 2005, pp. 301-323.

Develops an “Adaptive Quadrature” method for these problems.

Camp Econometrics. Saratoga Springs, 2006

Page 23: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

On Adaptive Quadrature

• “Performs well for large cluster sizes”• “Gives empirical Bayes predictions for cluster or

individual specific random effects and their standard errors” (We will return to this claim.) (A claim usually made by Bayesians, typically followed by an untrue assertion that classical methods cannot do this.)

(Page 320)

Camp Econometrics. Saratoga Springs, 2006

Page 24: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

On Alternatives

“Computer intensivealternatives to adaptive quadrature include simulation based approaches such as MCMC and MSL.”

Camp Econometrics. Saratoga Springs, 2006

Page 25: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Rabe-Hesketh on MCMC• “The hierarchical structure of multilevel models lends

itself naturally to MCMC using Gibbs sampling. If vague priors are specified, the method essentially yields maximum likelihood estimates. (We knew that.)

• Quibbles with MCMC estimation– How to ensure that a truly stationary distribution has been

obtained? (MCMC always works, even when it shouldn’t)– There is no diagnostic for assessing empirical identification.

(Same issue. How do you know if a problem is not identified?)

Camp Econometrics. Saratoga Springs, 2006

Page 26: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Rabe-Hesketh on MSL• “Regarding simulated maximum likelihood, a

merit is that conditional independence specifications implicit in standard multilevel models may be relaxed….

• “Futhermore, unlike methods based on quadrature, simulation methods allow analysis of the approximation error” (See Munkin and Trivedi)

• (No shortcomings are cited)

Camp Econometrics. Saratoga Springs, 2006

Page 27: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Quadrature

• Virtues– Quite accurate for relatively few nodes

• Vices– Excruciatingly slow if K > 2 (Compare hours

vs. seconds for simulation or Gibbs sampling)– Torturously complicated– Limited to normal densities for integrands– Limited to independent effects

Camp Econometrics. Saratoga Springs, 2006

Page 28: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Why Consider Quadrature?

• The last paragraph of the 21 page paper states “Maximum likelihood estimation and empirical Bayes predictions for all of these models using adaptive quadrature is implemented in gllamm which runs in Stata”

• Stata does not contain a simulation estimator nor any Gibbs sampling routines.

Camp Econometrics. Saratoga Springs, 2006

Page 29: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Parlor Tricks: MSL Estimation of a Panel Poisson Model

1 2

How to construct a bivariate Poisson model?(1) Traditional: Observed Y1 = Z1 + U Observed Y2 = Z2 + U Z1, Z2, U all Poisson with means , ,

A bit clumsy and only al

λ λ µ

lows positive covariance (Not good for Y1 = doctor visits, Y2 = hospital visits )(2) Munkin, M. and Trivedi, P., "Simulated Maximum Likelihood Estimation of Multivariate Mixed Poisson Regres

µ

sion Models, with Application," The Econometrics Journal, 2, 1, 1999, pp. 29-48.

Camp Econometrics. Saratoga Springs, 2006

Page 30: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Bivariate Poisson1 2y y

1 1 2 21 1 2 2

1 2

1 1 1 1 2 2 2 2

1 2

exp( ) exp( )P(y | x ) , P(y | x )

(y 1) (y 1)

exp( x ), exp( x )

( , ) have a bivariate distribution with nonzero covariance

that can be simul

−λ λ −λ λ= =

Γ + Γ +′ ′λ = β + ε λ = β + ε

ε ε

ated. M&T assume joint normality.

The likelihood does not have a closed form, but the conditionallikelihood can be easily simulated. The model is estimated by MSL

Application: Health care utilization: y1 = emergency room visits y2 = hospitalizations

Camp Econometrics. Saratoga Springs, 2006

Page 31: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

A Panel Poisson Model

ityit it it it

it it itit

it it it it i

i1 i2 i7

German Health Care Data: Unbalanced panel, up to 7 periods

exp[ ( | )]( | )P(y | x , ) ,

(y 1)

( | ) exp( ), t = 1,...,T

( , ,..., ) ~ 7 variate normal w

− λ ε λ εε =

Γ +′λ ε = + ε

ε ε ε

β x

its

it it it i1 it1 i2 it2 i3 it3 i4 it4 i5 it5 i6 it6 i7 it7

0i i

ith free correlation matrix

There are 7 specific dates in the data set. d a set of time dummies

( | ) exp( d d d d d d d )

=′λ ε = + δ + δ + δ + δ + δ + δ + δ

= +

β x

δ δ Γv

Camp Econometrics. Saratoga Springs, 2006

Page 32: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Estimated ModelsFixed

ParametersRandom

ConstantsUncorrelated

EffectsRandom

ConstantsCorrelated

Effects

Means Means Standard Deviations

Means Standard Deviations

HHNINC -0.683 (.024) -0.633 (.008) -0.322 (.011)

HHKIDS -0.363 (.007) -0.369 (.002) -0.117 (.003)

EDUC -0.056 (.002) -0.065 (.001) -0.098 (.001)

MARRIED 0.142 (.009) 0.117 (.003) 0.074 (.004)

Period 1=1984 2.006 (.022) 1.772 (.010) 1.376 (.006) 2.347 (.012) 1.696

Period 2=1985 1.984 (.022) 1.892 (.009) 1.052 (.005) 2.395 (.012) 1.379

Period 3=1986 2.121 (.022) 1.920 (.0090) 1.046 (.005) 2.541 (.012) 1.590

Period 4=1987 2.064 (.022) 2.208 (.008) 0.909 (.005) 2.426 (.012) 1.404

Period 5=1988 1.936 (.022) 1.889 (.008) 0.910 (.004) 2.482 (.012) 1.191

Period 6=1991 1.933 (.022) 1.897 (.009) 0.761 (.004) 2.350 (.012) 1/045

Period 7=1994 2.285 (.022) 2.293 (.008) 0.707 (.004) 2.449 (.012) 1.316

Log Likelihood -105,520.20 -82,897.02 -72,467.9

Camp Econometrics. Saratoga Springs, 2006

Page 33: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Cross Period Correlation Matrix

Camp Econometrics. Saratoga Springs, 2006

Page 34: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Multinomial Logit Model

• Workhorse for empirical analysis of discrete choice among unordered alternatives

• Numerous extensions have been developed for different situations and microeconomic assumptions

Camp Econometrics. Saratoga Springs, 2006

Page 35: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

A Random Utility ModelRandom Utility Model for Discrete Choice Among J alternatives at time t by person i.Uitj = αj + β′xitj + εijt

αj = Choice specific constant

xitj = Attributes of choice presented to person(Information processing strategy. Not allattributes will be evaluated. E.g., lexicographicutility functions over certain attributes.)

β = ‘Taste weights,’ ‘Part worths,’ marginal utilities

εijt = Unobserved random component of utility

Mean=E[εijt] = 0; Variance=Var[εijt] = σ2

Camp Econometrics. Saratoga Springs, 2006

Page 36: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

The Multinomial Logit Model

Independent type 1 extreme value (Gumbel):– F(εitj) = 1 – Exp(-Exp(εitj)) – Independence across utility functions– Identical variances, σ2 = π2/6– Same taste parameters for all individuals

Model extensions build around IIA assumptions.Not our interest here.

∑ t

j itjJ (i)

j itjj=1

exp(α +β'x )Prob[choice j | i,t] =

exp(α +β'x )

Camp Econometrics. Saratoga Springs, 2006

Page 37: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Building Individual Effects into Utilities for the MNL Model

i,t,j itj itj i

A counterpart to individual specific, random effects?U + u

Same effect in all utility functions is undesirableChoice specific effect is not the objective.

′= + ε σ

Repeated Choice Situations

β x

i,1 i,M

i,t,j itj itj 1,1 1 i,1 1,2 2 i,2 1,M M i,M

i,t,j itj itj 2,1 1 i,1 2,2 2 i,2 2,M M i,M

i,t,j itj itj J,1 1 i,

Define a set of M J "kernels" u ,...,u

U + C u C u ... C u

U + C u C u ... C u

...U + C u

′= + ε σ + σ + + σ

′= + ε σ + σ + + σ

′= + ε σ

β x

β x

β x 1 J,2 2 i,2 J,M M i,M

j,m

C u ... C u

C dummy variable for placing kernel m in utility j

+ σ + + σ

=

Camp Econometrics. Saratoga Springs, 2006

Page 38: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

The Kernel Logit Model• Individual effects in utility functions, not tied to the choice

structure• Provides a stochastic specification that produces the

nested logit model – simpler to estimate and always satisfies utility maximization without parameter constraints

• Estimable as a random parameters multinomial logit model with MSL.

Camp Econometrics. Saratoga Springs, 2006

Page 39: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Application: Australian Banks• Hensher, D., Jones, S., Greene, W., “Corporate

Bankruptcy and Insolvency Risk in Australia: A Kernel Logit Analysis,” Department of Accounting, University of Sydney, WP, 2006.

• Application– Nonfailed; Insolvent; Distressed; Bankrupt and in receivership– Unordered choice – MNL model.– Quibles: Are these choices ordered? How should this outcome

be modeled?

Camp Econometrics. Saratoga Springs, 2006

Page 40: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

A Complicated Application of MSL:MNL for Shoe Brand Choice

• Simulated Data: Stated Choice, 400 respondents, 8 choice situations

• 3 choice/attributes + NONE– Fashion = High / Low– Quality = High / Low– Price = 25/50/75,100 coded 1,2,3,4

• Heterogeneity: Sex, Age (<25, 25-39, 40+)• Underlying data actually generated by a 3 class latent class

process (100, 200, 100 in classes) (True process is known.)• Thanks to www.statisticalinnovations.com (Latent Gold and Jordan

Louviere)

Camp Econometrics. Saratoga Springs, 2006

Page 41: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

A Discrete (4 Brand) Choice Model

i,1,t F,i i,1,t Q i,1,t P,i i,1,t Brand i,Brand i,1,t

i,2,t F,i i,2,t Q i,2,t P,i i,2,t Brand i,Brand i,2,t

i,3,t F,i i,3,t Q i,3,t P

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β ,i i,3,t Brand i,Brand i,3,t

i,NONE,t NONE NONE i,NONE i,NONE,t

F,i F F i F F1 i F2 i F,i F,i

P,i P P i

Price +λ K +ε

U =α +λ K +ε

β =β +δ Sex +[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

β =β +δ Sex P P1 i P2 i P,i P,i

Brand,i

NONE,i

+[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

K ~N[0,1]

K ~N[0,1]

Camp Econometrics. Saratoga Springs, 2006

Page 42: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Random Parameters Model

i,1,t F,i i,1,t Q i,1,t P,i i,1,t Brand i,Brand i,1,t

i,2,t F,i i,2,t Q i,2,t P,i i,2,t Brand i,Brand i,2,t

i,3,t F,i i,3,t Q i,3,t P

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β ,i i,3,t Brand i,Brand i,3,t

i,NONE,t NONE NONE i,NONE i,NONE,t

F,i F F i F F1 i F2 i F,i F,i

P,i P P

Price +λ K +ε

U =α +λ K +ε

β =β +δ Sex +[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

β =β +δ Sexi P P1 i P2 i P,i P,i

Brand,i

NONE,i

+[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

K ~N[0,1]

K ~N[0,1]

Camp Econometrics. Saratoga Springs, 2006

Page 43: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Heterogeneous (in the Means) Random Parameters Model

i,1,t F,i i,1,t Q i,1,t P,i i,1,t Brand i,Brand i,1,t

i,2,t F,i i,2,t Q i,2,t P,i i,2,t Brand i,Brand i,2,t

i,3,t F,i i,3,t Q i,3,t P

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β ,i i,3,t Brand i,Brand i,3,t

i,NONE,t NONE NONE i,NONE i,NONE,t

F,i F F i F F1 i F2 i F,i F,i

P,i P P

Price +λ K +ε

U =α +λ K +ε

β =β +δ Sex +[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

β =β +δ Sexi P P1 i P2 i P,i P,i

Brand,i

NONE,i

+[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

K ~N[0,1]

K ~N[0,1]

Camp Econometrics. Saratoga Springs, 2006

Page 44: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Heterogeneity in Both Means and Variances

i,1,t F,i i,1,t Q i,1,t P,i i,1,t Brand i,Brand i,1,t

i,2,t F,i i,2,t Q i,2,t P,i i,2,t Brand i,Brand i,2,t

i,3,t F,i i,3,t Q i,3,t P

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β ,i i,3,t Brand i,Brand i,3,t

i,NONE,t NONE NONE i,NONE i,NONE,t

F,i F F i F F1 i F2 i F,i F,i

P,i P P

Price +λ K +ε

U =α +λ K +ε

β =β +δ Sex +[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

β =β +δ Sexi P P1 i P2 i P,i P,i

Brand,i

NONE,i

+[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

K ~N[0,1]

K ~N[0,1]

Camp Econometrics. Saratoga Springs, 2006

Page 45: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Individual (Kernel) Effects Model

i,1,t F,i i,1,t Q i,1,t P,i i,1,t Brand i,Brand i,1,t

i,2,t F,i i,2,t Q i,2,t P,i i,2,t Brand i,Brand i,2,t

i,3,t F,i i,3,t Q i,3,t P

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β Price +λ K +ε

U =β Fashion +β Quality +β ,i i,3,t Brand i,Brand i,3,t

i,NONE,t NONE NONE i,NONE i,NONE,t

F,i F F i F F1 i F2 i F,i F,i

P,i P P

Price +λ K +ε

U =α +λ K +ε

β =β +δ Sex +[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

β =β +δ Sexi P P1 i P2 i P,i P,i

Brand,i

NONE,i

+[σ exp(γ AgeL25 +γ Age2539 )] w ; w ~N[0,1]

K ~N[0,1]

K ~N[0,1]

Camp Econometrics. Saratoga Springs, 2006

Page 46: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Estimated Brand Choice Models

Camp Econometrics. Saratoga Springs, 2006

Page 47: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

“Estimating Individual Effects”

µ

i i

i

0

0

f(y |parameters) = g(data, )

p( ) = h( ) (Typically normal)

p( ) = Normal( , )

p( ) = Inverse Wishart(a , ) Individual Estimate? Posterior mean is an estima

0

0

Hierarchical Bayesβ

β β,Σ

β Σ

Σ A

= + +

i i

i i

i i i

i

i i

te of E[ |Data ]

f(y |parameters) = g(data, )

density of is specified...

Individual Estimate? We can estimate E[ |Data ]

0

βClassical Random Parameters

β

β β ∆z Γvv

βNeither is an "e i

1 N

i

x

x (x ,..., x ).

i

stimate" of β any more than is an estimate ofin a sample It is an estimate of the conditional mean

of the population from which β is a draw.

Camp Econometrics. Saratoga Springs, 2006

Page 48: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Simulation Estimation of E[βi|Datai]=

=

=

=∫ ∫i i

i i i i

i i

i i i i i

i i i i i

p(Data | ) Individual contribution to the likelihood, L(Data | )

Marginal p( ) Specified in the RP model = g( | )

p(Data ) L(Data | )g( | )

Marginal p(Data )= p(Data )d L(Data |

i

i

β β

β ββ β θ, z

,β β β θ, z

,β β

=

=

∫∫

i

i

i

i i i

i i ii i

i i i i

i i i i i

i ii i i i

)g( | ) d

Now, use Bayes TheoremL(Data | )g( | )

p( |Data )L(Data | )g( | ) d

The Conditional Mean Estimator

L(Data | )g( | )dE( |Data )

L(Data | )g( | ) d

i

i

β β θ, z β

β β θ, zβ

β β θ, z β

β β β θ, z ββ

β β θ, z β

We can also estimate the conditional variance this way.This is precisely the counterpart to the hierarchical Bayes estimator

Camp Econometrics. Saratoga Springs, 2006

Page 49: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

RP Estimator for MNL

= + + =

+ +=∫

i

i

i i

i i i i i

i i

i i

Likelihood is formed for the Multinomial Logit Model |

Marginal density for is formed from that of

where ~ N[ , ] f( )

The estimator is

( ) ME[ |Data ]

0

0

v

ββ v

β β ∆z Γv v 0 I v

β ∆z Γvβ

+ +

+ +∫i

i i i i i

i i i i i

NL[Data | ( )]f( )d

MNL[Data | ( )]f( )d

0

0

v

β ∆z Γv v v

β ∆z Γv v v

Camp Econometrics. Saratoga Springs, 2006

Page 50: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Simulation Estimator

=

=

+ + + +=

+ +

R

i ir i i ir 1

i iR

i i irr 1

i i

1 ( )MNL[Data | ( )]RE[ |Data ]

1 MNL[Data | ( )]R

We do likewise for the expected square and then compute anestimate of Var[ |Data ]

A Caveat: The "plug-in" estim

0 0

0

β ∆z Γv β ∆z Γvβ

β ∆z Γv

β

iator uses the MLEs of , , .

Statistical properties may be questionable. The same caveat applies to the hierarchical Bayes estimators.

0β ∆z Γ

Camp Econometrics. Saratoga Springs, 2006

Page 51: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Individual E[βi|datai] Estimates

Camp Econometrics. Saratoga Springs, 2006

Estimated Upper and Lower Bounds for BPrice(i)

PERSON

-25

-15

-5

5

15

-3581 161 240 320 4001

B_P

rice

Page 52: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Analyzing Willingness to Pay

i

R

i ir i i ir 1

i iR

i i irr 1

Extending the idea of estimating E[ |Data ]

Simulation estimator for the mean is1 ˆ ˆˆ ˆ ˆ ˆ ( )MNL[Data | ( )]RE[ |Data ]

1 ˆ ˆ ˆMNL[Data | ( )]R

Extend this to a functi

=

=

+ + + +=

+ +

i

0 0

0

β

β ∆z Γv β ∆z Γvβ

β ∆z Γv

R

i ir i i ir 1

i iR

i i irr 1

on of the parameters1 ˆ ˆˆ ˆ ˆ ˆ g( )MNL[Data | ( )]RE[g( )|Data ]

1 ˆ ˆ ˆMNL[Data | ( )]R

=

=

+ + + +=

+ +

0 0

0

β ∆z Γv β ∆z Γvβ

β ∆z Γv

Camp Econometrics. Saratoga Springs, 2006

Page 53: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

WTP

Attribute Attribute

Price Income

R Attribute,ii irr 1

Price,i

R

ir 1

Willingness to pay measures in a MNL model:ˆ ˆ

Usually: - . Where no price is available, ˆ ˆ

ˆ1 ˆ MNL[Data | ( )]ˆR

Estimation :1 MNL[DataR

=

=

β β

β β

ββ

β

irˆ| ( )]β

Camp Econometrics. Saratoga Springs, 2006

Page 54: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

WTP Application

Greene, W., Hensher, D., Rose, J., “Using Classical Simulation Based Estimators to Estimate Individual WTP Values,” in R. Scarpa and A. Alberini, eds., Applications of Simulation Methods in Environmental and Resource Economics, Springer, 2005

Camp Econometrics. Saratoga Springs, 2006

Page 55: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Stated Choice Experiment• Survey Data• 223 Commuting Trips in Northwest Sydney• T = 10 repetitions (scenarios)• Choices:

– Existing: Car, bus, train, busway– Proposed: light rail, heavy rail, new busway

• Demographics: Age, Hours worked per week, Income, Household size, Number of kids, Gender

• Attributes: Fare, In vehicle time, Waiting time, Access Mode/Time, Egress Time (various)

• Experimental design in several levels for each.

Camp Econometrics. Saratoga Springs, 2006

Page 56: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Mixed Logit Model

0k,i k k ,i k,i

0k

k,i

Simulation is tailored to the application:

(1 v ) where v has a "tent" distribution from -1 to +1.

is free.

v a transformation of a standard uniform U(0,1). Si

β = β +

β

=

k,i i

k,i i

mulation is trivial.

v 2u - 1 if u .5

v 1 - 2(1 u ) if u > .5

= ≤

= −

0 β 2β

Camp Econometrics. Saratoga Springs, 2006

Page 57: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Value of Travel Time Saved

Willingness to Pay Attribute VTTS Mean

VTTS Range

Main mode in vehicle time – car 28.80 6.37 - 39.80Egress time – car 31.61 15.80 - 75.60Main mode in vehicle time – public transport 15.71 2.60 - 31.50Waiting time – all bus 19.10 9.90 - 40.30Access time – all bus 17.10 8.70 - 31.70Access plus wait time – all rail 10.50 9.60 - 22.90Egress time – all public transport 3.40 2.00 - 7.40

Camp Econometrics. Saratoga Springs, 2006

Page 58: Simulation Based Estimation of Discrete Choice Modelspeople.stern.nyu.edu/wgreene/Econometrics/SimulationBasedEstima… · An Application Data Source: Regina T. Riphahn, Achim Wambach,

Observations

• MSL is a fast, flexible method of handling different forms of heterogeneity.

• MCMC (current practice) and MSL are alternative approaches. Statistical “aspects” are a red herring

• Individual effects are equally straightforward with either approach.

Camp Econometrics. Saratoga Springs, 2006