# st: WTP from double bounded data

 From "Henrik Andersson" <[email protected]> To <[email protected]> Subject st: WTP from double bounded data Date Wed, 30 Jan 2008 21:36:47 +0100

```Dear all,

I have estimated a ml logistic model on double bounded WTP data. The
model I have estimated is an extension of the standard logit and it
looks as follows:

* ml DB ***

capture program drop double_cv
program double_cv
version 9.2
args lnf xb bid
qui replace `lnf' = ln(invlogit(\$ML_y6*`bid'+`xb')) if \$ML_y1 ==
1
qui replace `lnf' = ln(invlogit(-(\$ML_y7*`bid'+`xb'))) if \$ML_y2
== 1
qui replace `lnf' = ln(invlogit(-(\$ML_y6*`bid'+`xb')) - ///
invlogit(-(\$ML_y5*`bid'+`xb'))) if \$ML_y3 == 1
qui replace `lnf' = ln(invlogit(-(\$ML_y5*`bid'+`xb')) - ///
invlogit(-(\$ML_y7*`bid'+`xb'))) if \$ML_y4 == 1
end

** Estiamte model **

ml model lf double_cv (xb: q28_YY q28_NN q28_YN q28_NY = q28_dp
q28_p_high) (bid: q28bidca1000 q28bidY1000 q28bidN1000 = )
ml search
ml maximize

**********

Based on the model above one can then estimate mean and median WTP. As
an alternative to the model above, one can estiamte WTP directly. Let
exp(-zb) define the standard definition of the elements of the
log-likelihood, where z=[bid,x] refers to variables from my program
above, and b to the vector of parameters. Hence, this is what is
estimate above. To estimate WTP directly, the elements should instead be
exp((bid-xc)/d) where c are my new parameters of interest for my
covariates and d is a constant to be estimated.

I have tried to estimate my model above by replacing (\$ML_y6*`bid'+`xb')
with ((`bid'+`xb'/\$c)) but I get the error message "Unknown function (),
r(133);". One way to obtain by c-vector is to estimate my model above
and to calculate c=b/\$ML_yi (\$ML_yi produces a single parameter for
`bid'). However, that means that I have to recalcualte all coefficient
estiamtes. My question is therefore, is it possible to specify my
log-likelihood to get b and c directly.

Thanks

Henrik

*
*   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/
```

• Follow-Ups: