Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re:Re:st: MLE for Tobit I


From   "Alba J. Collart-Dinarte" <ACollart@ag.tamu.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index