[Limdep Nlogit List] Re: Estimation of Double-BoundedDichotomousChoice
Alessandro Corsi
alessandro.corsi at unito.it
Mon May 22 23:20:25 EST 2006
Since I received several requests of the code for estimating double-bounded
dichotomous choice and apparently the listserver did not allow it as an
attachment, I'm pasting it below.
Alessandro
________________________________
Alessandro Corsi
Dip. di Economia "S. Cognetti de Martiis"
Via Po, 53
10124 Torino (Italy)
Tel. +39-0116704409 Fax +39-0116702762
http://www.personalweb.unito.it/alessandro.corsi
?===================================================================
? DOUBLE BOUNDED LINEAR PROBIT MODEL
? Alessandro Corsi - Riccardo Scarpa
? The model is Hanemann's difference-in-utility model with a linear
? utility function. See Hanemann, W.M., Kanninen B.J. (1999) Statistical
? Considerations in CVM, in "Valuing Environmental Preferences - Theory and
? Practice of the Contingent Valuation in the US, EU and Developing
Countries"
? (I.J. Bateman, K.G. Willis Eds.), Oxford University Press, Oxford
? Load your Limdep file
?===================================================================
? a = first bid
? ah = higher bid
? al = lower bid
?===================================================================
? Create 4 dichotomous variables corresponding to the different
? possible outcomes (yes-yes; no-yes; yes-no; no-no)
? i1 and i2 are the responses to the first and second bid (yes=1)
?===================================================================
create;
yy= (i1 =1) * (i2=1) ;
ny= (i1 =0) * (i2=1) ;
yn= (i1 =1) * (i2=0) ;
nn= (i1 =0) * (i2=0) $
? probit or regression to have starting values. Use one of these
? the LHS variable is the answer to the first bid
? according to my experience regression works better
PROBIT ;Lhs= I1;Rhs=ONE,a $
regress;Lhs= I1;Rhs=ONE,a $
?===================================================================
? maximization of the likelihood function
? starting values; try other if they don't work
?===================================================================
maximize
; labels = b1,b2 ; start = b ;
; fcn =
xxh = -b1+b2*ah | ? equation for the higher bid
pyy = log(phi(-xxh)) | ? prob of getting yes-yes
xxx = -b1+b2*a | ? equation for the first bid
pyn = log(phi(xXh)-phi(XXX)) | ? prob of getting yes-no
xxl = -b1+b2*al | ? equation for the lower bid
pny = log(phi(XXX)-phi(XXl)) | ? prob of getting no-yes
pnn = log(phi(xXl)) | ? prob of getting no-no
yy*pyy+pyn*yn+pny*ny+pnn*nn $ ? likelihood function to maximize
calc; list ;
wtp_ave= -b1/b2 ? mean (=median in this case)
variance=1/(b2)^2 $ ? variance of beta
?===================================================================
? any other functional form can be used; substitute the proper
? functional forms in the equations defining xxh, xxx, xxl.
? Also put the right number of parameters in the ;labels command and in the
? probit or regress commands to have the starting values.
? Of course, mean and median are different.
More information about the Limdep
mailing list