Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Dropping Program Saved as an ado-file


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Dropping Program Saved as an ado-file
Date   Wed, 5 Sep 2012 17:00:29 +0200

On Wed, Sep 5, 2012 at 2:56 PM, Nick Cox wrote:
> An alternative is to pass the names of temporary variables via an
> option. If you have
>
> tempvar foobar
> gen `foobar' = ...
>
> you can call a subprogram with
>
> ... foobar(`foobar')
>
> This requires care, but so does sharing names via a global. For
> example, that global will stick around with inbuilt potential to mess
> up other things if you are not careful.

Absolutely, and for the example program I gave earlier, that is
probably the way I would go too. However, I suspected that in the
original question Christoph wanted to pass these temporary variables
on to a likelihood evaluator program, and I don't see a
straightforward way to implement this "option-strategy" within -ml-.

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index