Dear All.
I am currently coding for Contingent value method (double bounded dichotomous-choice and 1.5 dichotomous-choice)
As I am not STATA user and I am not good at using SAS, it is really difficult to translate the below Stata & LIMDEP coding to SAS coding.
Would you help me to change from STATA and LIMDEP code to SAS code?
Your help is greatly appreciated. Have a good day!
* Version: September 2013
* Alejandro Lopez-Feldman
* Division de Economia
* Centro de Investigacion y docencia economicas, CIDE
* lopezfeldman@gmail.com
* This is called by doubleb.ado
program doubleb_ll
version 10.1
args lnf xb sig
tempvar bid1 bid2 nn ny yn yy check
gen double `bid1'= $ML_y1
gen double `bid2'= $ML_y2
gen `yy' = $ML_y3 * $ML_y4
gen `nn' = 0
qui replace `nn' =1 if $ML_y3==0 & $ML_y4==0
gen `ny' = 0
qui replace `ny' = 1 if $ML_y3==0 & $ML_y4==1
gen `yn' = 0
qui replace `yn' = 1 if $ML_y3==1 & $ML_y4==0
qui replace `lnf' = ln(normal(((`xb'-`bid2')/(`sig')))) if `yy' ==1
qui replace `lnf' = ln(1-normal(((`xb'-`bid2')/(`sig')))) if `nn' ==1
qui replace `lnf' = ln(normal(((`xb'-`bid1')/(`sig')))-normal(((`xb'-`bid2')/(`sig')))) if `yn' ==1
qui replace `lnf' = ln(normal(((`xb'-`bid2')/(`sig')))-normal(((`xb'-`bid1')/(`sig')))) if `ny' ==1
end
Retreived from : http://fmwww.bc.edu/repec/bocode/d/doubleb_ll.ado
I have been working with one and one-half bound ditchotomouse cvm
> and have problem to get computer output using limdep program. The
> input code and output and error massages are like followings;
>
> name list; bh=one, ubid; bl=one, lbid$
> PROBIT ; lhs=res1
> ;rhs=one , bid1$
> name list; bh=one, ubid; bl=one, lbid$
> maximize ;label= B1, B2
> ;start=b
> ;maxit=100
> ;fcn=
> PBH=PHI(-dot(bh))|
> PBL=PHI(-dot(bl))|
> yY*LOG(1-PBH)
> +YN*LOG(PBH-PBL)
> +nN*LOG(PBL)$
>
> Any advice would be
> appreciated.
> Thanks
Retrieved from : https://mailman.sydney.edu.au/pipermail/limdep/2006-July/000096.html