Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Reference column without knowing variable name?


From   "Andrew Wood" <andy_wood@myway.com>
To   statalist@hsphsun2.harvard.edu
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index