Hi all
I am trying to maximize a likelihood function for a normal divided in
four regions. This to obtain the Willingness to pay (WTP) from a
dichotomous choice survey. For those that aren't familiar with that kind
of survey, a person is asked if she is WTP a given amount of money
(bid1) for a particular service, good, etc, if she says yes then a
follow-up question with a higher amount (bid2) is asked if she says no
then the follow-up question will be donde with a lower amount. So there
are four possible comninations of answers YY, YN, NY and NN. I have been
trying with the following program (an many variations of it) but it is not
running properly, I hope some of you can help.
prog define mydoublebound
args lnf theta1 theta2
quietly replace `lnf'=ln(norm(`theta2')) if $ML_y1==0 & $ML_y2==0
quietly replace `lnf'=ln(norm(`theta1')-norm(`theta2')) if $ML_y1==0 &
$ML_y2==1
quietly replace `lnf'=ln(norm(`theta2' )-norm(`theta1')) if $ML_y1==1 &
$ML_y2==0
quietly replace `lnf'=ln(1-norm(`theta2')) if $ML_y1==1 & $ML_y2==1
end
ml model lf mydoublebound (i1wtpcb = bid1cb) (i2wtpcb=bid2cb)
ml search
ml check
ml max
Thank you very much
===============================================================================
Alejandro Lopez-Feldman
Department of Agricultural and Resource Economics
University of California at Davis
Office: SS&H 1160
Phone: 754-8522
===============================================================================
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/