Bookmark and Share

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: Re: from variable names to values


From   Katie Wilson <[email protected]>
To   [email protected]
Subject   st: Re: from variable names to values
Date   Fri, 1 Jun 2012 15:33:17 -0700

Hi all,

I have a data set with 41 variables: a unique identifier and then 40
variables containing population size.  I got the minimum poplation of
all forty just using egen minpop=rowmin(area1-area40).  Now I need to
create a new variable which has a code for the area with the smallest
population, ideally the value would be the same as the variable name
for the area.  The problem I run into, of course, is that STATA never
captures a variable name, only its own value.

Any help would be much appreciated.

Thank you,
Katie

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index