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: Reference column without knowing variable name?
From
"Andrew Wood" <[email protected]>
To
[email protected]
Subject
st: Reference column without knowing variable name?
Date
Tue, 02 Mar 2010 05:41:05 -0500
Hi everyone,
I am trying to create a STATA script that cycles through certain columns (variables) and perform a transformation.
However, the datasets I am working with should only have every 3rd column (1,4,7,10...) transformed. This is ok but to make matters difficult, the datasets I am working with are VERY large and there is no pattern to the variable names.
I was wondering if anyone knew how to reference a column using a subscript in a loop, rather than a variable name (or use an integer to return the variable name of that column).
Thanks.
Andy
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/