Statalist


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

st: passing information to ml lf evaluators


From   Michael Manti <[email protected]>
To   Statalist Statalist <[email protected]>
Subject   st: passing information to ml lf evaluators
Date   Fri, 20 Feb 2009 22:52:18 -0500

Let's say that I want to write an eclass program for fitting a particular truncated distribution via ML. I need a way to tell my ml lf evaluator what the left-hand and right-hand truncation points are. I understand three ways to pass information to ml lf evaluators:

1. Hardcoding values or variable names in the evaluator itself
2. Specifying dependent variables in the -ml model- statement and accessing $ML_y1, $ML_y2, etc. 3. Storing the information in global macros (e.g., -global DO_it = 1-) and accessing them in the evaluator (e.g., $DO_it)

Hardcoding is unworkable for building reusable do and ado files.
Using dependent variables is unattractive because dependent variables carry their own semantic freight. I dislike using globals because of concerns about name collisions (and a general aversion to them as a matter of programming taste).

Are there other methods that I could use to pass this info along?

Thanks!

Michael Manti




*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index