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

st: passing information to ml lf evaluators

From   Michael Manti <>
To   Statalist Statalist <>
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?


Michael Manti

*   For searches and help try:

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