Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ML programming

From   "Stas Kolenikov" <>
Subject   Re: st: ML programming
Date   Sat, 24 Mar 2007 14:47:50 -0500

For instance, if I wanted to code a tobit command with a variable
censoring threshold, where the threshold for each observation was
contained in a variable, and the observation was censored if it
equaled that variable, but was not censored if it was less than that
variable, how can I pass the name of the threshold variable to the
function that calculated the likelihood?
In the spirit of -ml-, you can have a separate -_nocons- equation for
the threshold, and you can restrict the value of the slope in that
equation to be equal to 1 with -constr- (which you can hardcode in
your wrapper program). That's somewhat more elegant than using the
globals. Look up how the same need is dealt with in -intreg- or
-gllamm- where it deals with the threshold of the -ologit/oprobit-

Stas Kolenikov
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index