Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: MLE of double bounded (or interval-data probit)

From   Alejandro Lopez-Feldman <>
Subject   st: MLE of double bounded (or interval-data probit)
Date   Sat, 7 Dec 2002 13:41:58 -0800 (PST)

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 &
quietly replace `lnf'=ln(norm(`theta2' )-norm(`theta1')) if $ML_y1==1 &
quietly replace `lnf'=ln(1-norm(`theta2')) if $ML_y1==1 & $ML_y2==1

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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index