[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: ML programming
I have read [p] and maximum likelihood estimation with stata third
edition, but am a bit confused something.
In the ml model statement, one calls a program to evaluate the
likelihood. Is there a way to pass arguments to this program that do
not correspond with theta parameters to be estimated by ml?
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?
I can hard-code the name of the threshold variable into the
likelihood function, or I could create a global macro with the name
of the threshold variable, but neither of these seem like elegant
solutions. Is there a way to pass arguments to the likelihood
function in ml without making ml think that the argument is another
parameter to be computed?
Assistant Professor of Economics
* For searches and help try: