I think you should use $ML_y1 instead of ML_y1.
Jisheng.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Lionel Page
Sent: Thursday, 27 May 2004 6:00 AM
To: STATA list
Subject: st: MLE question
Hi,
I've just begun with the maximum likelihood with Stata, and my programm
is not working. Does anybody could help me ?
Here is the program :
program define maxlik
version 6
args lnf theta1 theta2 theta3
quietly replace `lnf'=ln(binorm(-`theta1',-`theta2',`theta3')) if
ML_y1==1
quietly replace `lnf'=ln(1-binorm(-`theta1',-`theta2',`theta3')) if
ML_y1==0
end
I get the message "varlist required" just after my first quietly
replace.
Thanks
Lionel
*
* 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/
*
* 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/