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

st: local/global macro in regression

From   Andrea Bennett <>
Subject   st: local/global macro in regression
Date   Thu, 17 Jul 2008 00:43:03 +0200

Hi everyone!

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 - clear-).

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).

Can this be done? Many thanks for your consideration,

* For searches and help try:

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