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

[no subject]


P.S. "locale" is just a word convenient for discussing this issue. Don't
expect to find it used by other Stata authors, let alone in StataCorp

Maarten Buis

No, a run of a .do-file is in Stata defined as a session, so when the
.do-file is done the session ended and the local macro ceased to exist.

Andrea Bennett

I don't quite see the point where I go wrong. I would like to use  
local macros in a do-file for regressions (e.g. -local main "female  
income age age2"-, then -reg `main'-). However, these local macros  
seem to be available only during the execution of the do-file.  
Whenever I want to refer to these macros via the console it doesn't  
work anymore. -macro list- then shows me that the local macros are not  
present anymore. However, if I manually enter the local macro in the  
console it stays there and can be referred to later (even after - 

I know I could work with global macros but I would prefer to have  
something like session macros so that I could also use them via  
console but which would then get deleted when clearing the memory  
(opposite to global macros which would continue to work).

*   For searches and help try:

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