全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2448 1
2009-04-13
Dear statalist, I 've been trying to use 'stata ml' command to maximize the following equation
(k1i + e1i)X1i + (k2i + e2i)X2i + uX1iX2i
if u=0 then the equation can be estimated by standard 'bivariate probit'. However, when u>0 the decision of (X1i, X2i) = (1,1) or (0,0) will be biased; when u>0 the decision of (X1i, X2i) = (1,0) or (0,1) will suffer the biaseness also. 
My first question is of how and where to put the restriction of u > 0 and u< 0 when i am programming ml.
Second question is that do i have to write theta3 for uX1iX2i? if i do, how should i put it?  any suggestion or help will be very much appreciated. thank you!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2009-4-13 20:42:00
is it correct to express in this way?
* theta1=X1Beta1
* theta2=X2Beta2
* theta4=rho12
* theta3=X1X2Beta3
.
.
.
qui replace `lnf'=ln(binorm(`theta1'+`theta3',`theta2'+`theta3',`rho12')) if $ML_y1==1 & $ML_y2==1 & `theta3'<=0
qui replace `lnf'=ln(binorm(`theta1'+`theta3',`theta2'+`theta3',`rho12')-`biv1') if $ML_y1==1 & $ML_y2==1 & `theta3'>0
qui replace `lnf'=ln(binorm(-`theta1',-`theta2',`rho12')) if $ML_y1==0 & $ML_y2==0 & `theta3'<=0
qui replace `lnf'=ln(binorm(-`theta1',-`theta2',`rho12')+`biv2') if $ML_y1==0 & $ML_y2==0 & `theta3'>0
qui replace `lnf'=ln(binorm(`theta1',-`theta2'-`theta3',-`rho12')) if $ML_y1==1 & $ML_y2==0 & `theta3'>=0
qui replace `lnf'=ln(binorm(`theta1',-`theta2'-`theta3',-`rho12')-`biv3') if $ML_y1==1 & $ML_y2==0 & `theta3'<0
qui replace `lnf'=ln(binorm(-`theta1'-`theta3',`theta2',-`rho12')) if $ML_y1==0 & $ML_y2==1 & `theta3'>=0
qui replace `lnf'=ln(binorm(-`theta1'-`theta3',`theta2',-`rho12')-`biv4') if $ML_y1==0 & $ML_y2==1 & `theta3'<0
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群