Statalist The Stata Listserver


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

st: ML programming


From   Daniel Lawson <[email protected]>
To   [email protected]
Subject   st: ML programming
Date   Fri, 23 Mar 2007 16:11:26 -0400

Dear StataListers,

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?

Peace,
Daniel Lawson

--
Daniel Lawson
Assistant Professor of Economics
Drew University
http://users.drew.edu/dlawson/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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