[Limdep Nlogit List] Random parameters logit unconditional probabilities
Iain Pardoe
ipardoe at lcbmail.uoregon.edu
Wed May 16 06:51:57 EST 2007
I've saved the unconditional probabilities for a random parameters logit
model using "list." I've also attempted to calculate these
probabilities from scratch to ensure I understand exactly what they are,
but I've been unable to match the results. For example, I tried fitting
an RPL model to the transportation data:
CALC ; Ran(12345) $
NLOGIT ; Lhs=MODE
; Choices=Air,Train,Bus,Car
; Rhs=TTME,GC
; Rh2=ONE
; RPL
; Pts=25
; list
; Fcn=gc(N),ttme(N) $
The four transport choice probabilties for the first respondent are
given as:
PREDICTED PROBABILITIES (* marks actual, + marks prediction.)
Indiv AIR TRAIN BUS CAR
1 .0823 .4361 + .1481 .3335*
Then I tried calculating these probabilties from scratch using the
fitted model results (please forgive the clunky code):
CALC ; gc1=gc(1)
; gc2=gc(2)
; gc3=gc(3)
; gc4=gc(4)
; ttme1=ttme(1)
; ttme2=ttme(2)
; ttme3=ttme(3)
; ttme4=ttme(4) $
CALC ; Ran(12345) $
CREATE ; re1=b(1)+b(6)*Rnn(0,1) ? Simulate 840 random effects for gc
; re2=b(2)+b(7)*Rnn(0,1) ? Simulate 840 random effects for ttme
; elp1=exp(re1*gc1+re2*ttme1+b(3))
; elp2=exp(re1*gc2+re2*ttme2+b(4))
; elp3=exp(re1*gc3+re2*ttme3+b(5))
; elp4=exp(re1*gc4+re2*ttme4)
; selp=elp1+elp2+elp3+elp4
; p1=elp1/selp
; p2=elp2/selp
; p3=elp3/selp
; p4=elp4/selp $
DSTAT ; Rhs=p1,p2,p3,p4 $
The four transport choice probabilities for the first respondent from
these 840 simulations have means of:
.108607, .383156, .129932, .378305
The values seem too far off to be a result of simulation error (and
repeating the process using more simulations doesn't seem to get me any
closer), so I think I must be doing something wrong. I would greatly
appreciate any enlightenment.
Best wishes, Iain
Iain Pardoe <ipardoe at lcbmail.uoregon.edu>
Assistant Professor of Decision Sciences
Charles H. Lundquist College of Business
1208 University of Oregon
Eugene, OR 97403-1208, USA
Ph: 541-346-3250, Fax: 541-346-3341
http://lcb1.uoregon.edu/ipardoe
More information about the Limdep
mailing list