Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: automatically creating variables names


From   "Dimitriy V. Masterov" <[email protected]>
To   [email protected]
Subject   Re: st: automatically creating variables names
Date   Mon, 2 May 2005 17:45:14 -0500 (CDT)

I think you can also define a local macro called list that contains an
unabreviated version of your global macro indvar:

unab list : $indvar

foreach x of local list {
        global pbetas $pbetas `x'1
}

di "$pbetas"


HTH,
DVM

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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