Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Maximum Likelihood

From   Hitomi Amaya <[email protected]>
To   [email protected]
Subject   st: Maximum Likelihood
Date   Tue, 1 Apr 2014 11:52:39 -0700 (PDT)


I defined the following maximum likelihood program for bivariate probit
STATA gave me an error "unknown function 1-()".
I found William Gould of Stata corp mentioning:
"Never code 1-normprob(z).  Code instead normprob(-z), which is far more
to Deborah who raised a similar question on this STATA list.

However, as you can see in my code below, I have 1-(normprob(z)^131) instead
of 1-normprob(z).
I cannot easily convert it into a form without using 1-(...).  

I read "Maximum Likelihood Estimation with Stata", but I couldn't find a
I would very much appreciate it if anyone could come up with a solution to
this problem.

There is my code (which is a modification of the code written by Antoine,
also found on the STATA list):

program define mybiprobt
args lnf theta1 theta2 theta3
tempvar TH
quietly gen double
quietly replace
if $ML_y1==0 & $ML_y2==0
quietly replace
if $ML_y1==0 & $ML_y2==1
quietly replace
if $ML_y1==1 & $ML_y2==0
quietly replace
if $ML_y1==1 & $ML_y2==1

Thank you.
Hitomi Amaya

View this message in context:
Sent from the Statalist mailing list archive at

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index