Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

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

From   Maarten Buis <>
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
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index