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

st: from variable to macro


From   Shige Song <[email protected]>
To   [email protected]
Subject   st: from variable to macro
Date   Sun, 17 Nov 2002 12:36:35 -0800

Dear All,

I'd like to know how to generate a macro out of a numerical variable. For example, I have a variable A that includes 200 values, I want to generate a macro X that contains all the values that variable A has so that I can do something like:

foreach x of local X {

qreg ... , q(x)

}

Thanks!

Best,
Shige

*
* 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