Académique Documents
Professionnel Documents
Culture Documents
William Greene
Department of Economics
Stern School of Business
Part 23: Parameter Heterogeneity [2/115]
Heterogeneity
Parameter Heterogeneity
1
ln yit = x ln xit xx (ln xit )2
2
1
m mi mm mi2 xm ln xit mi vit
2
Part 23: Parameter Heterogeneity [8/115]
+ vit - uit
mi * is an unobserved, time invariant effect.
m 1 2 k 1 km ln xkit
K
m *
i mi 1 2 mm mi* 2 mi2 0.
Part 23: Parameter Heterogeneity [10/115]
ln yit m m 2 mm m k 1 k 2 km i itk
K
*
i
1 *2
i 1 m* ln x
K K
1
2 k 1 l 1
kl ln xitk ln xitl vit uit
K K K
i k 1 ki ln xitk 1
2 k 1 l 1
kl ln xitk ln xitl it
K
mi* k ln xk wi
k 1
[Chamberlain/Mundlak:]
(1) Same random effect appears in each random parameter
(2) Only the first order terms are random
Part 23: Parameter Heterogeneity [11/115]
Latent Classes
A population contains a mixture of individuals of
different types (classes)
Common form of the data generating mechanism
within the classes
Observed outcome y is governed by the
common process F(y|x,j )
Classes are distinguished by the parameters, j.
Part 23: Parameter Heterogeneity [14/115]
Part 23: Parameter Heterogeneity [15/115]
Part 23: Parameter Heterogeneity [16/115]
Part 23: Parameter Heterogeneity [17/115]
2 1 yi - j
LogL = i=1 log j=1 j
1000
j j
Maximum Likelihood Estimates
Class 1 Class 2
Estimate Std. Error Estimate Std. error
7.05737 .77151 3.25966 .09824
3.79628 .25395 1.81941 .10858
.28547 .05953 .71453 .05953
Approximation
Actual
Distribution
Part 23: Parameter Heterogeneity [21/115]
Mean=E[ ijt] = 0; Variance=Var[ ijt] = 2
Part 23: Parameter Heterogeneity [23/115]
exp( j +'xitj )
Prob[choice j | i,t] =
J(i,t)
j=1
exp( j +'xitj )
Part 23: Parameter Heterogeneity [24/115]
Estimated MNL
+---------------------------------------------+
| Discrete choice (multinomial logit) model |
| Log likelihood function -4158.503 |
| Akaike IC= 8325.006 Bayes IC= 8349.289 |
| R2=1-LogL/LogL* Log-L fncn R-sqrd RsqAdj |
| Constants only -4391.1804 .05299 .05259 |
+---------------------------------------------+
+---------+--------------+----------------+--------+---------+
|Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] |
+---------+--------------+----------------+--------+---------+
BF 1.47890473 .06776814 21.823 .0000
BQ 1.01372755 .06444532 15.730 .0000
BP -11.8023376 .80406103 -14.678 .0000
BN .03679254 .07176387 .513 .6082
Part 23: Parameter Heterogeneity [25/115]
exp(xi,choiceclass )
Pr(choicei | class = q) =
j=choice exp(xi,jclass )
exp(zi q )
Pr(class = q | i) = i,q , e.g., Fi,q =
q=classes exp(zi q )
Simple discrete random parameter variation
exp(xi,choicei )
Pr(choicei | i ) =
j=choice exp(xi,ji )
exp(zi q )
Pr (i q ) i,q = , q = 1,..., Q
q=classes exp(zi q )
Pr(Choicei ) = q=1 Pr(choice | i q )Pr(q )
Q
Part 23: Parameter Heterogeneity [26/115]
+---------------------------------------------+
| Latent Class Logit Model |
| Log likelihood function -3649.132 |
+---------------------------------------------+
+---------+--------------+----------------+--------+---------+
|Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] |
+---------+--------------+----------------+--------+---------+
Utility parameters in latent class -->> 1
BF|1 3.02569837 .14335927 21.106 .0000
BQ|1 -.08781664 .12271563 -.716 .4742
BP|1 -9.69638056 1.40807055 -6.886 .0000
BN|1 1.28998874 .14533927 8.876 .0000
BF|2
BQ|2
Utility parameters in latent class -->> 2
1.19721944
1.11574955
.10652336
.09712630
11.239
11.488
.0000
.0000
Estimated
BP|2
BN|2
-13.9345351
-.43137842
1.22424326
.10789864
-11.382
-3.998
Utility parameters in latent class -->> 3
.0000
.0001 Latent Class
BF|3
BQ|3
BP|3
-.17167791
2.71880759
-8.96483046
.10507720
.11598720
1.31314897
-1.634
23.441
-6.827
.1023
.0000
.0000
Model
BN|3 .18639318 .12553591 1.485 .1376
This is THETA(1) in class probability model.
Constant -.90344530 .34993290 -2.582 .0098
_MALE|1 .64182630 .34107555 1.882 .0599
_AGE25|1 2.13320852 .31898707 6.687 .0000
_AGE39|1 .72630019 .42693187 1.701 .0889
This is THETA(2) in class probability model.
Constant .37636493 .33156623 1.135 .2563
_MALE|2 -2.76536019 .68144724 -4.058 .0000
_AGE25|2 -.11945858 .54363073 -.220 .8261
_AGE39|2 1.97656718 .70318717 2.811 .0049
This is THETA(3) in class probability model.
Constant .000000 ......(Fixed Parameter).......
_MALE|3 .000000 ......(Fixed Parameter).......
_AGE25|3 .000000 ......(Fixed Parameter).......
_AGE39|3 .000000 ......(Fixed Parameter).......
Part 23: Parameter Heterogeneity [27/115]
A Practical Distinction
Estimating an LC Model
Conditional density for each observation is
P(y i,t | x i,t , class q) f(y it | x i,t , q )
Joint conditional density for Ti observations is
f(y i1 , y i2 ,..., y i,Ti | X i , q ) t i 1 f(y it | x i,t , q )
T
w(q | y i , X i , zi ) P(class j | y i , X i , zi )
iq t i 1 f(y it | x i,t , q )
Q T
q1
w iq
Best guess = the class with the largest posterior probability.
Part 23: Parameter Heterogeneity [33/115]
Estimating i
from the class with the largest estimated probability
(1) Use j
= q=1 w
Q
iq q
Mark Harris
Department of Economics, Curtin University
Bruce Hollingsworth
Department of Economics, Lancaster University
Pushkar Maitra
Department of Economics, Monash University
William Greene
Stern School of Business, New York University
Part 23: Parameter Heterogeneity [36/115]
Costs of Obesity
In the US more people are obese than smoke or
use illegal drugs
Obesity is a major risk factor for non-
communicable diseases like heart problems and
cancer
Obesity is also associated with:
lower wages and productivity, and absenteeism
low self-esteem
An economic problem. It is costly to society:
USA costs are around 4-8% of all annual health care
expenditure - US $100 billion
Canada, 5%; France, 1.5-2.5%; and New Zealand
2.5%
Part 23: Parameter Heterogeneity [38/115]
Measuring Obesity
An individuals weight given their height should
lie within a certain range
Body Mass Index (BMI)
Weight (Kg)/height(Meters)2
World Health Organization guidelines:
Underweight BMI < 18.5
Normal 18.5 < BMI < 25
Overweight 25 < BMI < 30
Obese BMI > 30
Morbidly Obese BMI > 40
Part 23: Parameter Heterogeneity [39/115]
Boundaries are set by the WHO narrowly defined for all individuals
The observer does not know from the data which class
an individual is in.
ui 0 1 c
Endogeneity: ~ N ,
c ,i 0 c 1
Model Components
Data
US National Health Interview Survey
(2005); conducted by the National
Center for Health Statistics
Information on self-reported height and
weight levels, BMI levels
Demographic information
Split sample (30,000+) by gender
Part 23: Parameter Heterogeneity [51/115]
Outcome Probabilities
Class 0 dominated by normal and overweight probabilities normal weight class
Class 1 dominated by probabilities at top end of the scale non-normal weight
Unobservables for weight class membership, negatively correlated with those
determining weight levels:
Part 23: Parameter Heterogeneity [52/115]
Introduction
Health sector an important part of developed countries
economies: E.g., Australia 9% of GDP
To see if these resources are being effectively utilized,
we need to fully understand the determinants of
individuals health levels
To this end much policy, and even more academic
research, is based on measures of self-assessed health
(SAH) from survey data
Part 23: Parameter Heterogeneity [60/115]
HILDA Data
Y=4
Y=3
Y=2
Y=1
Y=0
Part 23: Parameter Heterogeneity [68/115]
m* xm m m
Y=3
Y=2
Part 23: Parameter Heterogeneity [70/115]
Part 23: Parameter Heterogeneity [71/115]
General Results
Part 23: Parameter Heterogeneity [77/115]
Part 23: Parameter Heterogeneity [78/115]
Inefficiency?
Not all agree with the presence (or
identifiability) of inefficiency in market
outcomes data.
Variation around the common production
structure may all be nonsystematic and not
controlled by management
Implication, no inefficiency: u = 0.
Part 23: Parameter Heterogeneity [84/115]
Programs differ on the models fitted, the algorithms, the paradigm, and the
extensions provided to the simplest RPM, i = +wi.
Part 23: Parameter Heterogeneity [89/115]
logL(, )=
N T
i=1
log t 1
f(y it | x it , i , )h(i | zi , )di
i
= , , 1 ,..., K , 1 ,..., K ,
Part 23: Parameter Heterogeneity [92/115]
1 R
LogL i=1 log r 1 t 1 [(2y it 1) x it ( + v ir )]
S N Ti
R
We now maximize this function with respect to ( , , ).
Part 23: Parameter Heterogeneity [93/115]
Estimated Elasticities
+--------------------------------------------------------------+
| Elasticity Averaged over observations. |
| Effects on probabilities of all choices in the model: |
| Attribute is PRICE in choice B1 RPL MNL LCM |
| * Choice=B1 .000 .000 -.818 -.889 -.801 |
| Choice=B2 .000 .000 .240 .291 .273 |
| Choice=B3 .000 .000 .244 .291 .248 |
| Choice=NONE .000 .000 .241 .291 .219 |
| Attribute is PRICE in choice B2 |
| Choice=B1 .000 .000 .291 .313 .311 |
| * Choice=B2 .000 .000 -1.100 -1.222 -1.248 |
| Choice=B3 .000 .000 .270 .313 .284 |
| Choice=NONE .000 .000 .276 .313 .268 |
| Attribute is PRICE in choice B3 |
| Choice=B1 .000 .000 .287 .366 .314 |
| Choice=B2 .000 .000 .326 .366 .344 |
| * Choice=B3 .000 .000 -.647 -.755 -.674 |
| Choice=NONE .000 .000 .311 .366 .302 |
+--------------------------------------------------------------+
Part 23: Parameter Heterogeneity [101/115]
Conditional Estimators
Counterpart to Bayesian posterior mean and variance
= argmax N log 1 R
i=1 R r=1 t=1 Pijt (ir | ,datait )
Ti
Ti
L =
i P ( | ,data
t=1
ijt )
i it
E[ i,k | datai ] =
(1/R)R
P ( | ,data ) R
T
= r=1
w
i,r i,k,r
r=1 t=1 ijt i it
(1/R)Rr=1i,k,r
2
Tt=1Pijt ( i | ,data
it ) 1 R
E[ 2
i,k | datai ] =
(1/R)R T P ( | ,data
=
) R r=1
w
i,r i,k,r
2
2
Var[i,k 2 | data ] - E[
| datai ] = E[
i,k i i,k | d atai ]
reasonable distribution
Part 23: Parameter Heterogeneity [102/115]
Disaggregated Parameters
The description of classical methods as only producing aggregate results
is obviously untrue.
Appendix: EM Algorithm
Part 23: Parameter Heterogeneity [105/115]
The EM Algorithm
Latent Class is a 'missing data' model
di,j 1 if individual i is a member of class j
If di,j were observed, the complete data log likelihood would be
logL c i1 log
N
d
J i T
j1 i,j t 1 f(y i,t | datai,t , class j)
Implementing EM
Given initial guesses iq0 i10 , i20 ,..., iQ
0
, 0q i10 , i20 ,..., iq0
E.g., use 1/Q for each iq and the MLE of from a one class
model. (Have to perturb each one slightly, as if all iq are equal
and all q are the same, the model will satisfy the FOC.)
(1) Compute w(q|i) 0 ,
= posterior class probabilities, using 0
Reestimate each q using a weighted log likelihood
i=1 w iq
N Ti
Maximize wrt q t=1
log f(y it | x i1 , q )
(2) Reestimate iq by reestimating q
If no zi , new
q=(1/N)Ni=1w(q|i) and new
using old
exp(zi q )
i=1 w(q|i)
N
If zi , Maximize wrt q log
Qq=1exp(zi q )
Now, return to step 1.
Iterate until convergence.
Part 23: Parameter Heterogeneity [107/115]
1 R
R r 1
f (uir )
P
f (ui ) g (ui )dui Eui [ f (ui )]
ui
exp( v 2 / 2)
LEcuyers RNG
Define: norm = 2.328306549295728e-10,
m1 = 4294967087.0, m1 = 4294944443.0,
a12 = 140358.0, a13n = 810728.0,
a21 = 527612.0, a23n = 1370589.0,
Initialize s10 = the seed, s11 = 4231773.0,
s12 = 1975.0, s20 = 137228743.0,
s21 = 98426597.0, s22 = 142859843.0.
Preliminaries for each draw (Resets at least some of 5 seeds)
p1 = a12*s11 - a13n*s10, k = int(p1/m1), p1 = p1 - k*m1
if p1 < 0, p1 = p1 + m1, s10 = s11, s11 = s12, s12 = p1;
p2 = a21*s22 - a23n*s20, k = int(p2/m2), p2 = p2 - k*m2
if p2 < 0, p2 = p2 + m2, s20 = s21, s21 = s22, s22 = p2;
Compute the random number
u = norm*(p1 - p2) if p1 > p2,
u = norm*(p1 - p2 + m1) otherwise.
I
r= the sequence of integers, decomposed as i 0
bi p i
H(r|p) i 0 bi p i 1 , r = r1 ,... (e.g., 10,11,12,...)
I