Statalist


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

st: local/global macro in regression


From   Andrea Bennett <[email protected]>
To   [email protected]
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,

Andrea
*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index