Statalist The Stata Listserver

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

st: How to make macro variables last an entiresession?

From   <>
Subject   st: How to make macro variables last an entiresession?
Date   Mon, 28 Aug 2006 11:54:01 -0500 (CDT)


I was wondering if anyone knows how to define or save macro variables so they last for an entire stata session and not just while the do-file is running. I've been defining macro variables  as is below with the local command where the command `base' substitutes for all the variables in quotes below for example. But if I run the local command, and then later highlight some line of code with `base' and "do" it, then Stata no longer associates `base' with the set of variables. Anyone know any ways around this problem? I've tried saving using global macros and that doesn't seem to help.

local base "lncgdp s n popuned popprimed popseced pophighed openc"

regress `base'


Department of Agricultural and Consumer Economics
University of Illinois at Urbana-Champaign
1301 West Gregory Drive
405 Mumford Hall
Urbana, IL 61801
*   For searches and help try:

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