Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:Re:st: MLE for Tobit I
From
"Alba J. Collart-Dinarte" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re:Re:st: MLE for Tobit I
Date
Fri, 2 Dec 2011 23:08:20 +0000
Matt Baker,
The first code for the Tobit model finally worked. It was a problem of syntax.
Thank you very much for your help!
Sincerely,
Alba J. Collart
*Likelihood Function for Tobit I censored at zero:
program mytobit1
version 10.1
args lnf beta sigma
quietly replace `lnf'= log(1-normal(`beta'/`sigma')) if $ML_y1==0
quietly replace `lnf'= log((1/`sigma')*normalden(($ML_y1-`beta')/`sigma')) if $ML_y1>0
end
ml model lf mytobit1 (y1 = x) /sigma
ml check
ml maximize, nolog
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/