Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Creating new variables in mata.
From
Amadou DIALLO <[email protected]>
To
statalist <[email protected]>
Subject
st: Creating new variables in mata.
Date
Wed, 19 Feb 2014 16:22:11 +0100
Hi,
Maybe this has been already answered, but I can't find it.
What is the equivalent of the stata code below in mata?
forv i = 1/10 {
cap drop var`i'
g var`i' = ...
}
I've read Bill's "mata matters: macros" and creating new variables,
but I can't find how to parse the "i".
Thanks.
--
Amadou B. DIALLO, PhD.
Senior Economist, AfDB.
[email protected]
+21671101789
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/