Hi,
I have to do the same tasks for a lot of columns. I want to create a for
loop for that. But then I need to be able to save the column names in a
string vector and do a loop over that. But I can't find a way to make a
string vector. I found it in mata, but then something like:
gen x_`myvector[1]'=5
doesn't do anything. Is there a way to define a string vector in stata and
use it like in the example above? If not, what is the best way to go without
needing to do the for loop by hand?
Thank you, best regards,
-Hendri Adriaens.
--------------------------------
Hendri Adriaens
Researcher CentERdata
Tilburg Universiteit
Room K638
Warandelaan 2
PO Box 90153
5000 LE Tilburg, The Netherlands
Tel.: +31-13-466 3263 / 8325
Fax.: +31-13-466 2764
E-mail: [email protected]
WWW: http://www.centerdata.nl
*
* 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/